{"_id":"@iadvize-oss/store-react","_rev":"1199-40be8e125452c1715f40c552e0e99b43","name":"@iadvize-oss/store-react","dist-tags":{"NO-TICKET-init-store-react":"0.0.0-canary-ed1b139-1593804726082","NO-TICKET-beta-store-react":"0.1.0-canary-83648eb-1593858863121","dependabot-npm_and_yarn-packages-store-react-eslint-7.4.0":"0.1.1-beta.0-canary-e8b03b1-1593861450278","dependabot-npm_and_yarn-packages-store-react-rollup-2.19.0":"0.1.1-beta.0-canary-220b3ff-1593927131093","dependabot-npm_and_yarn-packages-store-react-rollup-2.20.0":"0.1.1-beta.0-canary-a330f80-1594063521862","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.4":"0.1.1-beta.0-canary-87b3c83-1594069928529","dependabot-npm_and_yarn-packages-store-react-rollup-2.21.0":"0.1.1-beta.0-canary-c67202f-1594151474211","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.7.0":"0.1.1-beta.0-canary-6ac0479-1594332969955","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-13.0.1":"0.1.1-beta.0-canary-9e7c1c2-1594594073995","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.1.2":"0.1.1-beta.0-canary-bf081c2-1594637332560","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-13.0.2":"0.1.1-beta.0-canary-8fadab0-1594683874718","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-14.0.0":"0.1.1-beta.0-canary-0df3fad-1594712288859","dependabot-npm_and_yarn-packages-store-react-lodash-4.17.19":"0.1.1-beta.0-canary-e707588-1594851494417","dependabot-npm_and_yarn-packages-store-react-typescript-3.9.7":"0.1.1-beta.0-canary-ee99206-1594929160744","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.1.3":"0.1.1-beta.0-canary-74aaf2e-1594963764968","dependabot-npm_and_yarn-packages-store-react-rollup-2.22.0":"0.1.1-beta.0-canary-6719245-1595052611845","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.5":"0.1.1-beta.0-canary-49d093f-1595087831358","dependabot-npm_and_yarn-packages-store-react-eslint-7.5.0":"0.1.1-beta.0-canary-946dd6f-1595099945070","dependabot-npm_and_yarn-packages-store-react-rollup-2.22.1":"0.1.1-beta.0-canary-49657eb-1595101034703","dependabot-npm_and_yarn-packages-store-react-rollup-2.22.2":"0.1.1-beta.0-canary-4fcc0a5-1595399873269","NO-TICKET-add-indirection-level-on-createXXX-hooks":"0.1.1-beta.0-canary-ab812f9-1595400544875","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.7.1":"0.1.1-beta.1-canary-268faad-1595427108054","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-3.4.0":"0.1.1-beta.1-canary-b048df6-1595498111113","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.6":"0.1.1-beta.1-canary-cb85473-1595522813637","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-3.4.1":"0.1.1-beta.1-canary-882545e-1595523519771","dependabot-npm_and_yarn-packages-store-react-rollup-2.23.0":"0.1.1-beta.1-canary-a4a5e05-1595536792160","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.7":"0.1.1-beta.1-canary-26b96f0-1595804050942","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.1.4":"0.1.1-beta.1-canary-0b2d17c-1595927601745","dependabot-npm_and_yarn-packages-store-react-jest-26.2.0":"0.1.1-beta.1-canary-ea3b198-1596106571393","dependabot-npm_and_yarn-packages-store-react-jest-26.2.1":"0.1.1-beta.1-canary-ee695ef-1596109897315","dependabot-npm_and_yarn-packages-store-react-jest-26.2.2":"0.1.1-beta.1-canary-48be87b-1596193302906","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.8":"0.1.1-beta.1-canary-013b024-1596406652561","dependabot-npm_and_yarn-packages-store-react-eslint-7.6.0":"0.1.1-beta.1-canary-d123c5b-1596492928367","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.9":"0.1.1-beta.1-canary-1dd6b58-1596674112399","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-typescript2-0.27.2":"0.1.1-beta.1-canary-d3cc6be-1596828310662","dependabot-npm_and_yarn-packages-store-react-rollup-2.23.1":"0.1.1-beta.1-canary-2be6722-1596831524356","dependabot-npm_and_yarn-packages-store-react-tslib-2.0.1":"0.1.1-beta.1-canary-c5537e2-1597013741274","dependabot-npm_and_yarn-packages-store-react-typedoc-0.18.0":"0.1.1-beta.1-canary-39d837b-1597044562123","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.8.1":"0.1.1-beta.1-canary-cd63221-1597045164274","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-terser-7.0.0":"0.1.1-beta.1-canary-abc2b41-1597045386761","dependabot-npm_and_yarn-packages-store-react-jest-26.3.0":"0.1.1-beta.1-canary-061de1e-1597095763946","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.2.0":"0.1.1-beta.1-canary-0b8a3cf-1597181240320","dependabot-npm_and_yarn-packages-store-react-jest-26.4.0":"0.1.1-beta.1-canary-bacc685-1597288656453","dependabot-npm_and_yarn-packages-store-react-rollup-2.24.0":"0.1.1-beta.1-canary-4af82d8-1597369493904","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-15.0.0":"0.1.1-beta.1-canary-e40839f-1597389143397","dependabot-npm_and_yarn-packages-store-react-rollup-2.25.0":"0.1.1-beta.1-canary-aed1a3c-1597400310359","dependabot-npm_and_yarn-packages-store-react-eslint-7.7.0":"0.1.1-beta.1-canary-732d4e4-1597449692034","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.10":"0.1.1-beta.1-canary-38da98f-1597457773395","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.0":"0.1.1-beta.1-canary-d158b76-1597467256157","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.1":"0.1.1-beta.1-canary-1427c1f-1597553666776","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.2":"0.1.1-beta.1-canary-f9d50eb-1597557955744","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.3":"0.1.1-beta.1-canary-c50c149-1597607688237","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.5":"0.1.1-beta.1-canary-b9d2578-1598079215488","dependabot-npm_and_yarn-packages-store-react-jest-26.4.2":"0.1.1-beta.1-canary-3f0e2dd-1598223404321","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.8.2":"0.1.1-beta.1-canary-fa383a0-1598343690906","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.3.0":"0.1.1-beta.1-canary-f685de9-1598508857310","dependabot-npm_and_yarn-packages-store-react-typescript-4.0.2":"0.1.1-beta.1-canary-43998c9-1598510985256","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.6":"0.1.1-beta.1-canary-16aa897-1598596093522","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.8":"0.1.1-beta.1-canary-ba2da21-1598708177538","dependabot-npm_and_yarn-packages-store-react-typedoc-0.19.0":"0.1.1-beta.1-canary-6ab5d46-1598815061481","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-terser-7.0.1":"0.1.1-beta.1-canary-6366fa9-1598815259024","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.12":"0.1.1-beta.1-canary-b8ce41c-1598968814600","dependabot-npm_and_yarn-packages-store-react-eslint-7.8.0":"0.1.1-beta.1-canary-a065ba4-1598973288208","dependabot-npm_and_yarn-packages-store-react-rollup-2.26.9":"0.1.1-beta.1-canary-3066bf1-1599031365370","dependabot-npm_and_yarn-packages-store-react-eslint-7.8.1":"0.1.1-beta.1-canary-3fe43a9-1599115250298","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.13":"0.1.1-beta.1-canary-43d07cf-1599145638821","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-terser-7.0.2":"0.1.1-beta.1-canary-abd1303-1599333851160","dependabot-npm_and_yarn-packages-store-react-typedoc-0.19.1":"0.1.1-beta.1-canary-063771b-1599339550060","dependabot-npm_and_yarn-packages-store-react-eslint-7.9.0":"0.1.1-beta.1-canary-c911391-1600064326008","NO-TICKET-fix-useSelector":"0.1.1-beta.1-canary-9f7ae79-1600263288658","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.14":"0.1.1-beta.2-canary-c476d40-1600350369731","dependabot-npm_and_yarn-packages-store-react-typescript-4.0.3":"0.1.1-beta.2-canary-feacef1-1600532261431","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.4.0":"0.1.1-beta.2-canary-1c6984e-1600643212102","dependabot-npm_and_yarn-packages-store-react-typedoc-0.19.2":"0.1.1-beta.2-canary-03233c3-1600670609175","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-15.1.0":"0.1.1-beta.2-canary-7856a9a-1600677622997","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.8.3":"0.1.1-beta.2-canary-fe68f73-1600851488654","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-typescript2-0.27.3":"0.1.1-beta.2-canary-4590b9d-1601098178605","dependabot-npm_and_yarn-packages-store-react-eslint-7.10.0":"0.1.1-beta.2-canary-ded541c-1601224095454","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-3.4.2":"0.1.1-beta.2-canary-44c8e71-1601351192886","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.4.1":"0.1.1-beta.2-canary-d38b46e-1601460822878","dependabot-npm_and_yarn-packages-store-react-jest-26.5.0":"0.1.1-beta.2-canary-915a674-1601948323816","NO-TICKET-do-not-try-to-render-after-unmount":"0.1.1-beta.2-canary-56e9547-1602074706867","beta":"0.1.1-beta.3","dependabot-npm_and_yarn-packages-store-react-jest-26.5.2":"0.1.1-beta.3-canary-73b6e46-1602085156348","dependabot-npm_and_yarn-packages-store-react-tslib-2.0.2":"0.1.1-beta.3-canary-98208df-1602116174194","dependabot-npm_and_yarn-packages-store-react-rollup-2.29.0":"0.1.1-beta.3-canary-dd72d9e-1602241814455","dependabot-npm_and_yarn-packages-store-react-eslint-7.11.0":"0.1.1-beta.3-canary-ca49ec3-1602417975162","dependabot-npm_and_yarn-packages-store-react-tslib-2.0.3":"0.1.1-beta.3-canary-f1d0e3e-1602424105587","dependabot-npm_and_yarn-packages-store-react-jest-26.5.3":"0.1.1-beta.3-canary-f0875fa-1602439534490","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.8.4":"0.1.1-beta.3-canary-9e36b69-1602572825586","dependabot-npm_and_yarn-packages-store-react-rollup-2.30.0":"0.1.1-beta.3-canary-3eae580-1602713709909","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-eslint-config-jest-1.2.0":"0.1.1-beta.3-canary-1f22ad0-1602798007027","dependabot-npm_and_yarn-packages-store-react-react-16.14.0":"0.1.1-beta.3-canary-4d8d840-1602813800435","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-eslint-config-2.1.1":"0.1.1-beta.3-canary-8b79721-1602829845850","dependabot-npm_and_yarn-packages-store-react-rollup-2.32.0":"0.1.1-beta.3-canary-322e40a-1603059290368","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-typescript2-0.28.0":"0.1.1-beta.3-canary-19aaa33-1603093538558","dependabot-npm_and_yarn-packages-store-react-jest-26.6.0":"0.1.1-beta.3-canary-09ad371-1603177526176","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.15":"0.1.1-beta.3-canary-079e0ed-1603293610805","dependabot-npm_and_yarn-packages-store-react-react-test-renderer-16.14.0":"0.1.1-beta.3-canary-ce1667f-1603337860474","dependabot-npm_and_yarn-packages-store-react-rollup-2.32.1":"0.1.1-beta.3-canary-f301ea0-1603355729974","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-eslint-config-2.1.2":"0.1.1-beta.3-canary-e1963ab-1603548379847","dependabot-npm_and_yarn-packages-store-react-jest-26.6.1":"0.1.1-beta.3-canary-50878b7-1603615866420","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.4.2":"0.1.1-beta.3-canary-f7c8397-1603635421089","dependabot-npm_and_yarn-packages-store-react-eslint-7.12.0":"0.1.1-beta.3-canary-0be0d59-1603645565945","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.4.3":"0.1.1-beta.3-canary-ba957e5-1603830468750","dependabot-npm_and_yarn-packages-store-react-typescript-4.0.5":"0.1.1-beta.3-canary-66d97a7-1603838863279","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-10.0.0":"0.1.1-beta.3-canary-a819648-1603843151765","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-16.0.0":"0.1.1-beta.3-canary-9b1698c-1603952768991","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.8.5":"0.1.1-beta.3-canary-1132fb7-1604048539714","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-typescript2-0.29.0":"0.1.1-beta.3-canary-7fa3f70-1604107114981","dependabot-npm_and_yarn-packages-store-react-rollup-2.33.0":"0.1.1-beta.3-canary-09800f0-1604257056997","dependabot-npm_and_yarn-packages-store-react-rollup-2.33.1":"0.1.1-beta.3-canary-af8f0cf-1604310993262","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-eslint-config-2.1.3":"0.1.1-beta.3-canary-52535f1-1604313874176","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-eslint-config-jest-1.2.1":"0.1.1-beta.3-canary-06a235f-1604314279687","dependabot-npm_and_yarn-packages-store-react-eslint-7.12.1":"0.1.1-beta.3-canary-8c18963-1604321244252","dependabot-npm_and_yarn-packages-store-react-jest-26.6.2":"0.1.1-beta.3-canary-cf71b27-1604324151350","dependabot-npm_and_yarn-packages-store-react-jest-26.6.3":"0.1.1-beta.3-canary-9bb5d30-1604480405847","dependabot-npm_and_yarn-packages-store-react-eslint-7.13.0":"0.1.1-beta.3-canary-7d772d6-1604714929053","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-store-0.1.1-beta.2":"0.1.1-beta.3-canary-4ce6ba1-1604843774715","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-store-1.0.0":"0.1.1-beta.3-canary-1c84794-1604845647127","NO-TICKET-store-react-v1":"0.1.1-beta.3-canary-8d9d9a9-1604847184758","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.4.4":"1.0.0-canary-a80f982-1604849641806","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.8.6":"1.0.0-canary-b339242-1605296673805","dependabot-npm_and_yarn-packages-store-react-rollup-2.33.2":"1.0.0-canary-f0d7a47-1605363896517","dependabot-npm_and_yarn-packages-store-react-rollup-2.33.3":"1.0.0-canary-bc2044a-1605689043919","dependabot-npm_and_yarn-packages-store-react-eslint-7.14.0":"1.0.0-canary-b7225e9-1605912888030","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.9.0":"1.0.0-canary-e5bd7d2-1606127962817","dependabot-npm_and_yarn-packages-store-react-rollup-2.34.0":"1.0.0-canary-b42218a-1606630078909","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-17.0.0":"1.0.0-canary-d8f466c-1606808728114","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-11.0.0":"1.0.0-canary-f54d0d0-1606809112127","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.9.1":"1.0.0-canary-39cd78e-1606839805125","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.16":"1.0.0-canary-571490e-1606864551369","dependabot-npm_and_yarn-packages-store-react-rollup-2.34.1":"1.0.0-canary-479bf76-1606984128438","dependabot-npm_and_yarn-packages-store-react-highlight.js-10.4.1":"1.0.0-canary-9df56b3-1607112633377","dependabot/npm_and_yarn/packages/store-react/highlight.js-10.4.1":"1.0.0-canary-535ca2c-1607112746114","dependabot-npm_and_yarn-packages-store-react-eslint-7.15.0":"1.0.0-canary-35ee376-1607156451117","dependabot-npm_and_yarn-packages-store-react-rollup-2.34.2":"1.0.0-canary-d3ffc32-1607234665033","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-3.5.0":"1.0.0-canary-263fcdf-1607255882096","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-3.6.0":"1.0.0-canary-364ca1e-1607342434099","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.17":"1.0.0-canary-8915322-1607405148731","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-3.7.0":"1.0.0-canary-f83405c-1607421073163","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.18":"1.0.0-canary-9236731-1607461531131","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.19":"1.0.0-canary-5575454-1607642142770","dependabot-npm_and_yarn-packages-store-react-rollup-2.35.0":"1.0.0-canary-86c7591-1607945545179","dependabot-npm_and_yarn-packages-store-react-rollup-2.35.1":"1.0.0-canary-c83a784-1607957983914","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-11.0.1":"1.0.0-canary-09d8d6b-1607958472748","dependabot-npm_and_yarn-packages-store-react-eslint-7.16.0":"1.0.0-canary-867ec35-1608328929041","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.9.2":"1.0.0-canary-c1882ac-1609165025425","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.0":"1.0.0-canary-d6c63a8-1609181407613","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.1":"1.0.0-canary-799f0bc-1609219587922","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.2":"1.0.0-canary-048ef93-1609264799433","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.3":"1.0.0-canary-6504eb1-1609272426551","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.4":"1.0.0-canary-2dd06aa-1609286730461","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.5":"1.0.0-canary-53aff9f-1609363170397","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.6":"1.0.0-canary-3dfa82a-1609465246292","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.7":"1.0.0-canary-2512319-1609492812645","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.8":"1.0.0-canary-e0de39d-1609541253072","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.9":"1.0.0-canary-53858a0-1609564087425","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.10":"1.0.0-canary-d6c9d41-1609638938212","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.11":"1.0.0-canary-c651600-1609791576723","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.12":"1.0.0-canary-732f569-1609806760086","dependabot-npm_and_yarn-packages-store-react-eslint-7.17.0":"1.0.0-canary-004f0db-1609975105269","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.13":"1.0.0-canary-9102e2c-1610061559640","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-4.0.0":"1.0.0-canary-92de13f-1610406985968","dependabot/npm_and_yarn/packages/store-react/node-notifier-8.0.1":"1.0.0-canary-e7e71be-1610407103851","dependabot-npm_and_yarn-packages-store-react-node-notifier-8.0.1":"1.0.0-canary-2dca6a9-1610444441721","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.9.3":"1.0.0-canary-08df268-1610445787910","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.14":"1.0.0-canary-930f7eb-1610447701917","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-4.0.1":"1.0.0-canary-dbb7a5e-1610452394649","dependabot-npm_and_yarn-packages-store-react-typescript-4.1.3":"1.0.0-canary-b423708-1610580061236","dependabot-npm_and_yarn-packages-store-react-eslint-7.18.0":"1.0.0-canary-1f3a86b-1610752735485","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.15":"1.0.0-canary-60ae86f-1610820735862","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.16":"1.0.0-canary-9ebf8bf-1610850981307","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-11.1.0":"1.0.0-canary-7491e08-1610963473682","dependabot-npm_and_yarn-packages-store-react-rollup-2.36.2":"1.0.0-canary-8841631-1610964870265","dependabot-npm_and_yarn-packages-store-react-rollup-2.37.0":"1.0.0-canary-63caebe-1611046544433","dependabot-npm_and_yarn-packages-store-react-rollup-2.37.1":"1.0.0-canary-7df7296-1611147638919","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-5.0.0":"1.0.0-canary-434fab4-1611270960407","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-5.0.2":"1.0.0-canary-be17ffe-1611312120665","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.17":"1.0.0-canary-f145574-1611433263779","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.18":"1.0.0-canary-a70d686-1611517253226","dependabot-npm_and_yarn-packages-store-react-rollup-2.38.0":"1.0.0-canary-01eee21-1611571665816","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-eslint-config-2.2.0":"1.0.0-canary-1890b09-1611591137036","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-5.0.3":"1.0.0-canary-accde03-1611789349345","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.19":"1.0.0-canary-36141cd-1611789349673","dependabot-npm_and_yarn-packages-store-react-rollup-2.38.1":"1.0.0-canary-d87cde6-1611875751780","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.5.0":"1.0.0-canary-1aeeefa-1611928477131","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.20":"1.0.0-canary-d722f99-1612125109860","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-17.1.0":"1.0.0-canary-134a838-1612171616029","dependabot-npm_and_yarn-packages-store-react-rollup-2.38.3":"1.0.0-canary-f03d3ae-1612221388931","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-11.1.1":"1.0.0-canary-7ac5529-1612262929719","dependabot-npm_and_yarn-packages-store-react-rollup-2.38.4":"1.0.0-canary-de0a30c-1612282289651","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.9.4":"1.0.0-canary-b03e253-1612357205782","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.9.5":"1.0.0-canary-95d6bf2-1612443124753","dependabot-npm_and_yarn-packages-store-react-rollup-2.38.5":"1.0.0-canary-1e28cb2-1612528685314","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.21":"1.0.0-canary-aa084c8-1612548391303","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.22":"1.0.0-canary-14f86bc-1612628825786","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.23":"1.0.0-canary-550d17e-1612739844135","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.5.1":"1.0.0-canary-5a16d3d-1612876353841","dependabot-npm_and_yarn-packages-store-react-typescript-4.1.4":"1.0.0-canary-a4f58aa-1612897614628","dependabot-npm_and_yarn-packages-store-react-typescript-4.1.5":"1.0.0-canary-9d20744-1612990087243","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.24":"1.0.0-canary-b668d75-1613061816105","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.25":"1.0.0-canary-31d233c-1613382979870","dependabot-npm_and_yarn-packages-store-react-eslint-7.20.0":"1.0.0-canary-04cbbda-1613383596461","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.20":"1.0.0-canary-37d0747-1613385595470","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-11.2.0":"1.0.0-canary-850cb9a-1613393362701","dependabot-npm_and_yarn-packages-store-react-rollup-2.39.0":"1.0.0-canary-b08805a-1613394614953","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.26":"1.0.0-canary-7b489dc-1613791367490","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.27":"1.0.0-canary-f621381-1613949368391","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-typescript2-0.30.0":"1.0.0-canary-a756664-1613984643925","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-multi-input-1.2.0":"1.0.0-canary-d715ff6-1614002165868","NO-TICKET-DepsReact":"1.0.0-canary-f4cedf8-1614009445956","NO-TICKET-StoreFixDocsReact":"1.0.0-canary-fe721a8-1614015002988","dependabot-npm_and_yarn-packages-store-react-tslib-2.1.0":"1.1.0-canary-0af420f-1614036924607","dependabot-npm_and_yarn-packages-store-react-iadvize-oss-store-1.1.0":"1.1.0-canary-2f183bd-1614070283089","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.28":"1.1.0-canary-018f668-1614071013109","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.5.2":"1.1.0-canary-9a689a0-1614122203954","dependabot-npm_and_yarn-packages-store-react-rollup-2.39.1":"1.1.0-canary-96b23eb-1614182698292","dependabot-npm_and_yarn-packages-store-react-typescript-4.2.2":"1.1.0-canary-5c23158-1614257077015","NO-TICKET-React17":"1.1.0-canary-6092749-1614261232496","dependabot-npm_and_yarn-packages-store-react-rollup-2.40.0":"1.1.0-canary-7758fbb-1614356293086","dependabot-npm_and_yarn-packages-store-react-eslint-7.21.0":"1.1.0-canary-a01048c-1614554889137","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-5.1.0":"1.1.0-canary-60663c1-1614628206977","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.29":"1.1.0-canary-f4553bc-1614849582842","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.5.3":"1.1.0-canary-e8f7c22-1614851454877","dependabot-npm_and_yarn-packages-store-react-typescript-4.2.3":"1.1.0-canary-8a83dbb-1614955155462","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.30":"1.1.0-canary-b5fb06b-1615048062652","dependabot-npm_and_yarn-packages-store-react-rollup-2.41.0":"1.1.0-canary-3fc277e-1615300490879","dependabot-npm_and_yarn-packages-store-react-rollup-2.41.1":"1.1.0-canary-0ae88e6-1615440304312","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.31":"1.1.0-canary-7a36b2e-1615693926558","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.32":"1.1.0-canary-f17a854-1615752335519","dependabot-npm_and_yarn-packages-store-react-eslint-7.22.0":"1.1.0-canary-3c7141d-1615798716909","dependabot-npm_and_yarn-packages-store-react-rollup-2.41.2":"1.1.0-canary-6d8c760-1615799406776","dependabot-npm_and_yarn-packages-store-react-rollup-2.41.3":"1.1.0-canary-5dd6f72-1615887635370","dependabot-npm_and_yarn-packages-store-react-rollup-2.41.4":"1.1.0-canary-5f7567e-1615907906665","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.5.4":"1.1.0-canary-f75f883-1616057079475","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.21":"1.1.0-canary-2cc937d-1616057331977","dependabot-npm_and_yarn-packages-store-react-rollup-2.41.5":"1.1.0-canary-f3f4e49-1616063690360","dependabot-npm_and_yarn-packages-store-react-rollup-2.42.0":"1.1.0-canary-34663c3-1616151437487","dependabot-npm_and_yarn-packages-store-react-rollup-2.42.1":"1.1.0-canary-5c59ff2-1616220423752","dependabot-npm_and_yarn-packages-store-react-react-17.0.1":"1.1.0-canary-c431d44-1616369058581","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.33":"1.1.0-canary-6e66927-1616376505153","dependabot-npm_and_yarn-packages-store-react-rollup-2.42.2":"1.1.0-canary-aee7ee9-1616404804013","dependabot-npm_and_yarn-packages-store-react-rollup-2.42.3":"1.1.0-canary-9017604-1616424917138","dependabot-npm_and_yarn-packages-store-react-react-17.0.2":"1.1.0-canary-390d82c-1616451190163","dependabot-npm_and_yarn-packages-store-react-react-test-renderer-17.0.2":"1.1.0-canary-f5364de-1616517308630","dependabot-npm_and_yarn-packages-store-react-rollup-2.42.4":"1.1.0-canary-9be6221-1616627771881","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.34":"1.1.0-canary-f9cbd8b-1616663743293","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.22":"1.1.0-canary-80cbd69-1616756205429","dependabot-npm_and_yarn-packages-store-react-rollup-2.43.0":"1.1.0-canary-d9e4605-1616823830303","dependabot-npm_and_yarn-packages-store-react-rollup-2.43.1":"1.1.0-canary-d9e0a3f-1616973229653","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-11.2.1":"1.1.0-canary-3115ce2-1617003687103","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-18.0.0":"1.1.0-canary-9512afe-1617008611021","dependabot-npm_and_yarn-packages-store-react-eslint-7.23.0":"1.1.0-canary-2737ad9-1617008831209","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-5.1.1":"1.1.0-canary-0f185cc-1617046645781","dependabot-npm_and_yarn-packages-store-react-rollup-2.44.0":"1.1.0-canary-237f4b3-1617105290057","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.35":"1.1.0-canary-8f3e3d5-1617578043426","dependabot-npm_and_yarn-packages-store-react-tslib-2.2.0":"1.1.0-canary-f16d3d2-1617698458777","dependabot-npm_and_yarn-packages-store-react-typescript-4.2.4":"1.1.0-canary-89de927-1617920152491","dependabot-npm_and_yarn-packages-store-react-rollup-2.45.0":"1.1.0-canary-b4ecdb3-1617945941787","dependabot-npm_and_yarn-packages-store-react-eslint-7.24.0":"1.1.0-canary-6448d73-1618006533832","dependabot-npm_and_yarn-packages-store-react-rollup-2.45.1":"1.1.0-canary-206f710-1618179827866","dependabot-npm_and_yarn-packages-store-react-rollup-2.45.2":"1.1.0-canary-832ae77-1618352157518","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.10.0":"1.1.0-canary-01c3644-1618395597586","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.10.1":"1.1.0-canary-1c03250-1619009801215","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-5.1.2":"1.1.0-canary-16bdce8-1619101969398","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.10.4":"1.1.0-canary-6d0578d-1619163397056","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.5.5":"1.1.0-canary-9d6a729-1619164505487","dependabot-npm_and_yarn-packages-store-react-typedoc-0.20.36":"1.1.0-canary-77721ae-1619168673125","dependabot-npm_and_yarn-packages-store-react-eslint-7.25.0":"1.1.0-canary-346ce6b-1619423010743","dependabot-npm_and_yarn-packages-store-react-types-jest-26.0.23":"1.1.0-canary-0800860-1619615551516","dependabot-npm_and_yarn-packages-store-react-rollup-2.46.0":"1.1.0-canary-d57c0d1-1619682849414","dependabot-npm_and_yarn-packages-store-react-fp-ts-2.10.5":"1.1.0-canary-c0c05e5-1620027971511","dependabot-npm_and_yarn-packages-store-react-rollup-2.47.0":"1.1.0-canary-3da750a-1620105668153","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-node-resolve-13.0.0":"1.1.0-canary-a08ba9b-1620200955525","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-18.1.0":"1.1.0-canary-419efd5-1620207260494","dependabot-npm_and_yarn-packages-store-react-ts-jest-26.5.6":"1.1.0-canary-6418651-1620293397770","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-commonjs-19.0.0":"1.1.0-canary-a4f06ff-1620399645072","dependabot-npm_and_yarn-packages-store-react-eslint-7.26.0":"1.1.0-canary-33bb5ca-1620633625996","dependabot-npm_and_yarn-packages-store-react-rollup-2.48.0":"1.1.0-canary-76ab417-1621237140062","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-multi-input-1.3.0":"1.1.0-canary-6c16679-1621454100384","dependabot-npm_and_yarn-packages-store-react-eslint-7.27.0":"1.1.0-canary-1b401c1-1621646873563","dependabot-npm_and_yarn-packages-store-react-rollup-2.49.0":"1.1.0-canary-8180b90-1621843204320","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-6.0.0":"1.1.0-canary-6abc543-1621846255279","dependabot-npm_and_yarn-packages-store-react-testing-library-react-hooks-7.0.0":"1.1.0-canary-9c25e5b-1621928750906","dependabot-npm_and_yarn-packages-store-react-jest-27.0.0":"1.1.0-canary-bfc00d6-1621933747039","dependabot-npm_and_yarn-packages-store-react-jest-27.0.1":"1.1.0-canary-1248e3f-1621958927080","dependabot-npm_and_yarn-packages-store-react-rollup-2.50.0":"1.1.0-canary-f3c5b88-1621960368938","dependabot-npm_and_yarn-packages-store-react-ts-jest-27.0.0":"1.1.0-canary-462d438-1621981219492","dependabot-npm_and_yarn-packages-store-react-rollup-2.50.1":"1.1.0-canary-1693d37-1622019003871","dependabot-npm_and_yarn-packages-store-react-typescript-4.3.2":"1.1.0-canary-d9a2d90-1622050597707","dependabot-npm_and_yarn-packages-store-react-ts-jest-27.0.1":"1.1.0-canary-15ecfd8-1622070645055","dependabot-npm_and_yarn-packages-store-react-rollup-plugin-multi-input-1.3.1":"1.1.0-canary-4a8d6c2-1622108088041","dependabot-npm_and_yarn-packages-store-react-rollup-2.50.2":"1.1.0-canary-769cd86-1622114990127","dependabot-npm_and_yarn-packages-store-react-rollup-2.50.3":"1.1.0-canary-133b5dc-1622214069469","dependabot-npm_and_yarn-packages-store-react-rollup-2.50.4":"1.1.0-canary-834045c-1622263620329","dependabot-npm_and_yarn-packages-store-react-jest-27.0.2":"1.1.0-canary-ccfedc4-1622292694988","dependabot-npm_and_yarn-packages-store-react-jest-27.0.3":"1.1.0-canary-c299acf-1622312686306","dependabot-npm_and_yarn-packages-store-react-rollup-2.50.5":"1.1.0-canary-b88e904-1622414498314","dependabot-npm_and_yarn-packages-store-react-ts-jest-27.0.2":"1.1.0-canary-4f77dbf-1622439560390","NO-TICKET-Dependencies":"1.1.0-canary-e80e333-1622471332788","NO-TICKET-DependenciesReact":"1.1.1-canary-5dd39c6-1622474068265","dependabot/npm_and_yarn/packages/store-react/rollup-2.50.6":"1.1.2-canary-3dde23e-1622794345872","dependabot/npm_and_yarn/packages/store-react/jest-27.0.4":"1.1.2-canary-96c3822-1622794580892","dependabot/npm_and_yarn/packages/store-react/rollup-2.51.0":"1.1.2-canary-f70971b-1623055806010","dependabot/npm_and_yarn/packages/store-react/ts-jest-27.0.3":"1.1.2-canary-f06a303-1623056875157","dependabot/npm_and_yarn/packages/store-react/eslint-7.28.0":"1.1.2-canary-40c3ffb-1623070545376","dependabot/npm_and_yarn/packages/store-react/rollup-2.51.1":"1.1.2-canary-a8a8bf6-1623242948231","dependabot/npm_and_yarn/packages/store-react/tslib-2.3.0":"1.1.2-canary-3631be7-1623668119271","dependabot/npm_and_yarn/packages/store-react/rollup-2.51.2":"1.1.2-canary-5f4ebd3-1623686637631","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.0":"1.1.2-canary-ef86f58-1623895567690","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.1":"1.1.2-canary-6ba0e3f-1623917712623","dependabot/npm_and_yarn/packages/store-react/typedoc-0.20.37":"1.1.2-canary-4c08875-1623918543146","dependabot/npm_and_yarn/packages/store-react/typescript-4.3.3":"1.1.2-canary-3552985-1623920555551","dependabot/npm_and_yarn/packages/store-react/typescript-4.3.4":"1.1.2-canary-9a2b0af-1624002511996","dependabot/npm_and_yarn/packages/store-react/typedoc-0.21.0":"1.1.2-canary-5d80fe7-1624263868531","dependabot/npm_and_yarn/packages/store-react/eslint-7.29.0":"1.1.2-canary-5849805-1624264389903","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.2":"1.1.2-canary-c89244e-1624359395530","dependabot/npm_and_yarn/packages/store-react/jest-27.0.5":"1.1.2-canary-8f98b03-1624413860431","dependabot/npm_and_yarn/packages/store-react/typedoc-0.21.2":"1.1.2-canary-c71afe9-1624882059092","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.3":"1.1.2-canary-23c429c-1624884004462","dependabot/npm_and_yarn/packages/store-react/jest-27.0.6":"1.1.2-canary-8e724df-1624953976756","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.4":"1.1.2-canary-a0c26e0-1625105147950","dependabot/npm_and_yarn/packages/store-react/testing-library/react-hooks-7.0.1":"1.1.2-canary-7798cf7-1625130712909","dependabot/npm_and_yarn/packages/store-react/typescript-4.3.5":"1.1.2-canary-c87127a-1625131302420","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.6":"1.1.2-canary-4781e40-1625154639338","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.7":"1.1.2-canary-354d723-1625473060404","dependabot/npm_and_yarn/packages/store-react/eslint-7.30.0":"1.1.2-canary-e2cc81d-1625473278576","dependabot/npm_and_yarn/packages/store-react/types/jest-26.0.24":"1.1.2-canary-647f947-1625642850628","dependabot/npm_and_yarn/packages/store-react/rollup-2.52.8":"1.1.2-canary-902548c-1625736694643","dependabot/npm_and_yarn/packages/store-react/typedoc-0.21.4":"1.1.2-canary-a130203-1626095519564","dependabot/npm_and_yarn/packages/store-react/rollup-2.53.1":"1.1.2-canary-e9c6db7-1626097496816","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-19.0.1":"1.1.2-canary-518a1ec-1626436937408","dependabot/npm_and_yarn/packages/store-react/rollup-2.53.2":"1.1.2-canary-31a768f-1626437973147","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-13.0.2":"1.1.2-canary-e450628-1626439139686","dependabot/npm_and_yarn/packages/store-react/eslint-7.31.0":"1.1.2-canary-70dde0d-1626695472724","dependabot/npm_and_yarn/packages/store-react/rollup-2.53.3":"1.1.2-canary-f46f94b-1626941026566","dependabot/npm_and_yarn/packages/store-react/ts-jest-27.0.4":"1.1.2-canary-298df1f-1626942588853","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-13.0.4":"1.1.2-canary-0a67cb5-1627292906558","dependabot/npm_and_yarn/packages/store-react/rollup-2.54.0":"1.1.2-canary-f029377-1627293412099","dependabot/npm_and_yarn/packages/store-react/fp-ts-2.11.0":"1.1.2-canary-479d536-1627371646727","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-19.0.2":"1.1.2-canary-0bafb30-1627378561656","dependabot/npm_and_yarn/packages/store-react/rollup-2.55.0":"1.1.2-canary-dd08812-1627548509771","dependabot/npm_and_yarn/packages/store-react/fp-ts-2.11.1":"1.1.2-canary-2f1ca76-1627548752291","dependabot/npm_and_yarn/packages/store-react/rollup-2.55.1":"1.1.2-canary-7056406-1627631677038","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-20.0.0":"1.1.2-canary-d67a93d-1627869875985","dependabot/npm_and_yarn/packages/store-react/typedoc-0.21.5":"1.1.2-canary-d67a93d-1627869907840","dependabot/npm_and_yarn/packages/store-react/eslint-7.32.0":"1.1.2-canary-d67a93d-1627869898943","dependabot/npm_and_yarn/packages/store-react/rollup-2.56.0":"1.1.2-canary-d67a93d-1628218606047","dependabot/npm_and_yarn/packages/store-react/rollup-2.56.1":"1.1.2-canary-d67a93d-1628474647383","dependabot/npm_and_yarn/packages/store-react/rollup-2.56.2":"1.1.2-canary-d67a93d-1628647542731","dependabot/npm_and_yarn/packages/store-react/typedoc-0.21.6":"1.1.2-canary-d67a93d-1629425031235","dependabot/npm_and_yarn/packages/store-react/rollup-2.56.3":"1.1.2-canary-d67a93d-1629770685355","dependabot/npm_and_yarn/packages/store-react/typedoc-0.21.9":"1.1.2-canary-d67a93d-1630289079081","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.3":"1.1.2-canary-d67a93d-1631498792628","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.4":"1.1.2-canary-d67a93d-1632103574145","dependabot/npm_and_yarn/packages/store-react/rollup-2.57.0":"1.1.2-canary-d67a93d-1632362727891","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.5":"1.1.2-canary-d67a93d-1633313489902","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-21.0.0":"1.1.2-canary-d67a93d-1633313522188","dependabot/npm_and_yarn/packages/store-react/rollup-2.58.0":"1.1.2-canary-d67a93d-1633313550714","dependabot/npm_and_yarn/packages/store-react/eslint-8.0.0":"1.1.2-canary-d67a93d-1633918113970","dependabot/npm_and_yarn/packages/store-react/eslint-8.0.1":"1.1.2-canary-d67a93d-1634266721163","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.6":"1.1.2-canary-d67a93d-1634522684450","dependabot/npm_and_yarn/packages/store-react/eslint-8.1.0":"1.1.2-canary-d67a93d-1635127720322","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.7":"1.1.2-canary-d67a93d-1635127781356","dependabot/npm_and_yarn/packages/store-react/rollup-2.58.3":"1.1.2-canary-d67a93d-1635213919249","dependabot/npm_and_yarn/packages/store-react/rollup-2.59.0":"1.1.2-canary-d67a93d-1635818725149","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.8":"1.1.2-canary-d67a93d-1636337272893","dependabot/npm_and_yarn/packages/store-react/eslint-8.2.0":"1.1.2-canary-d67a93d-1636337338557","dependabot/npm_and_yarn/packages/store-react/rollup-2.60.0":"1.1.2-canary-d67a93d-1636941921488","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.9":"1.1.2-canary-d67a93d-1636941947089","dependabot/npm_and_yarn/packages/store-react/eslint-8.3.0":"1.1.2-canary-d67a93d-1637546963235","dependabot/npm_and_yarn/packages/store-react/rollup-2.60.1":"1.1.2-canary-d67a93d-1637633190895","dependabot/npm_and_yarn/packages/store-react/rollup-2.60.2":"1.1.2-canary-d67a93d-1638324424727","dependabot/npm_and_yarn/packages/store-react/eslint-8.4.0":"1.1.2-canary-d67a93d-1638756488093","dependabot/npm_and_yarn/packages/store-react/eslint-8.4.1":"1.1.2-canary-d67a93d-1638842826265","dependabot/npm_and_yarn/packages/store-react/rollup-2.61.0":"1.1.2-canary-d67a93d-1639102053584","dependabot/npm_and_yarn/packages/store-react/rollup-2.61.1":"1.1.2-canary-d67a93d-1639361247857","dependabot/npm_and_yarn/packages/store-react/eslint-8.5.0":"1.1.2-canary-d67a93d-1639966025178","dependabot/npm_and_yarn/packages/store-react/rollup-2.62.0":"1.1.2-canary-d67a93d-1640571026952","dependabot/npm_and_yarn/packages/store-react/rollup-2.63.0":"1.1.2-canary-d67a93d-1641348472510","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-21.0.1":"1.1.2-canary-f39ec38-1641482195236","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.10":"1.1.2-canary-f39ec38-1641482257761","dependabot/npm_and_yarn/packages/store-react/eslint-8.6.0":"1.1.2-canary-f39ec38-1641482261684","dependabot/npm_and_yarn/packages/store-react/eslint-8.7.0":"1.1.2-canary-10271fc-1642385231908","dependabot/npm_and_yarn/packages/store-react/eslint-8.8.0":"1.1.2-canary-10271fc-1643594831788","NO-TICKET-updatePeerDep":"1.1.2-canary-10271fc-1644906796880","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-13.1.3":"1.1.2-canary-76b1459-1644907065335","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.11":"1.1.2-canary-76b1459-1644907127070","NO-TICKET-fixVersion":"1.1.3-canary-0adfe8d-1644909078651","dependabot/npm_and_yarn/packages/store-react/ansi-regex-5.0.1":"1.1.3-canary-0c81dee-1644909345004","dependabot/npm_and_yarn/packages/store-react/tslib-2.3.1":"1.1.4-canary-08d62d2-1644909403598","latest":"1.1.4","dependabot/npm_and_yarn/packages/store-react/eslint-8.9.0":"1.1.4-canary-08d62d2-1644909470221","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.12":"1.1.4-canary-08d62d2-1645409247495","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-21.0.2":"1.1.4-canary-08d62d2-1645668395191","dependabot/npm_and_yarn/packages/store-react/eslint-8.10.0":"1.1.4-canary-08d62d2-1646014211312","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.13":"1.1.4-canary-08d62d2-1646618832524","dependabot/npm_and_yarn/packages/store-react/eslint-8.11.0":"1.1.4-canary-08d62d2-1647223512417","dependabot/npm_and_yarn/packages/store-react/minimist-1.2.6":"1.1.4-canary-08d62d2-1648344685351","dependabot/npm_and_yarn/packages/store-react/eslint-8.12.0":"1.1.4-canary-08d62d2-1648433190444","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-21.0.3":"1.1.4-canary-08d62d2-1648433276189","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.14":"1.1.4-canary-08d62d2-1649383662491","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.15":"1.1.4-canary-08d62d2-1649642903148","dependabot/npm_and_yarn/packages/store-react/eslint-8.13.0":"1.1.4-canary-08d62d2-1649642973154","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-13.2.0":"1.1.4-canary-08d62d2-1649730843309","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-commonjs-21.1.0":"1.1.4-canary-08d62d2-1650247773693","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-13.2.1":"1.1.4-canary-08d62d2-1650247866656","dependabot/npm_and_yarn/packages/store-react/tslib-2.4.0":"1.1.4-canary-08d62d2-1650593207287","dependabot/npm_and_yarn/packages/store-react/eslint-8.14.0":"1.1.4-canary-08d62d2-1650855616454","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-13.3.0":"1.1.4-canary-08d62d2-1651543660362","dependabot/npm_and_yarn/packages/store-react/eslint-8.15.0":"1.1.4-canary-08d62d2-1652063621200","dependabot/npm_and_yarn/packages/store-react/eslint-8.16.0":"1.1.4-canary-08d62d2-1653271704210","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.16":"1.1.4-canary-08d62d2-1653962660149","dependabot/npm_and_yarn/packages/store-react/typedoc-0.22.17":"1.1.4-canary-08d62d2-1654050625671","dependabot/npm_and_yarn/packages/store-react/eslint-8.17.0":"1.1.4-canary-08d62d2-1654481324805","dependabot/npm_and_yarn/packages/store-react/eslint-8.18.0":"1.1.4-canary-08d62d2-1655690951107","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.1":"1.1.4-canary-08d62d2-1656296642960","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.2":"1.1.4-canary-08d62d2-1656382065611","dependabot/npm_and_yarn/packages/store-react/eslint-8.19.0":"1.1.4-canary-08d62d2-1656900720335","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.5":"1.1.4-canary-08d62d2-1656900744901","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.6":"1.1.4-canary-08d62d2-1657246100114","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.7":"1.1.4-canary-08d62d2-1657505600413","dependabot/npm_and_yarn/packages/store-react/eslint-8.20.0":"1.1.4-canary-08d62d2-1658110075597","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.8":"1.1.4-canary-08d62d2-1658110085524","dependabot/npm_and_yarn/packages/store-react/terser-5.14.2":"1.1.4-canary-08d62d2-1658281559283","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.9":"1.1.4-canary-08d62d2-1658714967414","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.10":"1.1.4-canary-08d62d2-1659320321168","dependabot/npm_and_yarn/packages/store-react/eslint-8.21.0":"1.1.4-canary-08d62d2-1659405992433","dependabot/npm_and_yarn/packages/store-react/eslint-8.22.0":"1.1.4-canary-08d62d2-1660529353179","dependabot/npm_and_yarn/packages/store-react/eslint-8.23.0":"1.1.4-canary-08d62d2-1661739147810","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.11":"1.1.4-canary-08d62d2-1661739172277","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.13":"1.1.4-canary-08d62d2-1661998208581","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.14":"1.1.4-canary-08d62d2-1662382493297","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-14.0.0":"1.1.4-canary-08d62d2-1662516358428","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-14.0.1":"1.1.4-canary-08d62d2-1662689258630","dependabot/npm_and_yarn/packages/store-react/eslint-8.23.1":"1.1.4-canary-08d62d2-1663035014603","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-14.1.0":"1.1.4-canary-08d62d2-1663035052283","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.15":"1.1.4-canary-08d62d2-1663553463055","dependabot/npm_and_yarn/packages/store-react/eslint-8.24.0":"1.1.4-canary-08d62d2-1664158139643","dependabot/npm_and_yarn/packages/store-react/eslint-8.25.0":"1.1.4-canary-08d62d2-1665367705610","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.16":"1.1.4-canary-08d62d2-1665453997031","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-15.0.0":"1.1.4-canary-08d62d2-1665454082314","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.17":"1.1.4-canary-08d62d2-1666145352392","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.18":"1.1.4-canary-08d62d2-1666577126807","dependabot/npm_and_yarn/packages/store-react/eslint-8.26.0":"1.1.4-canary-08d62d2-1666577206572","dependabot/npm_and_yarn/packages/store-react/rollup/plugin-node-resolve-15.0.1":"1.1.4-canary-08d62d2-1666577251684","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.19":"1.1.4-canary-08d62d2-1667181980182","dependabot/npm_and_yarn/packages/store-react/tslib-2.4.1":"1.1.4-canary-08d62d2-1667268847866","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.20":"1.1.4-canary-08d62d2-1667873070683","dependabot/npm_and_yarn/packages/store-react/eslint-8.27.0":"1.1.4-canary-08d62d2-1667873385041","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.21":"1.1.4-canary-08d62d2-1668391543348","dependabot/npm_and_yarn/packages/store-react/eslint-8.28.0":"1.1.4-canary-08d62d2-1668996777654","dependabot/npm_and_yarn/packages/store-react/eslint-8.29.0":"1.1.4-canary-08d62d2-1670205766330","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.22":"1.1.4-canary-08d62d2-1670810716185","dependabot/npm_and_yarn/packages/store-react/eslint-8.30.0":"1.1.4-canary-08d62d2-1671415505895","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.23":"1.1.4-canary-08d62d2-1671415532548","dependabot/npm_and_yarn/packages/store-react/json5-and-tsconfig-paths-2.2.3":"1.1.4-canary-08d62d2-1672608204519","dependabot/npm_and_yarn/packages/store-react/eslint-8.31.0":"1.1.4-canary-08d62d2-1672625013680","dependabot/npm_and_yarn/packages/store-react/json5-1.0.2":"1.1.4-canary-08d62d2-1673120778147","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.24":"1.1.4-canary-08d62d2-1673229790610","dependabot/npm_and_yarn/packages/store-react/eslint-8.32.0":"1.1.4-canary-08d62d2-1673836263018","dependabot/npm_and_yarn/packages/store-react/tslib-2.5.0":"1.1.4-canary-08d62d2-1674785018983","dependabot/npm_and_yarn/packages/store-react/eslint-8.33.0":"1.1.4-canary-08d62d2-1675044768134","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.25":"1.1.4-canary-08d62d2-1676258284097","dependabot/npm_and_yarn/packages/store-react/eslint-8.34.0":"1.1.4-canary-08d62d2-1676258313114","dependabot/npm_and_yarn/packages/store-react/eslint-8.35.0":"1.1.4-canary-08d62d2-1677467462786","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.26":"1.1.4-canary-08d62d2-1677467538586","dependabot/npm_and_yarn/packages/store-react/minimist-1.2.8":"1.1.4-canary-08d62d2-1677988599455","dependabot/npm_and_yarn/packages/store-react/eslint-8.36.0":"1.1.4-canary-08d62d2-1678676369290","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.27":"1.1.4-canary-08d62d2-1679021951344","dependabot/npm_and_yarn/packages/store-react/typedoc-0.23.28":"1.1.4-canary-08d62d2-1679281084597","dependabot/npm_and_yarn/packages/store-react/eslint-8.37.0":"1.1.4-canary-08d62d2-1680058818827"},"versions":{"0.0.0-canary-ed1b139-1593804726082":{"name":"@iadvize-oss/store-react","version":"0.0.0-canary-ed1b139-1593804726082","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.0.0-canary-ed1b139-1593804726082","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5dd25f6994e1c23883a9dc2f2d769cb246bc596e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.0.0-canary-ed1b139-1593804726082.tgz","fileCount":7,"integrity":"sha512-aFtu8JjnzBu1IexlLDQeIGnrdmi9FkE4VwjmifZ8CVgsCkZcu4Huey26ousrvF5qVbGrOfVWIPTnOGgcy/OfDA==","signatures":[{"sig":"MEQCID3LzC0uhZLkgHQhWUnu74MMHFCCZpd+xXhzOo6NgX+2AiBbQbxMlqdNG4vpL22mFbe20rg3KFlTpURsqO7+ps3DnA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/4fzCRA9TVsSAnZWagAANLoQAJx9r9qtGeziamJIRG7E\n5GZ/5KyJ8lJo7xz2j1HRvgyTf144+11YO3Ew7iU2ybBBkIta4BHMXVojSIXD\nun3GkK6V6ef60c8L6XoJrNgwgHNBTss63tajR0s1Mg+1xx7pLRrF6wA75Rk7\ngvH+1L68tD5FTE1esYoarsB4D/FB4hRpG2Vdh6DGPyg/woAq61obWE5MNasi\n2xGpm1XSWKlHHZmA7fPjAxhyIXXNjd/5SnBMO5SOfGt4Hp52ZxoJLpnu+P/Z\npQe89M8V7CRpnLSfiS6s9yA52dAzFRDULVwYV6Ww7QOsub1qGODa3DO+WHes\nvRTX8918ub9fbG7uqj0qcP1TqcqL+acHtRuysHGw1N6QFlNYhGcBJ/4Wr4G3\n2MAY7VrsCRHCZ3x2MWtXlyyp+jb/i29kckn3tFPnFVxZvSoxaVNK4wSxC2zx\nGzyfZdljLKlrLCdqwtTa9j6QmRNf2M07/+hdVkgLmUCGEAD3Ss1VEUurnp98\nAzL+I5TZ8vuUaUeDyaU4UiHCPcfRvjzj+IIOOaEuLOaWSu63TnUd8nWGo5J3\n8Ru8CYvosS1KeYIH1STdIwzA1EzbjjGwpjMFzYfElQm/QM+9TAfgCNbfojwf\n23ZqFuKkhP1Bylod9GXMFm0Bgwd7fNBp6cJEoRMhbjq/ds8BUzEUldRwS5yO\n/LLB\r\n=Vfac\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^26.1.0","tslib":"^2.0.0","eslint":"^7.3.1","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.0.0-canary-ed1b139-1593804726082_1593804787457_0.4454474820637","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@iadvize-oss/store-react","version":"0.1.0","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.0","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6344c0b60290a089e69f043a61ec524ae2815ec5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.0.tgz","fileCount":7,"integrity":"sha512-sHIXuDCVHsip4c3gO7jeVOKZmAb5eVPCKYJlCfWuZgkSSGxk+px8+8GGCVVGvfxPv+BnPKTsBO3B6vl2BQ47rA==","signatures":[{"sig":"MEUCIQCoOf3xA0M6vKmT3ofbhfz3KzCSoxh/3eWBmDMc+Fqr/wIgPgnwY/joJ71urmeFijRLjLAeFSIj7JHuFWxfm4vqggQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13458,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/4j/CRA9TVsSAnZWagAA7QEQAJj55BTQgVvVMb3KgFz+\nSXh33HmZqWmLDiZGmtNOQd0NILgk7lrm43sRXvdcB/ho4KoRfBj9pJcY0bEm\nBJbErV+96Jj6x+CC4YoiqAXwr6LHcW9pfIZrTMpvW1W9ho5tPAWnq9Vc2Rhn\njzCxBrOP7c3/Kuj/Zao3ww5oqyxKyTLfuwCx9HF/ONY0oZQS19arXcMZzLPC\nA4pGtIOicTMGSZWCEi95FOuVqivUJyie8MOsmrQHSkN4QwlY2RWGnppCV1wE\n8CVkMGKpSsNiDt1KetBgN6z27ttT3xFoGWlXXfBBUU4jkLrU8i9rApeSsatg\nPiA3Fd92qX5ENZCP0cZ2M9HkyEk0RxoMcG5oIJNdGretf3TDW9Dyb1yj7lm1\n66RrPty2bapRZ9L5smd/fA6j4/eSI2Nj2VMUqB9Q7uQ3qb6qSGSeBfpj2C58\ni8/RqrY/Kc5OgVxF6kuNh6Iaar7wGXEPKN6MoMq+aHZeBJS9D8FkK8EKmJCP\nCrF+nD4EG0LeUquT7Od81euBTGzBgnUzKrp6vWByYUTbBysbnWLXvzL59GaK\nkzL/WUbcJKYUbVf/myGZVKnXEjkn4lsr32EB6SjZjOUp4B8L8lqkdt+ChEcl\nk/o0Xc4cFrIejIVCGaGaC1L+Km4hOPV1cdCRHFd6dsPhDjc3EUMytxPYrlai\niHku\r\n=c6fs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^26.1.0","tslib":"^2.0.0","eslint":"^7.3.1","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.0_1593805055173_0.9078428409895225","host":"s3://npm-registry-packages"}},"0.1.0-canary-9c7bc07-1593857074870":{"name":"@iadvize-oss/store-react","version":"0.1.0-canary-9c7bc07-1593857074870","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.0-canary-9c7bc07-1593857074870","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1e5bbc3c755237a94e369a219d74e28ec657df58","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.0-canary-9c7bc07-1593857074870.tgz","fileCount":7,"integrity":"sha512-zB0Q1oqgRW6+0Rbpg5cHzDT0iv3LcvnzWQ/F4oNkNTNU/t4dPCXgXdhG5DuNFjyHdw1eZW9aKG/iP8UrRDR4Xg==","signatures":[{"sig":"MEYCIQDq4WuRXy6XWhAJuZEKCFDg11dG1267hzSufmE/3WYs3gIhANtGqPo++Y4yZHw7XzYvG2n8qTCOQTPW4vJaDnu638Ir","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAFRiCRA9TVsSAnZWagAAu4cP/0uYVcmiSdekCdhARmxv\nlk3/Cw3XqZJZFGPHlGTA0oBViwnUbFhBkjnaPDeMti98ND2gUfLrvMcbV/t3\nXvPTlpWqAw5Mv6n0ojFZHS5QpPPaO88In51dNwadNcEWjZUThHqSMz4P/AYw\nTaRPLHz9EYGBM7L26yQ6484HYIS09rs02OyDtZUg38/f+fYcV9xr+pP9b+TK\nUyrxmFzFGmad7kxutP7Ag/oVshdCtnma5MlfkCiOMJInLjh2JjE99ykXIvqk\nrz1xAb/rnZeCNGzkpqyjgR05fMYVHybH7cFv9emmtKHNBs2S7iCCsuTlnHab\nNJ6EtPM/LJCJy5BxarAni0KiwQ2ezqrS63vZUQM+bCHjaguTIe9EK38QNhKT\ntGWx5HCy36dabad6/pFkTZMCKPn5U7bU1tubTSSqMcl0WXu3Z2Snl74uGCD9\nBPhZbVpgczIkhskIBumilijdzLAYH6lBot7n1EmNUcNM1G2ultAp9XsA+mxN\nCJo0SYqq1JYS9JeVFog+whk2IzVrpSd1xM5bbF7R/4hWN/fvcYLWeryeTaIc\nQNNp9Y7+VcHD1b7td5GZZKBb9kb+s2e/maxEQwMamDB0+vkcFOSrABnv6oFB\nR2ibqfs+wA414FHwQjYPZSwMAHesp0bc9MRXyuUicvUKw1nDGfR5IWIkB2RV\nUtV8\r\n=ofPM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store\n==============\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.3.1","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.0-canary-9c7bc07-1593857074870_1593857121701_0.5714565146489992","host":"s3://npm-registry-packages"}},"0.1.0-canary-83648eb-1593858863121":{"name":"@iadvize-oss/store-react","version":"0.1.0-canary-83648eb-1593858863121","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.0-canary-83648eb-1593858863121","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2483086a82dfbd85140b05c4c6482f5d98ecf6aa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.0-canary-83648eb-1593858863121.tgz","fileCount":7,"integrity":"sha512-9cFjTKOsCUdZpKnftf2COvBFc0zsrhrToDKD79AOjBJeGhXuZF9A5SG2ZUit+twYABXvLWTPANhnpVZ2tZZWMA==","signatures":[{"sig":"MEUCID5cw4Hf9QXJgvid2L+G9PyPwehdHRMF7QdjQgkzf0JxAiEAncMmVSkHOo7ns+/2l41yXpSKyqDRisONGdoitxJgDMI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAFwSCRA9TVsSAnZWagAAxzwP/3CzN669GV6AsZvlxLUM\n2aAbrPOXeTN2srY/CXMIFWxYG/mqTXVRU2oivpL1PDhX23xw0ZjFsbIJELl/\nhMMjC0+YoYB2XFGlzBEG6LuEMHb+U4h9Mbfmopg8TMY6jr5Ao+Yo5nrMQOYA\nhoq4vUMsdN3zVGdoP17M1Jnk2RYuQn8SdEnF6US4Hj7ll6kDktJGqzbuBIEe\n+pkRaODbA4tOabW0GhQFh9CPIBCNCzGWYzw5zPyaJFvwN9eKKvaGIsaNJUiQ\ngMLiXWT4rjzH1mNKRqI/oCtmLBKv+zhh4erq0c24ye0awHlPuYPiGbprm/hY\nNUOy3P10vAOu2SWq//N9DyQCgQzIwJiZ3iL/s6EjvFBO6MB7OXBKNmtq2kaE\nOcc6wlmpQbwz3YjjC9FwnI1Ya1yKYA6J75yKE42MbuIiV4EAUIe3ZOZy25y7\n6d82s8DGUQzr3l6YnD13PnvuxRNiWhN4v73gT1XX3iCMEy2UW2PZGl1Q235K\n0+wryIxdgpp6lQpv3fgwLCw9Bq58jT0sc6wZfeuFmHcvuoL0pBN7sIPlw12E\n4ThSuA+qvyM4VD34urr3FGemqB6KswGq6ntMRsZByaKeB1P3lUPUsaRFfeXA\nobtYwRIPREy4Ipz9ZCpK1P/lQ2KFTMaC6jmaW/wLdkqLZ7qUsdlpiKATd7zN\nW6Sy\r\n=4tq3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store\n==============\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.3.1","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.0-canary-83648eb-1593858863121_1593859089549_0.852972201930595","host":"s3://npm-registry-packages"}},"0.1.1-beta.0":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"94078c42945a5bdf2d8832db00c76c1e8d2edb2a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0.tgz","fileCount":7,"integrity":"sha512-ZmgBWtfD472yWMmnsfaoUjR8AdaBXOHwCo/rPf0kPbgf7tV310gl1w28Ekck2WlM+mb8suAI4JMfFKlxvO4Cgg==","signatures":[{"sig":"MEYCIQDGEIjiM64eBt3bTBAC8rddLbZvG2hIxGEFoCGMUkhxGgIhAKJ1UMkS6jj+GOh6CemjAoep6Pxx1mS1qGzcZNVg8008","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14945,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAFzUCRA9TVsSAnZWagAAeBIP/R0QNMH6Qt3WNv48zWNN\nJIkEO1R1gqdNJQAoVY/6oulmK35auQHFO9558PWmBG6vH47s2wEhATbU0o7S\ntfJ2L9MWs78ugrY85zWjd+NkRzVCgjqKD7GlGCNEQ8kGgWGlOBYfURGPavY6\n7cdEZEFJdXsNfPxgbiWKngOfNdpd+PH0+SOXGRKBhMlKlrtLbceEXCugwpEZ\nwT9qTN5ZLFsr32aWOD5xlKZzImr8M3mtFFwzKkX8gA9DwMmyybP6LAH6np9y\njkAsYGeoN0TBCSr51swXvr04IdP5tnStwMTporgZ0qFotQsRyUbSqWL/cfzB\n302n9C+/p3IjCGfyluuQVq8uC6ZMpcnIWBxfvwETkVouhKxWWW9A4FPYytJ/\n1lzIuLPp/j0x0G7utwQWqoFVOIgBoph2lhKqv+lcKD3vRYAMAYwnwSJFVwlW\njHnpLXdxT2Vq/rKZ3Mf3/COH2UwBEOURvFSvHCuaX0zN5+GnRFGLABWedYgq\nQsva4H15DO4Y2aUd2fx/mi/geZsqVP2LwwEkS4UiYYTpiF2vaYFw2lBG4rAF\n6jeDNLXPMd6kmBV+iH4V3veTrmb8tRK3cTtAX1S0lvGfyNEjuTdZpRnOqgZu\nABJl0m5mwdJgdF3JYArGMMdWWKMVY9lGf57lHrqM6quRuZTX6Knf2lASi7wv\nj0Vi\r\n=fheN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store\n==============\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.3.1","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0_1593859283984_0.712944319642925","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-e8b03b1-1593861451378":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-e8b03b1-1593861451378","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-e8b03b1-1593861451378","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"38364c094261c0df970c40f0958533c50f7886b5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-e8b03b1-1593861451378.tgz","fileCount":7,"integrity":"sha512-3kY0yNpe09parx7g/UUT4yqdgIz5yjBP7Fa8QsOb7tSsYd7p+adu3KzrVf3xN5Ey2AMYrZ5o1NaVO9/s3qkDog==","signatures":[{"sig":"MEYCIQDFFcNV8SDA/xzWH0pUlPThaZv+hT+bYgt40IQWYJ0WTQIhAMEKKSKypc/IUm+XZnRde8JIXdkBj+dS6GeVqQvnIR0z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAGWCCRA9TVsSAnZWagAArw8P/26NMgRzsapMVrVEQURF\nZ6h+azIlbsd1uby4V5fri3WtiKMILrl7yuBoILAZPSWVUyY3mAM80xwgMnW1\nImy0KuqmENbirDXplyr7c8MD7oG3t3nR/MQD7dDRhMDSnlKlwG23Du7H8znb\nlAJUp9eYfRwC0eb33wOQCjS4K5pOcdbK1Pq4lLarjON/jHSxPT2+vItH3Kaz\nEBxqLszX+biOn1vHuJKtTxdNR6yoBbYW8udU9k99OPjyErTEcTTGyu1dMOk0\nFfISbgw8hamJZ9H93HsK4UtkoKhGoB03Px1T1uEPbeFrRh9ZZFyAkoBSDqaK\nvdquAtuDhuq3xsRzixW1CGV5AeaCPPAXFbN3FaH312h+f6+h49f2yk0Ssf5k\nE436AncdQMD15fwEu0EiAjzOkybATmghtacdRq7QtNl2KYuw5u1Z3McYhXoR\ntHlyB9CT1vHEeUsfUEL4sU6TDoq/k+ooB7nnYNHvDpbJn3P9SQIy7EGjt/fu\nBuKTreaS2OQ80tGCMxAh+wYIjnLnQixXLVCMN0GeovwrmiNzAk/QxGpfLh2D\nPRIq5e9v0zwALtwgv8WHbBcRl6/YdVKM4r5w/i9PtvHo3Do0NzjUdP3lMDwW\n3gXY4TpGvd+QCiLilDnWxBc3oP0gpqK0PKWK42EDjvDHD79JygFbCYnMwWHB\n9mm+\r\n=8aap\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store\n==============\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-e8b03b1-1593861451378_1593861506046_0.604945071575884","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-e8b03b1-1593861450278":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-e8b03b1-1593861450278","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-e8b03b1-1593861450278","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5e94d4486743b2ab874fcabae6685bb15c978543","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-e8b03b1-1593861450278.tgz","fileCount":7,"integrity":"sha512-x6YdPcTqUGlpZ+Z/VV6GuWbaNDs00/o2UItB9TKG51k8v205Rs/m9Uu1fCCEDbWZSqeXSLvv7oF7Cb4tlGugPA==","signatures":[{"sig":"MEUCIF+p0JMRiOc4Af+8WoS3GV+gpCiDbmDKfu6NrEoZ5wbqAiEA8O8/kp5fYNruNe4CRttg6+d2i/QcaJHAUsiVtUIatII=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAGWQCRA9TVsSAnZWagAAOo8P/3yYz0JOU7HU5VFBNtv1\ntvp6tBQxkioHgwpRbD2WjR2r/AYGEF+FbhsLrRfXuhCkCFiRo7qHay1Jypuh\nNFJtEG53YyjSWtPcGM2bk5fvZEoSop8tUY82UILV06/Id/weUdlh58ImwsZ+\nvhyYInpppYdlDwCdv17uSfcFZDxArYZLnM941hnhtPMltbCEAi6SWND2hPRh\nC4pnoJPo+xGMMKaHIRitqTY46Y5nO0npSTHHdX+OrANlaZJrogYry+4syMyR\nFcbPu9L/nNAorAltrhF7nyefAuIZ01vSpC93fSiAU7tu6DXBwkaLcbREXQg/\nnXL5lLN+z0IV0jS+qIb4oxxWkUEBEeaekj2YbKU63+GDNxLtGk6Gsz4dkkuf\n4CDyDs537aoHuulLAP9jqfY2VwW5SIa1/xQrvoqchqrMYVp2i+gWyXheTzQF\nPgHt9RVESovWdfwSVZNybEsesEt2cdp4ECLwfSiuxNsyyllUO2NUd9q5/Ztm\nilrP2Rm9/QpCfLTkMkINBymq9OrEGRJDXDfVC1hWk5VTEejy0t0uYeEiP9AX\nbDj19L3u8kBuhLD4riPv+CvwTphuBk6MB1j8WiSS+8+n53rWs0Ef/+EtOdds\n316TJnolhEDyHxCumBlnk6y/xoAGuT66wIX9VvsE9Aj4LwxzVTQsiib9dkxQ\nf+Ti\r\n=M927\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store\n==============\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-e8b03b1-1593861450278_1593861520360_0.4490945435075291","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-220b3ff-1593927129615":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-220b3ff-1593927129615","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-220b3ff-1593927129615","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ef3028567afcd6040fafd69ee3532fc0996aa0c8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-220b3ff-1593927129615.tgz","fileCount":7,"integrity":"sha512-sx8y9+OgXOqS9tvtBRdcqWhexA/TTna1YF5wz+6kXx29cy0Zgh00wytoGGWKRNFhWArUyxI5z0mKOPjmsVQx4g==","signatures":[{"sig":"MEUCIB2nGSZEwI2CC3E5Plne1Jk0LStg8i9vexS8WK9sKfGFAiEApt1X4TATkM5yiqI0es5hyVRxbmYqn6ofGchAvMV2uoU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAWYKCRA9TVsSAnZWagAAvToP/0TyK15Tys9Y1qI9yMRj\nMzVFfLCoBwDXIoiOB4M+mdTNRbWesuNb6JsIBjBJE2tylPLx/CCAfosurleM\nwi5xBTyCgD3tMv88PtocQ4FaqdBl+7PsNtjlBGAUnrwP6zVHezsyUuZgVKVf\njEa76fpAMA7+q8YpTa91q8PR2C39CGWDRPv5SO4frX80ngdk0oz6pPTW/log\nkOe6mxyiD02vX8ooUKl+SoEHoyiJuw2m0QFx4uNNb7pkSLOdZEP9HWv54Okt\n9e2c4BmVGnqbg0AQ3TqLeGbgxTdokXukwxLetMJriNZTig7EWf7M4BYWq+JZ\n3rCULDB1HmSyU2EHiZ6PKM65qDXcImAWmv928PmZ4sMoOHnzaoc7M5OFEahx\nOTIUjfBmtR/pA+lUpImS0Fok1b2+FTl8FaGyVnryL+7xi+QpPUE0l5LX9OR1\nVp89WyKTgs3hUAuKGUCy09+x/99WqJ41yp9s0qZKfzEn0gtPP0pMjyfgwaWS\n2+FwxYNChWoapBZNz6gKjcDkj8zoBnOxe87XbXe0YFMHJjRuxmNX9Pw+rIMZ\n8L7ipjW55taVBck2ijCHFSVpBx9q/eScNYHW+QuCe/ZrFPT6UzOignDcK4ZK\nK2wxHrsR+eSK5zyqUKHPPh0bFyYHBKJLFr8/V4TGQPMRGUYEpWpnsImI1AGQ\nSMFl\r\n=NCNk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.19.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-220b3ff-1593927129615_1593927177794_0.5800872799470902","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-220b3ff-1593927131093":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-220b3ff-1593927131093","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-220b3ff-1593927131093","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"70621405456e43af214cab81b369255503c65971","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-220b3ff-1593927131093.tgz","fileCount":7,"integrity":"sha512-sjX8KO1MzLdV8IUC9O8NDko92r35p550r1B1fb6DoeAfezPVuo6pwU7YYoAtVcTnR12U9xChfOONhT+/hUBmSQ==","signatures":[{"sig":"MEUCIQDGTeFMZ6/Z3afVAFHsQKkTL3sbVmKSyUgpCfddVeE2KAIgVVC//alCAlfLCQPmAVQflvokXaZdB6MRZl0wd0MlR5U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAWYTCRA9TVsSAnZWagAAtg8P/2t9lsjN76ZRPMgayjmB\nuMfe1GyYMityyJohs6ulYwgzfXAl7XOplxaeIJbYuOj2/dpYhN/T7WRVGqkU\naWZivHdVikDZGPcOq8lZGLGJFUweBXFXLMrXFPq7kfJYMyKC6NFXdbWkQzrG\nssOoush+KejpX7jGHrKdM9iqKmCTrLl+O4ToBGr1AkOhhhe5bu2cYagckTcC\n83JymMsraD/PGCHcIWC4qtqYZTAkUY+wO6SE8AnnspRvLj/9lDFyYcwwuyfT\no5aHdUA81Ji/m59ZVl+S8oSZk3/zaj81onwQrmyBPiDIaGNLFdVGf0cTbz/T\njH9TfW6w2EplhH8rhEslXxJTyesG0Lx2TUlk0ckLH0sF4uqaKhX/Mt0Fz9UB\nD5flK7scUerZgP5tQfgSceVNillo7cQEVApVqlRjoG3/G0JP9hm7T1DUj3ef\nDJGEre/YGLK2u5pcXYSBa5zcWTn+OmxuuucXBZUv9rtqi2AYcIjVCTqaaG6U\nZowZbr0yr6gud4bANiLJklnG0ShctqoTwD7N5kKDRlfwF3sJ9rvyRAl/K5DT\nODfLJ9zQotX6ga9M88P6xTpQSKNLCRQLswuGPH8Ns44jSIHkqij+Q7y3CU0w\nDU0SHE3BjiYgTOrqZZ2jusqBUeWWpfw9JTXdxfcNw69UQDqbMbie1+C3F7r7\n2GQR\r\n=tW/l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.19.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-220b3ff-1593927131093_1593927186849_0.9127362130662495","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-a330f80-1594063522415":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-a330f80-1594063522415","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-a330f80-1594063522415","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f1b3c139ca32f5c8153475020a53900506006cf2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-a330f80-1594063522415.tgz","fileCount":7,"integrity":"sha512-jQUxCcmIMJYix5ivCWOoLRhq0ipw/jD5GTmk4nACbyC2BvZpSfRHdJFRTuqV9lPmsMq6N4DgFCgjasrZb5dH4w==","signatures":[{"sig":"MEYCIQCHdnyLQ1Qa3et101IPcTN5IP0aGrZhOayTmLPuUSOHTQIhAJ91ix/bX+iQq+CNdMkMOxyXEthEDQOs+RT9eZGUDNdk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA3rdCRA9TVsSAnZWagAAv4EQAJpplq9zIu4fOreGnVKT\nkKfxZqRC4UkAhJcJY5tdlKCHKxBo4bVKMCvMzSUQNokGehAM75Uo/42i2cTO\n98c+ubLE/RSYH3y9qwXITKjnPl4CTnfLTOfOt24Xt+utLwxsIqWetk0BZCwP\nnQnkHNCtE4sIn8SH12Wqdf4E+//dTCrjoQxcFVbESuvoeLxckaR2yN/mEy69\njhMqz3DYxCOw/+pxY0WLmDtBLSwpq6SEumatoFiKVX6uGESGoTGCu2XyIncR\n4l7QRdPWsBS6n2AM3iVLVwtmzJJ1JAH2HdoHjrqmuMWEYTA7OdkpljpVtkjI\npUya66yqzwZSfBknyhzJmRBcG+OT8Vv51iTj4/iYct8sFWMS2ZbT+Eg2pxgO\nKDFOGWqlj6A1UtS+Z3yKAtfsbFV70s+AzdrI6udnoO7xJDcPRTMcyIPZqX7j\nA4UZ/7M4q/4lczYWnZJy7OAtRcDabn+TBNW7ADfYW/lVyRPC2NwwOeaUc5mR\n3ZLfRUqd74LFSm0b13PxqZrGhIk5BBxKN9IqarZMnjtSE853wBVcw7laXOVe\nXF7JGW9lPtEGU/Ex2UZnCJi62UjXqPw7ImgtDAPcKduBdVC7Oao7452dY6vz\nwY9CcewHWESm4DfhFba2c0N2MyXWs7Ufccv1UKWcICoqR6bbdYkJrCDL3cb2\nPP9m\r\n=Ugx9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.20.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-a330f80-1594063522415_1594063580983_0.2058054155017739","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-a330f80-1594063521862":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-a330f80-1594063521862","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-a330f80-1594063521862","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"194c72ad39506088047d6a172469b66ff7017e2e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-a330f80-1594063521862.tgz","fileCount":7,"integrity":"sha512-mTkTL4+/BQCTdZYGW57WObR2byZ2KGphdzEZ9DFmhZ1NgNffK4EytBlqQGH0XYujLIlw/YuNwSBIhbZI1SCReQ==","signatures":[{"sig":"MEQCICCc2TCgWJWC3OCNjW2ZP2vV2lE97QTYltwV73Ph9eVSAiB0izzZQLaRz85ndp/UCsGLLRHLTeORmciNO4jvZvKliw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA3rkCRA9TVsSAnZWagAA8scP/0aCyf74fWQIDxSlo2ni\nUjn2BDkG3MzzkWdqHw0KTbnWipGySJd7oSYNnZOInOxs1xFbwfURyrECEKdS\noPPTLnpyJFlD2oN7EbmWvTOy0pYhkpaLHP/UKOJPBnq8dKu5ILBoP8hDqQ3k\n2Wt4xiY3ap9EYDPfBq8sY5GQoqm+XqAkQ0YC+U+m93w1hZBmu+NCZ76fkYry\nUrTTBARMmxbmPY8AvZR3VbPkfs6OMQB1arQK0fOiug+Ig4pprAwGg3vKwAoH\nha2BhPGhlOlJIpIGVzFuvDqgsvP+51ReFAAJhKMuoyIs05uO8Vqbns6bDxLv\nWdZtm910rDpTcPyQeTOhco0oHcwk1kLcJiWk+a3r109P2dHGbTfAc93+be0H\nceO5zzSm3fdG0HGxKzOuCISsihhKSA3ydoc3ZtMELt02NQ/wqjVVb99oy739\nTRlPYnRY89tj30y6rbMEsUUmVF1HtXWVOUf4/TpIB0j4+0NK4hsyl2ld/wOw\nwxZtWTLdRuuAfRlYSTMgVO/PA8hML81/y10iw5dBuyCICkG83hnamZKm4QDr\njbbesT7e8mq2s7AE43nb9og+H16KedV2AgLNokc0T0RNQKZTWvriYsh11a1e\njVSmMo0NWd3bT41YQ1EJtXYKnZ/BZhQAV7a4XdVkMnPnXxI80JX9kdYAJ3hl\n1s2J\r\n=NMu6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.20.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-a330f80-1594063521862_1594063587959_0.14505815989828919","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-87b3c83-1594069928335":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-87b3c83-1594069928335","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-87b3c83-1594069928335","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3e5f59de72c0556d21728b2404cf2a15dcc78ba5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-87b3c83-1594069928335.tgz","fileCount":7,"integrity":"sha512-yySSwRRgSnkIBjqKn9PidlNSx2dZcczsFyj/XdQIU1sHU31HAqoC1z/oCfe0nh0mfBdgnwEgPIxtl0ZndQgZCA==","signatures":[{"sig":"MEUCIARZXVBzUH1EoeXg55yd3mLKLRwqVXcuI5ASZqKLynjjAiEAuOZHjz2e0tvmSBWIs6MRvvpfE4udp2CEom8zstEZsiM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA5PcCRA9TVsSAnZWagAAsy4P/Rl3l8ntpw1jQrQmTRCG\n6rtu9O8gpXSU3G3Voukg83dobq9E44A76DrZyU1NuVcZspew9zH5/773CiT7\nlKHGEP7sY77aCd1aDyTi/dzhed0zXruQCTDv+y6Jus80u8sFTMYaSUL+6Agd\nBGinyIKr8QDmOc929Y/n7+AMfGw20xKY+FcqAMNknntFGrUWVnEo71L9QEOE\noF/TMuJpt1sr1Hqxniwqbo/jSu0AdwYL/lZgyqJ16AGHxMbdPReGARxJoNdT\nRt3/Qx4OtFxnUUhahCbqHus+4aOh0m1YWBMINPyy/NwJFYfivzK82OFyw3Cd\nrwYn0FBDYA841C8wMsr7wdz1NQo+b+WfF4fskhwVKGhGAHoXlIXwFf/430fS\nq249lx0F0ruyRcq+XNrhdOiKFk0NaFIVFY7Br118132Trse7YG2jfQgakSuY\nNfIN/FN60tmWJyTnNM29nBpmHSdM7/3wxeQEQgtUCXC/2HhhixGp9fxPfArl\nuVHsIf4Ie+K/fWl2n9FgHbMQLPIYBonnQKsDqEmC2TyjChSBHRruO1C2X07z\n51Yj+UtqcsRrPmRDJ16YIa9+gF/VddQLZD+iv0Uli9im193d4iJ8OBOqGaQC\nJL9NugR6IQWUu3m6na0hqUeQJbLMNqF1Dzs2YcVsFt/d61GDJs1I5v3LXcfb\njzP+\r\n=DGH5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.20.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-87b3c83-1594069928335_1594069979663_0.9689693279036129","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-87b3c83-1594069928529":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-87b3c83-1594069928529","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-87b3c83-1594069928529","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"600030a3abcd268ffc022f7c6ce019f1f2bee0ac","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-87b3c83-1594069928529.tgz","fileCount":7,"integrity":"sha512-EDkl6uXG0JCfe/YlOPBfFL5zK4oo9wUV+FurCWc2p3z0QBVxzcelLH7rdhSFAtA04yb4vrHp25nONiuvzP5Gmg==","signatures":[{"sig":"MEQCIHKTZrEVTWzy5Cpicbteo+R9gKFfCwSLXNYjDMyY3MZzAiB3e7z8U5/qvIP2f5wflg4o9OpzXksdznN6ZC58a/2zPQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfA5PgCRA9TVsSAnZWagAAIe4QAKEC72SXuA/1wUGA9WIc\nIDwi2CYgKitg8NodOyCOQjkh4Mx9Ngi2R93Ghfhh50u45StZToO8DDWDenHT\nwD9PMEpZtWpYGBM8aRHl3qr8lweCoi18mbFWtVX1CgMbKTpMUpu/9mAJ87oM\nVfsPiV+mWjoBhdQynWsJbl/8OzzzlxH8z7gtrjavIgPJeMXsKge6hdFhDVMs\ndkSlBJ+lr8Yg/oNdOh1aTEeiEpe2uuK0BAna0Xp7Ut6XHgh95FQD+bSo0UNU\nT2mWf9V4IMbBZH/aSIkOHqUpD6A81PomxfTF4A6Cq0c9g8igw4coMq29tyK/\ng0mKrzTTcra56uW1HN9iowsiq4vIgKmJLMaQatttjpl/zoJAnaYZvgo+bFMq\nE2q9DfcqYHddbJBwDa57Ro8D98CgdUAdDIWQHv0qfaTQus0i7gmPuxWJWcPa\nl/J2+Gc8xmgvKpX8Bq5SGxfXo/T5xUY73nDbTbJtoSJrppFQFcLnO8cZnWuv\n2DnuLb8ELH0cbFE9z1tUOo8sNp6T3ALNdey7A5166aSiwQ6mkIdhSlZ0czcV\nXWs0RCBmhyNxzVo+H2XGmRr9Z7K5PO6U7tBei4GPmgxXk6+APIEPkK8PFsyy\n6lIXN9fNtdCSqt/URmpWTgxFyj56XcekcuUF+lvxSig460owxeUZwvlwQILS\nRK1O\r\n=a9u6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.20.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-87b3c83-1594069928529_1594069983797_0.6890937539104798","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-788c0d2-1594136120056":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-788c0d2-1594136120056","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-788c0d2-1594136120056","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e7ace0ebadb5bc1d03401c0f74b77a8d9a123987","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-788c0d2-1594136120056.tgz","fileCount":7,"integrity":"sha512-fMtaPWJsAti7IQpuBnxRnCv4Esk3sE2Ydoxx5X0znDwTcrzXQ9YhIsYB/pxVdsNRmE+Y2HP313tC6B97+WNXUg==","signatures":[{"sig":"MEYCIQDS4i8+xJOiZ1ygRJ1nO4iq7ESy0hTIzAdoOWr/tEqCfgIhAMT1HWlgnfxzUCg22P/+fv9lYZzlteMbgDa8d8cAV7ao","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBJZoCRA9TVsSAnZWagAAsVsP/2CMhREmPBBsTKa2jxnM\nM312GHtSFuDbk1F4+IbuqmcKCKQzsv5d4x8tqO5EWUpAko/dAs7pbnlcVT+d\n23q00oMegyg9SP0QuzyEVfGtP1Sccayt1u8fQapdTu0FHEzV0gQxTNxbJE3y\nHASp1KLEKQxYNzycNlU6LOWWerh6RbxiHSYHsgvMEHpHXFGduwnIFBV75fcN\nNQg0X4CdbBWSUjb+DO7YU4WCJpgeiD4pX3JYrbQyfvuhgvWRqKLIFrAnr3Qt\nqpKdeodYfrN4f+KsttuvSrav1QpkSWYGN6VeLuvW+uB/XjKWLSABNxntwltf\nmXU4Iep41PeFJrGWzwobevuesWkd8V/2jxoc9lB4EwvLaCh7chgYE7R6qW+H\nNZre39G+89mJM/VNo7TRdSOngMpL9U3poiS1HoYwlaj6uOGitUDOYbCTCtom\nuo7FDQ0lp6/HwEhn8xQyWTmUCiSJzRh2dKDbwtHnP/e/DWmAt4onF5Eqwrxu\nutyEDExnmwtQ4ZKDS5hx9a/uO+X/8QER9UNW543w6x0EQjsI9xwSa3lm/FUU\nM0ZjGH22QSUysOAZ9ArMi0y1avazFk0eUL4nL8xSKODUhfHWglNRircwfh6i\nZ5TrfIBbZRwo0QJGe0wEpsy61gLKeov19MQ1DobzXhyiWXPHkFApa5YtIcwC\n5PH6\r\n=OgjT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.20.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-788c0d2-1594136120056_1594136168066_0.7648754578783727","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-788c0d2-1594136117240":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-788c0d2-1594136117240","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-788c0d2-1594136117240","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"38f0353f399e736e9eb1bae350cb99e36c1bd2a3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-788c0d2-1594136117240.tgz","fileCount":7,"integrity":"sha512-iZqXy915ynzwv5mhuzJaLiQWd64rgIkVNKFsJL3WYY/lcjWv5e6YxmxAjqmvP4bFSXpex78pKpi7QJatG6oB/g==","signatures":[{"sig":"MEUCIE/A/YJYVjNpcTw8uh2dP74c5+YX5W0kvUJtXbb1bsFSAiEA607V0mlnr88mE6z4UdQ35L/niB+xy01k7XePKhwJa4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBJZ5CRA9TVsSAnZWagAAqbAP/R7B8ltIFSyLMGsAYniD\nOpxRtU9KRe+N/E1tbfFmIqj4XusKFWdnft8VCYepOiLt6rPbWoQE5IsyKY/I\nhoiOTDFLMJClBBVTV4WgLP9Yb4ARUP2PhWmsKfVaAHDVbrG+xCUvavfw93Qp\nNusP8UkRn76E1JpIP2xSFBTgZUXHy2L9H+CeHmWDZ1fg+3eYIETAt924lKDk\n9tPkyO6wyGB0qUdov0GP4ziLP/QKu2FBB1OKeqVPvHd6nS46KYwjQQFCe0k8\nZTMZGFnfOYRyAHGjfNBT9N4zssIqIpxJN4VSDFEr+5DPC6iBS+TBNk823IpY\n/LT4TiqjxKe9IkLlSCU0Y5dYA/xhcLi+wcyMQV1dHoQQRC5JDj+TzvruEhsj\nMNQTS6TUhRBmQRBvqbvZPvb1DQQbcN6mTpM/zCrhB0RbWdqGmBVdhrEUYgO/\nCJL4ARRtVtb7HLSJg5F3ToF/8LsDsoi+Hi76LNhsvfbBFUm/fXiHs1dJodFe\nCbxFh3r6tgmrpt03s1L95RGMf31KU4Wt9JG628fHIArUa5gb+Kjm4cmvHDyr\nWtEALZR375Vb+OvndlQw/8o7UpdIUyNmCPP2SYftfBx/kNMSyB++J0iJhkQm\nq0trvwMJSfJXp7hnBII5TkBSNtG8MysCxc6tudYmICVfZepcaawJP+nDa1SZ\n9TMH\r\n=zj2q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.20.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-788c0d2-1594136117240_1594136184964_0.21295790781868673","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-f24e23c-1594150961210":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-f24e23c-1594150961210","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-f24e23c-1594150961210","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3c6c6b47bcaa54d3ef6c9ef56dbf1317278f8fb5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-f24e23c-1594150961210.tgz","fileCount":7,"integrity":"sha512-O2BOQOPUOp7jW+mt4VYiEFdMzxT93iz0CNpg9Qqe6cHSxc/JGG8fFMzY5Je+ZlS+wzwrezrdo9ob2YCC6h6HnQ==","signatures":[{"sig":"MEUCIA51VlaU30c/HuZfEJINkW3dHQdmnoE11dw2gPk1SbpoAiEAxSzbwc8wEygr3hAKOl5gANWbYETqzWMy7uownibPlIw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBNBlCRA9TVsSAnZWagAAZfgQAI5qWgdLTpsXOH3ezRQF\n9VkGsClJqKMlL1h+g9HcDPsUPjWd5WzuF71Smd1L1Hi6aVloejfDvZbpaM8U\nwGrxl8EmnwaJk5M6p9aVRakiIWy7sikzt59NYr4M/689Tv1QVd0EOS/swksF\nzmnxFCtsJGmbriUIPZty6yidS3PS0uyTaed6KoN06vs9rxzVlomUvwikKUg0\nS5kgOFgp1CPCEX21hQjSTxny9jwEavCETmXIzJX33QqAOSJwrsjd+1cncnb+\n+yGpRWV8DsoPhB8nlYMa7FmXTSc5N3z58dPibMgm9MAxhFPkXa0PZXApHMxV\nKoqeVSkN3+VzbrS263odiAqB3FfLmurFeuPRUJH5+7PSqeX8AQqa2T4BoA8L\nUoL8aAUUBHlT3ZAOUoZnHnmWUD+SaGCwLne/HTQlmNqRTtW56fVXEPUlvYaP\nw/sG7+qO6hquXYV6t0BU/ecf1r+Mbn58B/AKcbs4DftafSgE55jOEuoz5Cs3\nk14JoPOTBvJ+dyE2eVGQytwNp6t+e5YL4Bmsd05xcVHN8APrVJRffuzPhd8l\nKxBSvu/us1pzkzwBdVdLfrJtuX+rqxWVapLr+0ipPkvyTkcXqhe6U/ZZwTSw\nILysYWpOKNEkEda+2RUfQtL/i2Ptkja7Ywp2jdn9/PH2gJm1+Z8eQxj6VV0O\nCX2r\r\n=FzZx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-f24e23c-1594150961210_1594151012989_0.4047177884683224","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-f24e23c-1594150963381":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-f24e23c-1594150963381","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-f24e23c-1594150963381","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d5aac383f0159b7185f60479e7ec8bf06b8d63f8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-f24e23c-1594150963381.tgz","fileCount":7,"integrity":"sha512-lFF4OrPyKpSqAmJW6sN9FTYZj8NVluuzbO3LfROAQlnxfqvmvcSs0AADI0smnar1eR3M+rVousQrA5dmVukVew==","signatures":[{"sig":"MEUCIQDTV43TiqnudnF0CoyhbRy1ALPF5+ONu2C+WgweO71bMAIgREeMY5huWptEnzycv7p+Kjqbog5Pnmtv22Tf8zz/p50=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBNBtCRA9TVsSAnZWagAAuCIP/23aBygZOamFI7r01pj7\nd4xw2KxjGDUX/tQt0hH/XwkOSlEvUUwbKixdRXGZGXtl2vbVrytpLzwmp0h9\nbf0+QcYtHQYggBudaAKEgC1aZJOsb3ljeXzYrELH9QJoDVYY3VsBT9XynOoZ\nEwQEI5xKr/KigiTxAUdPQ2Mx+s4YvE9DAKQs0beli+Ljo7eyW44NWS/RTwAu\nukYNqypBMAs4JmcysWrQ1HpW2RFgtBrgG6u5ctQ0rnrXnRn0+9GzaO9crQ65\nG4YocEBp/Dqy0N1pg6iQCWp7tJ2BqON+y5mLPurRHN6nzlyKMA+VIbxrm1vm\nQAYqPypL9apH2oZb+zwXh6NbfGLiZW4VzaQ9n1xhGlu+xXtCQNVk7P+4+/D7\n8+YNkk8cTDdlM0u+jAWK9Sb9iJqnxMh4nCjKCE805cM71RXnm9yboU29WNI5\naHXiAkGTQ3C5TE/80TERvDXtOld3y6s5ZfMRL0AnF3te7+zjXa2diySqvVfj\ndWN91w9Jfvk5CSeQxJns0aPcM39JyvkPzZRzgtSqwLPKsEvBmUAXzw2ijuB6\nyddZiL5HZ/68u1hZbmfiInLisxnCOQbR+5GFTFAAvQMWsFDLHA5GrpUy/KBH\n4ErpxaC9Ky56NlFcuYjlUXiJE3HE9pTSvC5y2sZxFLQ4JtPt3s8epnCaf6Mg\nkS8J\r\n=o0WC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-f24e23c-1594150963381_1594151020927_0.665080498697596","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-a320990-1594151277286":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-a320990-1594151277286","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-a320990-1594151277286","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1b4b6e571126064b79e524e3c3b9a21e5305e3b7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-a320990-1594151277286.tgz","fileCount":7,"integrity":"sha512-RHUXzdrRsmsTMwE5uBBRlkvzn8KZ9c6ycgSmDj19h2WEe1bzLe8VmdvcjpCb2oxzN/x0Ad9D3f7XmaO9jA2Qwg==","signatures":[{"sig":"MEYCIQC2z95UsaygxFRlPpd7AZhW92bj4i7yevsyyY0C+YSwPwIhAP7nhuojoHRF3zHNSImbH6OHKFr78/YhuUWUzUnRssS4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBNGkCRA9TVsSAnZWagAA0I4P+wazM4j6gRj0IWiM+xws\n/26C9IFgYKxVDF8AXwHD7v6kDqlT40XTpOt03o8ML1FlFz/aIU5/QpvbaSN7\nZjo8PFsQIkBuh61cNqhP1XtAWZcM2XurXis7B+5TZraaqujYoBhRKWtWq4AE\nHUpzqVil8TIqqrAh+itHRTDBKFZnvdpbCS9hDj68Gxx1OK7ma7FIN4XB+Udp\nd611dmviFi085PKSlfRabnkY0L+ht4C7nv62X1gr6VhK7X+HUbX/4TNu01hN\nMgnDdPXO8jAYY6mG04IimNSOpcQsF1ZfSMnnnSTaAHFGgCFaAQeJwXaKmMNK\ndIUeMxeK7Ciurz3DRVnw9/9tIamI6rY2tNXCQGnmBAfbJavixPGvx2K8/rV/\nDxr9Xy9kAFPwFK1L/TqwnPrlsfcrGV4zs+1RurlUm8nc5wdcXEEeHVjKdymC\ndhI80gtaEEbxUgiis4bkjCDkuy4Uo/MJRtZ+68hZNz80uMXDfxa7R6xvLB9p\nFjpwhnwHwVm4BNSBRquN+Vn9WRKQHscdMML1lsgtUR85iYkRDW01S2N37dte\n7HnaVl1rg9ZJqFKCyNbRAbD0JtPw0diWvoYY0L2WnJq4Sy3aTYITi8F0WJ95\niH/gCcUW+n8Do1akWVY3948KqSXP/Ae84kPHnBZ+LQa29FAg6oeQaI3Upuld\ngiGj\r\n=SnXW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-a320990-1594151277286_1594151332258_0.42893763034454313","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-c67202f-1594151474211":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-c67202f-1594151474211","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-c67202f-1594151474211","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a3520a8c17c6fac0b9bd2f59812707a98a5dfa30","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-c67202f-1594151474211.tgz","fileCount":7,"integrity":"sha512-6LVu0t+41PDATDhMdZ1GCS9NDPcdFxsgO4cGcm1Pq23YMumz/tvezSbK8NqkYSJLrk4VQlKeNG803TDVs4Gpqw==","signatures":[{"sig":"MEUCIQCexn16uxAFc/s64NJMfIWjFnzF28N4C2Erg4Q4YV8KKAIgL3J5OJfYcYkUZ53ehuPMZnSneX4ApHRHCzCVpdUdBh8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBNJjCRA9TVsSAnZWagAABZwP/10/d/fLJ3DiTb6jsman\niaCar71pZnwZCgxtHVCWR2saV10giJ/3q5n6DhM2DnY20pqsLNjwQfe5p5lv\nKWIutEh5Hno3hZPGFxl3L2VBG5pFCcZp66dfdTaR1AF1lIcCeOhgPT4NUPPy\n03YSQZZmIv6aCp7UFjlPZU4j95yeJzkE3QUCqhq1EoPdcybxl84BBscM8zCj\n111YI3M5hIiQXQPG8tb2wJk+ndG4kZ0C0GUDnFSxJtEl6z9+6bTLmSpOPe5P\n3QHTSeVs7BFPKD1wt+ZPcd81Gi/4YSLW9d1rv5Mqbo0guXyw9eT5yXG6LpJL\nk7TLz/TDosEJGLcrFayxQsQlUt80BaQx5GB+R9HRraoBmgopAFB2x+MeruMP\nJHMPes0TjIjboxRV8/XLz9DTZ+tfrRtyBYb3AUSpErZBanafglb0uv58Kvj6\nhZFc7h4c8myaGL+L7Vgo67R9kQfRDeUXbEfZYlJjRl/WBq0BzyTfvQhF3zPr\n+WMd+1qOb7yng8hkTc7q0fXoWINAQouuRW+AsTUEmXzLPLXw/B4fxOQLOckt\nABBcAGXMV8dPttCxYtanJJ1hP5vkcKPnI8igfmOhN4xsmaPl/tM/TuZTaYLX\np3Mo++Zji1mEGyUrFwpqFXfJEixMwsg364CypDY1gOIv/3SAKsO7kIkDRoPU\nwSI+\r\n=oBBv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-c67202f-1594151474211_1594151522667_0.6557533051278834","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-6ac0479-1594332969955":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-6ac0479-1594332969955","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-6ac0479-1594332969955","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c82ba762102c01f0bf0ca15cf6a324ce5cf6c375","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-6ac0479-1594332969955.tgz","fileCount":7,"integrity":"sha512-K0rG6//vTmFnN7/pBmd3uA1+8ahYEI481H0rS4rG6I8QBrIVCEANDEMcLaN8IosZFJeN6L4+ufkaBN+iJPI1lA==","signatures":[{"sig":"MEUCIQC94c6u8tP6zhnE2zpkdeWAkrSKYLHPYXTik/neogGlEAIgHDbH/9rw4eHgMfljzLZktkwCpQ5VH6LbIivl0POJtok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB5drCRA9TVsSAnZWagAAapIP/iBuGysXu4FhYm1BmThr\nKzfkTwTitQrn66vcUEb2ObcFWW0YuVhmn5UBXrK9lNIEECDbxI2EijhS7EY7\nxyvLdmkNZUZWV919tCSPKVAWWl+V2zTgNqiVoHv4DhpK616vzXtQ+enskgz9\nlZ7Dh4tNqmIwV5QLl8uI3CsrgB9GF1HZQtVWDN2kLvIJkiocrZ9VnfkXBTdH\nw7JGQj4lck0BnZu3CfT5/SnpQ3IKAw55qP/o/e4LQVEAWQDN9PSZy5e5fGvH\n8WMTGF65xleYhDpwkphMG9roAsna4yyPkTsb0uwSuETQsle1uzq7BJgFF61A\nb5vZow2u+v0ArcYnYwc422LDYHRyhvwe0yEku1257yL3U+MR+GdqVHl4x4D4\na0mERwsEglTu88HY2lXHJ0Xpxj5mudAkWfv3NaXSrGQ6XhPlSGnmWReHHvff\n5Fv6EvM454PNR0TVHFbE9NDilrnAdKrNpx1IrEwfebBotl4+3qhqOhQx+IS3\nAmJvceQdz1yUwL9d1Pd8MfvIU+e/WoSvNUnM6K+y1+1e4lQZHqiGFL9GRwla\nX8TvmNv0YDAKmxlNUcFWDeqgx3ha+qI6CzU9SRLm37Gc0Q3URTb9l6SD7yPW\n61uJxU/W6vMkTybgIwaPagI2WPW8i40n+MqsQEMw0EapRZjh14OVv31A6i6q\n2bPa\r\n=SCIR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-6ac0479-1594332969955_1594333034442_0.20025035624532084","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-a9f7155-1594587847970":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-a9f7155-1594587847970","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-a9f7155-1594587847970","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8e58478701fea494365b525b29fc1840acf4ddac","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-a9f7155-1594587847970.tgz","fileCount":7,"integrity":"sha512-ITmUleih3tU3XEAl7B5oIOg9eNNwHJDetue6rGFgJlchZ20XiPsT6Z/oMEW0UalZ9oS+tM6tW5grFylK/ab4OA==","signatures":[{"sig":"MEUCIE2QNUzgDY+TPCRJu158XayiXCJLUyRzOJBJplus7gMDAiEAxCnTI+N0dWQjLViqmyReYRhFFazP2YtgQFyzcokCchE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfC3sHCRA9TVsSAnZWagAAwIwP/1XvYLNlZhhA2Gdn40gp\nwlAzCF4a1qrBKpuVA6a0JrwfT9s28fOZdFe8jR5GEzwvXSMmEVXWUsp+nlxD\nwL4zqdv6Snrx7SZvBNk0WZ6KNc6D9X1nCLCHRnBhJVpI/7/gAkstjUFPsEy1\nMwsQYSh8K/MvneusSm2bqY82ESs+c1Bq2BqUX+7I1r73ravmzZ215B9VfFH4\n8lpimoZIirP5tcdXwaTymh9xzPx4ZYg8LOq2S2ClZd/ER0A2TmrRzNmO6XoL\n8tq8IxiAQABrInAcXw6cwGgSEE8wesdvXAQZ6I3EnO9ys+yLVNDxgXMEiBps\nbmqZg4TpeWExDSQowitQ9WbKIO5ohlbjErlVzVHvLAYNWK+FL1Nf4hPUl+/0\nYtCABZf7SkrB8wckedd2/GVo/Kvp9HVdAsftzKzYzN6fw8U0Wah6qBZK42li\nr9GV8gARe0tGYkuja9NxOW2NCgsMBpj8CuYp9hI5VdU5NhqrULtuQ0cN6XUy\nWbaPyBp8zuFJc/YL4pPwamPyOjg/JxuBPYJzk8NYa/bgWV0GkSwX5cTuvqgQ\nEH+0R9ob/1Ev6vWJ5T4McqrGBD/ndfoMF3IW1gtdsJe6Oh/Td736/TP8jECg\ngJSjhNutsK4LiikGQIKB6gGonR3R2P1zY1v4QufizMHfH9gPI1ifQwHN+Cwb\nboCm\r\n=cuw5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.1","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-a9f7155-1594587847970_1594587910479_0.713900266134363","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-a9f7155-1594587848734":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-a9f7155-1594587848734","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-a9f7155-1594587848734","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7c750d9affcc0b5708fe37629158a6bc278c7cb9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-a9f7155-1594587848734.tgz","fileCount":7,"integrity":"sha512-lH6gSss5viBKEaQ2db6Yyk2IeTEmTu44isj4U/v5c/onhK0PqgCrSgxQlwa8ZoYzfb4ujbmUKLd+Vg1QNtPgeg==","signatures":[{"sig":"MEYCIQDbGjoIh1yodWOPxeISUrviZGMccCBj3fysDLa7V3MFYAIhAPkilACfvXDLsqkx9J9SnssW1NJbTwEgchw/1NZx4cim","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfC3sVCRA9TVsSAnZWagAAy0cQAJypHW1r5PGyBwsqShOk\nczIfNE/E3u7rHoWA1h7T5nWFjZSmyVpB3PN07hRQp9vqvIQHJDcS7OiMPoIW\necKJeyp4aWuB64TLimW4BGfh+dfYNe+/nB5IrinTsCigh/SwoQcscATTc7E+\nsFX125oEzXGwO56pW3c/5aMSVjuf8SyR2PbSH8FKrT7wREWdnIyWEdh3yOgf\nG9BrOGKRAn9ZGsnMmrUEDJc3uTB1r/hZV44tLcLm2J6EAitdzOQolZjjMT1T\n03xNUKT7E5WNabzfknq3pZnLuBYYw5b8txBg+2dZvotNQ+dOXpFxxtIEXVR3\nr794MeLR+DvMpZMz+nigJb6WTNvFTjoM8bmixvcNYruXLkWecgCqa2ZEBXBF\nskQvVaX11yYJ4lsoKsfnxLhZOzbnjpsUFWCcLEyT++av9ai/4fQ08+i7UiG3\n7CmrnnVZY4UVctoQR9GZiLZx1XqovO0t6yUi9gXOh0ZTBuDaWBPhCHCr0/7/\n2hk5yNBVPgXVP2eEeN4J2JkmaUt6nC3rqiXno0RTPGWWlyyfXAeNNYa08zQB\nQBeCzJpsCQrxaNZo5GOzWiaXLoxF0AD8fcywfvDaJwst+p5B3B2A4QZnrv/7\nVaXIfkQ7UCNXc5ueXgve0/02YCDodXV7D59/TgWTs2ioj6bpUruQUm5QKd6D\n/QMg\r\n=S1tO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.1","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-a9f7155-1594587848734_1594587924587_0.7225354425154773","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-9e7c1c2-1594594073995":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-9e7c1c2-1594594073995","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-9e7c1c2-1594594073995","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bacc3efb492a4e1f0da0927c6f9f6070794523e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-9e7c1c2-1594594073995.tgz","fileCount":7,"integrity":"sha512-li3FWJ1ahVPLjJrO+X1J1DA9q0ubTWCSb7UZ7qIHVhvWCLOaRWOdnRj+R5JuZTgYHPSGSz6CQPzkHYYl2JjP+g==","signatures":[{"sig":"MEUCIF7OId6+L4ExmqFk/elFs8SkbFz4l8AD2AopH2o4gK8LAiEA0sxCWl7Ihql17oqRuZAlN1cITVjMYprmQ1aLAmT5pGE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfC5NPCRA9TVsSAnZWagAATOwP/RABPcBuJftDx7YxZZom\n/ZXS09gfTZf2LoOndGvvtL9Zqd8TXr2rafqF7pzW9pMNHSXGb2UfXynTUstJ\nn1h5hrWL8a/eSaInaSTRUTxGvu/RHwbOxUZC+IUPOkosqp9EggHBJWb1Lcoi\nd2VVAUAZtO4RRpH+mFOUE9+Z0ov8D5ng6OvMGDkCPRJuT6HR+6Oi6R6OjDOG\nFbrXEo+eDR8VPJeTigLTnK+ylMQErv5cqH472ReyvQt2nmUtNcNRjyjXNGmU\n84+TXXoNCg5bIDSuGWM+ojSt4E/+fNjGzJ0XDt/lgzXUBtV23KSMlyWWtym9\naqUdOpnK41NPAF5MpFExzZxio3cwIJ8BSKTMyxNeV+JoyrVOdnXLjJaXpDvW\nt/Mw27H1h2LJi1vgr+zKmYe6ZNRoXS2xfH2rEa3SwPrZRcZQdfLtOWkGh6C1\napZ9rE1ZCqitYzpIR/Qu50VHKkleb9TWJBZZsrfoGQJ7hAS8GHq4oHSD8zWN\nbkdWjKoQit0bP/pK07Nsrk8N5ZrjSOa3Eqkc3jFZmCXU6/v+rM9PZhAT4OiU\ntPzbfnaBCPN/KUQsM00xjy7Uh862Xt7Z62OBpBy+9AshooLyHKs3HzWOsjfk\n/PQtM0yBLCVhbcO/X0qkNm5rGoM9vWeDwZktfoQCG2n4GlBINpQm0kYQMA1/\nkO+n\r\n=G96t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.1","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-9e7c1c2-1594594073995_1594594127107_0.34650545336681415","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-bf081c2-1594637333145":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-bf081c2-1594637333145","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-bf081c2-1594637333145","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"be16c32c04a2ce126342645cd8c7c98d92a08c20","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-bf081c2-1594637333145.tgz","fileCount":7,"integrity":"sha512-4G49Ue3S6QbSJ7wgkNQlmdsm3WtULNQfGe1B5HDCgb3hYZ79Mz6a2bEaErmg6g9p+MD2USu8pEcAY7jhcLt9BQ==","signatures":[{"sig":"MEUCICdvPiQC0RIHmVmT0WRjJZhDJd/n/ns1wpXruCFfw8zxAiEAuynKSCvc+HItKDJziTERhZrb+AVOSCJyhDCJZg+DmX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDDxOCRA9TVsSAnZWagAAA5YP/3EGB5OLIqKlYNS80Qjh\nq3rUelVW7z4zmBm5CFC7Z426Zj11WHNisGlUwXMc3yzW6VH55uQm+jc1ZBUJ\nfVDOJO1X6z7/NpT5IXHfYrIvuyu8O2exPs+xTZfK05q/l14RU6hnoz1+I8pC\ntihvvDNkkM+hIR9gvUmjr1p0yU/k62ntNtYhleYJ2MzumpLd234eJmX9DmOg\nCwPDIzJaz7H9SsMzoel4EpOqgHANABxZCOx8pEXWrZvc+bMppO/S+BIOHtDZ\n9huFifJ9vbNHzO0uNKH7qftnifDwXkZYFhhv6iGxjl53Nuyv3g2W90/QiRcB\nhmL9c8YBEe2ibktSXYqmjfV/KaPTz1ZpNXbtkeGVjaF+Q9ppY1gZVM/EtLz3\nbr8A3Id7oTMUL7IZOlB48gcMmtzKHzLY9zcvlLsUC/E0uPLhuL93qfakQWTo\nLK0LM3bPIk3aAYzoWC+M7j1rj5YB8UikceafbKAfH4KYFPFQlrLCmB6kyw6X\neZxyGrgQ+MGbfpIa2/nhaePgepf6voH9y9kYbOhLHo744guCy9ZZp5sqXTmk\nmCivr2ddtW4JQvZKvv+cglJakMlvgA7UbobkWg80gBbeOe8czb8T45qJhDtQ\n+dmo4oRtHhlEpMIH1/JwfxEyBXi5LGj4Cwjy+DL5NDhsZZ27R/hC+fJoiLe7\nJ7bj\r\n=NFKw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.1","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-bf081c2-1594637333145_1594637389732_0.2271001881679262","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-bf081c2-1594637332560":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-bf081c2-1594637332560","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-bf081c2-1594637332560","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bb32d4add59046a664a851f402798da1a3a82c57","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-bf081c2-1594637332560.tgz","fileCount":7,"integrity":"sha512-7qZlkxqQpPFCrMWNGefLsyIRu/Bfx3I2iJnwtqRUw/TCeAFAKuVzfFSLPKjBlI24wkcZhC5uILOgvTdcb0VWQw==","signatures":[{"sig":"MEUCIQD1RSnFmtsFH7aXUcZn192piCz05aUNWnkLMKsZgnusOAIgTtdv9eQqUQrAw0W1lXVRtblUf95i30ClEK9quAyzrFE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDDxWCRA9TVsSAnZWagAANREP/Rr8Nsfpi4jlLZxvSItc\nZeXmQdb5aC+2aPWlaXJk44UHCZGON45ztw5cVZ+uu8JEqgEnCSMqy+N/pKYq\nfctICm1Qr96jQKEgDVewSrcPpHp0tVab60uc/X8AhVIaZRJawkvLd4uDG5y5\n2/XA3bMkjYGVXFlohsRT4Kyn2C5pBdbV6bhs9cBEiz6y4dRC46aMxvzlfB+z\n/0e3Dg1oDGwgWz1Nirlh59dswEd4GcRF3bEKdtut7c+MyFIxLjX4hAQA0MFW\nvF0pRrtaSAqhpNsfLMFRsAodR101jB4SjvdhPI1YZ7wWzkaUqDs9FBc+TV7H\ng6rxwt7R5x7XizHIGQxvKyYtABYLzfJR8POMi1i6jk5zwwjclMTHukFX/yX7\n7pzoJcIsakpDMT2bMf+9XGvTdv/IduHhHlrVehDycdxlmgAUKoYHM68M3f5A\nKzf1iHoZf/tG3+d7KXs017G5BCf0Sn/dH54CoEHGsgWjf5Y1+xRe2fCXPPRg\nbD5j7BHz667Iksi+JtLUIxp+Ge+b+lDDIjkav6g9ZvEht8Ut1Oo32I6Opq8q\nqHL642mtOXYcN4dMB/cw0GEBZu6he4cFEtfAKN5iWFPpe9IbWjOMU5RY85vA\nnyzmzMgAv6TxaLd6kbhoUCSTVz2aRA3qP7exmLrswpbhnhhoeWK/A9aG99/3\nbmAy\r\n=4fbI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.1","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-bf081c2-1594637332560_1594637398623_0.32480143168656683","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-8fadab0-1594683878157":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-8fadab0-1594683878157","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-8fadab0-1594683878157","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f6e73ec61929978e523b5753719047afb264cba0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-8fadab0-1594683878157.tgz","fileCount":7,"integrity":"sha512-wYfrecEU6woWu0fAhQEZgk1jGxbMnogjr4tSG1EeMzHSk8x0XApgaLvH2AiA9iKtmWSOed7FiO9MOfjcLTZ46Q==","signatures":[{"sig":"MEYCIQDO6FtoMTW3jx8WH0quNtEJCw4iZWlry6HjL1JvePvlnAIhAMuCSdWxzbXOjI7JEvVIhIN8DpLmzfx9dPv5y6X27wca","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDPIaCRA9TVsSAnZWagAAXk0QAIJg1u8nZpBXHHeWqZ6D\n1/prrwz9dyC1xAhkPc2hNNwDU9V7F6dCxPdRSg7nCcoHLHnNASd2r2+/DsK1\nK/KSkeAZ5ehYgK7b1WqNMHLJcle5fr5xcT9+9nw71O23OYOd0I7OGQpU3Evr\nGbXXyDM0dAm7YArC4/d6aMPe7hVmYPUKRcyDZcR2WSUTbQwk4FmFvAh2oUdd\nIXg3+ESLos1CnJ/bbEk7RSYYq6/hZdEqrsYklaJr8gEJAHZYzwxTYQBP2Sgt\nGlaJPWn/cwwoMT7xsrGywePcvmQ04oYZstvC5AVp83n4fTNWxa3KQlcn6pf3\n4PYYTPXQTIG1eum1mwPHj+VxdU4Epp7mVUMZLKE+4Wd23sSQCc255Elww2bt\nrkeqC0aL/2A2q7DksfVtRx9po2HWpQ/AZFz/tLrBz5AufPis9VWf1SzUl9lM\noNxDLdtn9RCrlUpVkUV3arY/4fgXbF3/bpj26wC38fdQb5kA91LQ3Y3ETv6A\nxBHfnFRXPuwk420SaIYlsQvEvC+uUmm0M41yKid4dtnhp77XxyFAZyKr8vbH\ngcw978iQv16KYpn/Wz9WaBQjq4tEUPhX67Bu2qjPFyBcOc0yQLC6/QOseBK8\nQmC5diJZxz2CWXiTTx77CvDbd4sszl4oSAIxE1oZtvaTN6avrLr2zrZxGEr7\nBkJQ\r\n=Kz9F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.2","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-8fadab0-1594683878157_1594683930255_0.49116442132711313","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-8fadab0-1594683874718":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-8fadab0-1594683874718","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-8fadab0-1594683874718","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dd06cee207881eca9e8c2dc7a50432e8e51038e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-8fadab0-1594683874718.tgz","fileCount":7,"integrity":"sha512-NM2tcVSLYjNwscAfgHBsHOa5fxDSbF5IsOjHCVyzGlUwSKWwjge/fk2qw4m5Fk4M4frReXKv/GuUFQtJZsJLug==","signatures":[{"sig":"MEQCIG/fFNkjtYxARlr9zZlgKixp9iNYnDBKpI2ujbDcaBgaAiBVYN4TZvVQ+QHXjKFWI3u4OwrqjvM2NqCNbTyPXq0AKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDPIrCRA9TVsSAnZWagAAJW0P/Az8agPReXr5I7+BmRF+\nT610KArlZNQ870wTdWrPUvnHJXl36RHv5RBCQjedHYVPdvGGpH8XYwQ9k35e\nk0pmIhVPMD5D3zSU1awJQl9K5I7cXjr4HuY1Q79qDPbdrtXfO2plNjjal33P\nfnE+4jGVicaG6+An/Ulvh2VGwEdB2bxQtiFGrdmWkBwvetFCgj9PXD88HE91\nWuNv4+iJs2UApueZkcUGn0AOElnaLpzpPh4IZj3KuPhV/dfpiHqXjFya5/Qm\nOND779j1/ckXY87LbWQCHOdAItPIkxWR8ukRFD31BcdQRcoIGAjeJr1ngvlA\nwMFZd2Iu9vZkerJewjX7Glcj/677WS7LEmoP12nLIPCAR0O1qlYmspsbK7Wj\nZLK4XReDgUFOYYCmov12kNvb+RH4YsSkcL4aQjJ/1bLir9unen8QZb9tL+uh\n33lqUynjoY39ObNFp5kJeV7iCRrvj23070lEtLnx/SeDHxP6VUdyZIqE6tuz\n/3DFb+qXHOdKSf0xKt3TfQplfMfbUY6fQSYp4iTDoVANqAaeQ0Tgy6sYm+N1\nDXtRQ7CZwiulai+KUoGvaRuzNctLiKshSiKzP0WPV93YruTb+86g98uK1xbJ\nnuSTqYV+hZmBrQHZTEkOzslcpm7zC+pRvtXVNRrWI0ijV22hRaczuYs2nLNO\n1ypj\r\n=mPTR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.2","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-8fadab0-1594683874718_1594683947079_0.38622578581412204","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-35c15ec-1594684448055":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-35c15ec-1594684448055","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-35c15ec-1594684448055","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cebeb9c956aac78723e859aa569568d5f2c26c2d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-35c15ec-1594684448055.tgz","fileCount":7,"integrity":"sha512-p/Y3qPFRVj/8sfNZUQPnqvdHOLyl7sXhppmtLeyOoeGS9ZuT8h1+vDLqladlZkiYvhWI2DZ6pPtv8vwlFatu4A==","signatures":[{"sig":"MEQCICb4rcRoi9QnqTwhlWgR1Uj/lVeVJh58l52ZwDHg6uRyAiAzVZqgsO0UK3Y7m2Vz6lxuz3bgSysA5CtsUthFUVaK8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDPRQCRA9TVsSAnZWagAAX2oP/Ra+sRdnUWep1fobYtlh\nRcJK4bugpYQh37CFnF6BZQyJZjvrcvLBfMya+BlzTkV31pBC2AzP//YGrCPe\nZgsGYNt9azJpMSVCabVZMbTLLZw77JrWNaobxQP/dBdMVZtdtEIy92c54RCT\ngkJ4KiAHOL8cKhFYtj6/sgDdSZ2DleKRfJhfc5ZjJ4+TEm2RAwVV0Rw7OG4+\nnyew/eDtDyK3aISFFDB5S7kWpeFy4zt9jLVSpEIKLRlyuyJxlmytOxxxgtVN\nniKuaBeV/vBFIgCSTnySsB6U7A1new+hw2/cKZKvHu42yRrTIzzCpG+Vjah8\nHcwQOCeQWKXEfiZx+WZOmpDxgdTT8UT7g1SP1x2+0BVCByCpnDrIB3dtdhh+\nCco+ipDc/MPbgK9Z2dJhbAWBHJT51pysuZle0sARbwrUz9ImGrQ2M9STE45X\npT7mb4iH5qpaGfrEt7PK+zePrhiged5zemw+CnOE/ErHUGGHnpJeIFKikVia\nld29/0YSbkyr299c+QLOhvjgq29mj9sJh7LMJ0iczTDYbd2cfXzEQyvFVTG6\nLPiRzhnN8eYYcQu/9CErLM7rys57HFMagK4p4/bJwrgNr2WnCgu7Q+Kj5MGk\nYPSmlJQlePsNiTAILgOnILLu+BllvfTmVarZBPsDT1K0W6jDg45tT3NDj2PD\nllXJ\r\n=WedV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-35c15ec-1594684448055_1594684495966_0.8619018563128007","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-35c15ec-1594684448165":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-35c15ec-1594684448165","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-35c15ec-1594684448165","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e9ff15bbcbbd869f423b040092b938ae582568f7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-35c15ec-1594684448165.tgz","fileCount":7,"integrity":"sha512-amOcuxu4ayRx55R4E3fQp6hi4yrwCs7yIoVL7L+mComB+evrwIe0NHAC3o5tP6/EmiD3hHXSnxNpb3vKYf4m/w==","signatures":[{"sig":"MEQCIGZtPRtDWKxOiQG8NMSEnBEIf+syZtxw9frytdm/+yVQAiAeyyJLbaxCamYR9ca5YaxDw+G8Z0KLkNBgoMwuy1ZJNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDPRUCRA9TVsSAnZWagAAg0QP/0IQB7Xo6tySodt1/Y+F\nR95avkAP9zp46xZnT4EAhBPlcpV1wHrkyEBa8a8YVCjXU3L7SIMgKhvWg262\nVbovOAQHdWaAw2e7r4ijGxKapoTZcVOoldX23CsGwR6ThkOCWwuwgUghhqHY\nf9MnBlceTfgATyzvo1NZgEn5fvW7JMxNnueC/fxePwyhYhZyX058Txk/efG7\nA1+wYUmBRRlgjyog9jSw6baLZnj+L/yTj6TOHYnyn6ndlHkImiDHLO9nKrqs\nCdWdvlc2ZTDxBeLvgjMjxFBRpQsABVddTZ9s2obmgIKlz7JyMZYOTEXfHrxG\nVGEu0R/a0G0aYh6u5v2GXvHXZRm6McgH1FyJjWiKakaTJ7KOTZ/fSC9o4ZPj\nx5JGCPorlB7IHO3FUIDktaUThuPGoxnrwgOWcEhLq8qSSAvHeBZ0remF0Mqr\nRKtrO+xbo8Z2P6RYi18Dik3qAcunJUZytgzyk4retD1zqjh5WYN9qbbwZKWG\nWdktASNAj9r0qo035flkSrhmzEUrj7GrY+shAc7tYbDyP5PiBTpvRPMvLiTj\nDiF+g/Fw9I1isB+z1IK2eB0D8Ja+TjwHJP7dFZ4tb+C0BPbdGNwgoLha6WUj\nphcuLGPVWpklX29sI/98+RTprkVR7bBALWnwkY0MMfRVzJqewlq4mYpLaWQB\nOaNP\r\n=+0et\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-35c15ec-1594684448165_1594684500409_0.6302211997004132","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-219ae75-1594712071383":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-219ae75-1594712071383","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-219ae75-1594712071383","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d18155bc114a126840fbfa9e85b9a6aa77baced8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-219ae75-1594712071383.tgz","fileCount":7,"integrity":"sha512-m36CMeYvNnjAoJEdp30RF4CNf+z/cnjRH3shnwh7XHfRD/kFG+jIEnYT+215A/kMS+rVGb6FdEg7P/aaMTDNIQ==","signatures":[{"sig":"MEUCIDyKZGcZtN51qHdP3BbXL+Enj3zSMsHsfPhLMLwfgRZbAiEAuk5cOln13STMJ9hsChNJWBXKvFOh+gOk6+PCOVJdS+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDWBFCRA9TVsSAnZWagAA08MQAKEjjQA/Y9cznwAei+2o\nXg9VFJ6r6N4uGuUQcgIDWi5JBB1gFTIzs1gp4djbbEfHi1CAdlq0YyR3Fpsa\nIogAqYlIRa09Gs1ykT9MpSrcS+Du36TT73YLU60EXs6IBAE2XVWogyYJkVVb\nEpH3bqlAEVQY0p0UCagGLxcc1hzpxH/iMQDCPu0QFk7zn6MwllgVqI9sP6yo\nyYPzkCcZSg6HZeYB8RnWkkeZOa3P8znxkgg6pzrzQHkOHbROI5zUpkzwgjJ2\n5ZVttnlKBvIZtxuczeqfaGa/jyfA5WSBm9FyUZh3EUw/vxVUl2VkWABiL6km\nwmbJgyiFrMK+JzrpU1emRXH9jF1gHjvf69Yuuaaa97P781eVUkO2yz5NnJ3I\niB4Z/TctnI0VqM+atnuzJlLHKYJpxdK97QkNVqbkKF7k8/BkIG4g5dFLoJ13\nKF7PqRApyjpIkS9w9pAEZySEO5/GcMTpxElfbhLAeBsWJsvF+9/GeCVQ8pCy\n3RH2B0vFZ387pfC3u6cgKBmZCyJZ/+5z5HP6IiTjX5kktYF/LiUhurHXunw/\nnbwKDvNaru1Jj8RVaJzBTlaJDjUzSE4x3MXmYDffNY5Ggj/CSZAPap15Knnl\nyj6xuUfBcpgiWGSzvMh8qqpLISIMRX203ulsT5LqBXmR6X8O65Z4wZSLDtJQ\n0La1\r\n=1b98\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-219ae75-1594712071383_1594712132727_0.2729674188815696","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-0df3fad-1594712288859":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-0df3fad-1594712288859","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-0df3fad-1594712288859","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4c32f828d44b98c27e2f60bcb86a424877685bf5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-0df3fad-1594712288859.tgz","fileCount":7,"integrity":"sha512-ObvHvNJ55Nx71pD3WXVkUv7OdTSd9Ty14gvNQ8ENMbQllXxrXnyKHD3fyTSNp1RP2tkQf5d/mwZXbrSgjmzcCg==","signatures":[{"sig":"MEUCIFmVPPWOBM/n+c4bcoBMbua3o49OUyg93McIw/YjHYzLAiEAgO3J39j/UxIzcDdEzOMlNj4db2hqPpAO9sWq1BGyJtQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDWEVCRA9TVsSAnZWagAAUcoP/jie/Gpzz6KtzNC1VA6G\n/R3+u1TPRekI83Lthf+d3ZL8JQ9+SpXAx2Ey+RvCr2TsmiM/PObu4SQS5YGE\nxhov6yWiZABl4Q41y88xRJFUZk2WHqKfVrWBauA+poK01H3FZWYDUdoPwQCu\n1OdW2teJu9r3DJopNPu1MpD+MlWYZnccPLOJpkkV8gIG493cVXhC02lQXpu2\ngVMWRKyknt7hN3gsm3MKE/t+2MqKthRcxu097aqIfomM+muPdtYTrkkQl0qW\nVqDjD/w5ML/oNeD/gf2XTEpv41/7LQMSYLxniV8V4W1bPTmQH6gJybVEIcS5\n4DwjvqKnsQZRnDCYEN62+xdTpr4gItIUrbQ9LAUIvm4B5cBqf6P3ruyak8g5\nBI3MaE5DWeGcObgjzN3oCN29NQ50me38AmYbMvFwwlIwiQ+REGGxpQ1bxWtP\nYgpB88GRuD+YZlgLIoMa5mwA/sR7o4d4c2dzTADeM669Q4EugUWvKaw5yUfW\nxeM8JHG9wHnhWSW8Qok4WLmIYTEvw0DUE3PTEeNRxU9KTHrYD2H+YYmxymgq\ncNGnHX4bX0XhHGqogJDMnUqkftXCwfqoDkoC9hqT0StwiGOijn4ZyiBCzhv2\nXLkCwY3xoA0YIMnPxhyJ5v1gr9MJ8SEsbJCxFhxZ0naUcT7w6czv2+yroUlz\nEAb0\r\n=XtxL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-0df3fad-1594712288859_1594712340755_0.31084593745467326","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-e707588-1594851490230":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-e707588-1594851490230","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-e707588-1594851490230","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dfec564bba34dbb15bad886790f5694940fbeb01","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-e707588-1594851490230.tgz","fileCount":7,"integrity":"sha512-MfCTRVc4h1uwaJo8mPb29pDluFddOUpo5xY4iReZX3OZWCQyCnOzf+w4UMZhdEzv4pQR/hJnhf24/TpV8OddAg==","signatures":[{"sig":"MEYCIQDNh6dciKZIWbpoph1JstqPSb1uyByamJdnhjRPPzO82wIhAKbyh/OK50/KxBRWKBpYiqNteOGJ3gPW8yrBWUZiOTbF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD4DaCRA9TVsSAnZWagAATDAP/2xY0qubRJNJdGqkZDoH\nyZeoF1YfDjZfN2NWXTIaAu7t30LVRHTPjePcjcceehOk0CvicamrtgtOMjs3\ndMJCCPqUprSZQnEZC0e6SONHhCVKuDeJbo9ife3XiaBn7Ddu9iYdDv648/oe\nkzCWT36fpmIsj07jpQ+j+nOoYrpEeExj+hUGt8Cmo4hJingXJ6M64kdToXyU\nlE5tykhwRE9OkJ4E/9vsMQfrtvpj9+wqIEnksJp9kUGY8Q7+qqGjJm74ipQN\n8E3LX/s7ckcWK6frttpod9PYvUrp6Pyfjqjmr3vC/4Efr6WipNNLNHBZ1Fdh\nA/fsPkug16TFOk1CmA2w/Q3/tGPIPFbm2ozRvLdspJSop+uDT8GSuXk14Xkj\n5w0mkpn/h/7Aad2hMyCZZgjNrGtV0m6o/xDrjyMSBsrT6jX1k5SqCeNt648P\nkeMhw3pl1WOwiPvNlSWLq4OpBMwK/pBeuCVAcOh/L7n9dCaiVg2Hhyi/cCN6\nZ0Nv67tzvQ/hWiyx/ibLgAe4kfyk5hcxfcOlpMD4GyXOpGHD0/B19wdDgWYO\nlFOrSpmlf5Y4QYRMJT2wO49Ut8oZaVDiDGrKhWKwS6BpcKrHXGDxwxO7FV//\nUVOBmyqayq17BoBC7Yf2E+96NAnr7YQarrZfbYun/U5HaUB5LlSpKG5IG6De\ncQXM\r\n=RE2R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-e707588-1594851490230_1594851546103_0.5287779027880422","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-e707588-1594851489384":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-e707588-1594851489384","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-e707588-1594851489384","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"33285e5023e58e1cead0fe704e784e8451f35448","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-e707588-1594851489384.tgz","fileCount":7,"integrity":"sha512-cmJLBY2o2uE7LINbMB3Jz+lAnsJOs9Am3KkcX7jv/IvmbERxv8HQkcxmvIdDbrYeioB1JS5QJG2p4C+OT+aDXQ==","signatures":[{"sig":"MEYCIQCPUON3zrzwstPX+xcvHsiFctx7RRmp1HM4cnaqi1XVhQIhAJsjOKhDi11o45UDvMfSmVB+x1E3rqPS8//CrN9nFhbe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD4DkCRA9TVsSAnZWagAAMX0P/1B5W652KNhCYxJQ8YsH\nqJ6oOLPvqplI2el2/S+yN0RMOCisFljAc60j275vQgji7kzLhpDvqrMqLEat\ntfinvLJisg7d6yvVcqrVbMUhYB9NAq+5ttIcL977MZVoLkHmHf0CniPrDvNG\nnSUdWBKM/5CcZ5BH2r4UOZhxNTdZnxK7PWvy1DAQTx56mhujvzMj4kIX1iYB\nE6D6wLpk2fYtOrXYEfzkPGTDcNCS/VQVl406aLvlHGyAn8+u6GwS+YFY2eyk\nZAewtG7vgr/us4jI3XMXOVQBtBTlrG+gN+aJtVxJSzASFDuhwas/kK1peMke\nYjdE9ujCiDYvRSOAlJ756eajq4YRjmMsCIv9RHrxpDDgY3sj8wrbBDzDj1CJ\nd3ITY4MIzNas+lOeQpX9mi/mr4u1hMlfPUyc+jA+tP1nCgg+eS4X/njQlP/f\nVYQBiUChboY+L6aRMBcvwMsh2M1eFep5rEa2+rneJZHTfgeFCEKe9ICLz4ol\nCEgyWJKws+xwp9ZJLFlCIw/AYyyZOnC26cJIBzw+4O+9GwET2qnu+moYts+z\nE/uFE7ct+wZc+YLN/wlV4xAnZsBJq/sHb42Qzra9R+BjZIMM8k64eLtGrkzK\nNWGb7YbrqtPiEQiCaZc6/um3Ml+NS44A5o21Xzz2UAeeWu4Z/1Vg2T1DDp7c\nViVf\r\n=weGE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-e707588-1594851489384_1594851556317_0.9887084716413883","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-e707588-1594851494417":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-e707588-1594851494417","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-e707588-1594851494417","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c96a84877a60d65da4713be88eb2cb5f115ce927","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-e707588-1594851494417.tgz","fileCount":7,"integrity":"sha512-KkOMzCgTgUfLM2sf3us13bR4IRrYu7IXOxKnv15lsybvWbu+wBKlez4jeYfdK6rb8XLcGGZaJN+gI7yjX6Y0LQ==","signatures":[{"sig":"MEUCIBr74lCkhfa5lAx9ANMZjWJzv9eiwILvIijo7Rc/cowJAiEA3vmDHdbP/HROKjLo+72PlT6o849CCKWr8mIUHhSfni4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfD4DpCRA9TVsSAnZWagAA+1sP/1cXSf41Meh2rp+pUurh\n375WjihLAIW4rVPhkshSIrkySDuGpNB2psjyhVHg6O2q1xJVnXlLbdI7iEte\nFEIvqTXJha43wzX74iuSszO9QUzWwkiDYI03l8e854r4Ea0IeZYQ1b9rFo3e\n53zXt3atkVoTm4I2w+paF0wuQcZuC1k22I9qFzzw9D+pz/sNrA1a4wdiubXL\njJw4nMnGcxZuFn8W1gECjHg4tz1XMLXgfwNw6GaYNJtCoYuxgeLcrvOQ75ln\n8eVwHNzs2W2EQYXF/pou3rktpbsFVi6+IzySL92dNItYInqRnzLS+3SdRp6i\n/QyhEyrTW4cO33RvfUpmJEkjqXgWos2jHecDr3eW3LjQMLkgfjKJwpVmz86w\nRYpVjkzhm5TlBMPQNZrsU1ICuC16/P9NT3FLRNl56Bup7CwGBnRnr88hmbBR\nHTIOoIQD5NmYt/Mh9OjEfEgTbvgTwwvmU3Bi0zjx/D/kzRYZbbH+f6PCdC5o\n7vgpqf2NuXV5KufaZtGT/vSnxXp7hDgfeucwY/O3bS/IGjk4MRXEPJ/OAwkr\n3aQSiEloSwQpTb5KUqN8XvXJgLefzT/8pZWgxr19vNfwTss+2fLgwoq1UlqC\nFaCa92w5oKkdVN7kE0t4YwI7qhmKCiHdh5Utztg01fH91ckDvxH966kuDHWw\ny++T\r\n=d2bu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-e707588-1594851494417_1594851561043_0.7618884880183832","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-ee99206-1594929166597":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-ee99206-1594929166597","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-ee99206-1594929166597","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"56a09854599894192b58f2fa8dfeffb603a92f04","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-ee99206-1594929166597.tgz","fileCount":7,"integrity":"sha512-O3zWm/K7d+YmmeXoY2fb901gJDrKsMs3FYTIaVH7XM4eAJaXWDf7enOQAdxVPqop/knAsBRfzrhtUbcqqOUvlQ==","signatures":[{"sig":"MEYCIQDc6wqtgcIR2+VCm91RaYezLjdzegDPG8QFrs9h9K1chgIhAMFFXSU+jn+HimABBixEq3lqxpnMFAGGlGx9hZhBIKg8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfELBLCRA9TVsSAnZWagAAGQUP/2eNdHF/SdOUvd/RiUlK\nZJIjB4LPA09y6Ixy4aWrYy2tq00vrNXL9QZp0hQNLMZTvq7tbWHeglvd+sO8\nF6rq33HPjkWN7SWKKBNCJFuERUakayY0/xvKxfxkzKmIDLAfYKkGCb09qb95\nSSel9WP2Fzdivb2tq9zpPQ0G5wjSjV7DY5jkG2tigIKWvf1IToGJBhtcGVuI\nHZ7VswgLpwg7bhcyY1DJPoQmWUkMIkLQnmQgbHREfR1CsBTAAiOZLOxLmyTS\n11zKR0/0LzgpQYWsitSFEz0kahFXxUhQuKKUVOKIluOmOhlDYvyArQmwOOOb\nqVLiwgTSmUDmgjwMIePfwWGHE0QZcPjoG55zHXIgQ0uKKP0O1vO8glYXW7Ha\nROkU6nIm6gDVR3gaeWpIcDFC5Tz1sYL8iI67Mlckf2R8srbanrNgw8Bh5SYn\nt3lF7wQPFVdwu8mTLJkUtmMW20Fo5mm+fER1MxDCQgNQTi/hF5TE9TLoNDfx\nq4mVu5S9ODtJaaJ0Rr2sfvbK8gymGm4dQ3ZD69o3exCqdcvg4hD4o0v/lag3\nIvNmgmlungF2jySimKVswDiPj36u05jtV5oyaHjVbQwZgxFXrvi216GVDBOj\n8YHHpt69h75R07ppp7i68teSxI3VegXBCn4fZUGo0VDNAWpPOLxWzPWKVIBQ\nHFhA\r\n=Wk2f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-ee99206-1594929166597_1594929225497_0.14074240360266677","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-ee99206-1594929160744":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-ee99206-1594929160744","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-ee99206-1594929160744","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2d86f93b00232fabd9393e6132193d97fe70ea5e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-ee99206-1594929160744.tgz","fileCount":7,"integrity":"sha512-uYwRjOxHArkkk2KZNCSdlYlvk8lz6rSWDYBmYHBbsX7jqgCKqnrdPG8t7ExFKRr06i/t4nRpUMYXNroW9ZvpzQ==","signatures":[{"sig":"MEYCIQC2MehvIJ7wesBVq3rdJpwFQPC44TNOkLU7vu2p20Wk5AIhALXgPHu0iX+Okr1DYX+UoOpUXKctutI7BiEsDrgZqOmX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfELBZCRA9TVsSAnZWagAAt18QAII3rAGhCBL+HUFs4HLj\nmwKkWuf8r9rxcNiRCVIos56BJMPd9+KQpAWtdUKnMFXc2h7IhLE2oOjuN02j\nvswQQyoN4FCR1di/nRsIQ659WE+9oW0vWapaE6493cQaJS2P7xVPDlhPpMAQ\nOJRkzqFSuMjl9G9sz7n+PVv0i2uM0rHtSCm3KU/ArLd1lvTbTdmnPNcCl8BW\nEVmQrkWcUcT8S6WhCMuyAlXxld+j9RSKwoUA8a0+mZ9rxK0gXSbbKL9yzQfi\nJeRnlmYkIHueg0NQ0W37Dyvt15yXK/uhXQQDO/vWVzs9Zb3icHVOsQZWEoab\nPNO3XpqJ8hk0vSSOvh/OIOOlJpauhburayrNgpQYR+yyLvfsp7We1PnLXCTj\nmMj4M6DywtFrk2cKeSVfkpFPyhv2XSa6zaNYisLRA6lJl0WdvdOIzFnEeWcP\nCv1pE4IjgcVsKH2oDnS5RHU9WeOeFVuUfbPx8A97FctDwVsdlWjGrspt6fDH\nZTACejbrD5VCanJ6ZJOYUWCYTUj7fHrsxefqgaPMB90oBBef1NtYjwTK+FsB\n+zjiqYkuvIptOZC/nW4lbE1UCU1tUzC4U5z7j8PEgoFZJHtLOYGVd56JJjL5\nLe/+JwdwIJRjJNrh8BQNQOnzj3AXZaKoQv3dpWUKstQc18w4KE9yf1gi7w0M\nx0hc\r\n=iXqK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.2","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-ee99206-1594929160744_1594929241152_0.4966464463165343","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-74aaf2e-1594963764192":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-74aaf2e-1594963764192","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-74aaf2e-1594963764192","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"258fb2e954dff5fcc55e3174f8910bdeb7ec53fd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-74aaf2e-1594963764192.tgz","fileCount":7,"integrity":"sha512-0WQaTnvbe9syyApwM9TYfjTYRqBALsiVr+ees8QnkJA1j5hROpVNMo0e+yLi3Z1fcp7LPIvLdRHiNF78/bhfQw==","signatures":[{"sig":"MEYCIQDQ3sUuloJtbqyxLKg7j/yxAlD8FKXPwWB0nfZXoXxGBQIhAPc8WMntvhu4LbrHJzLivFFsf9+8/Xa8i95WZlCQpBlo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfETdhCRA9TVsSAnZWagAAmgoQAJvTBIzfakVu/oPDpQ98\nJSiiZN7HTt017b8JpdBfrKggB0AntAMomjH5R9p3XhdLhmMp77AIchtS6Khf\nWUtzEpCHD/178ZVvYbc8M2+6T+v2YbUBPlh1w+wGF094zix/sHeuCx0lw5yA\nA0y3gh79NeYXJ3QxwfOa3qC3+SxI5bB42OF622LGDz3j4xomF2mKDJ1F/JcG\ndGLd1rRa+istLd3aXppX99SkwZB0o51XqnqtluN+kuQaLFFgHpJwoUsFelq0\nXH0K6uopFbDD26qx0qXpT7Rdp8Ya0uU+8LiX6X4fsXxW8NuODtC1jIRUAUPD\nC1y+BjwT8046Jyodi0WWXAK++rm/DNlQk7oV9jJVVLk++yQTxmsXeNOe0vCC\nV3xqgbBTPrYwyCTkvv0uTzOOnqH5opoLBfJYLzaNcaNSmgKQ56kJzPidpo7d\npsuNGFQWBgWcG+B8NOHdX7npcnm7bdRpJoFflcxuNlfO1lfs/N2In4aCCWRh\n6c4fBkTXy1bhVKW2QeTNxxZWOFh2E/IlZ4veNXMbgGtSACraqUJIuSs2vMKY\naY/HJTTSRdFhTN9YV9QSok4E3uZXWbx+Yl00zStNJhKvUsBcUfrxVJcca+3/\n6wiefvdB3O5ND/zacsMKBKt2JAQmLQdauz2eyHhD0IQyTIiGz9FCEQA7xLj0\nqb1R\r\n=hVXF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-74aaf2e-1594963764192_1594963809461_0.16884257957351578","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-74aaf2e-1594963764968":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-74aaf2e-1594963764968","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-74aaf2e-1594963764968","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b91948cbb1dfe78915dffc03cbb3bf32aa38f4b9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-74aaf2e-1594963764968.tgz","fileCount":7,"integrity":"sha512-FZgkdIbC5QcGsoY40jeanEa4TDWidAJAsWbkY/OkyQb/5KN6pIntmyBQbfvNaRsp4sF4IXSmm6ebPHzJN9K5Mw==","signatures":[{"sig":"MEQCIA4Zo2WQtLUR2bBfiE3dyIlZaxCpnGgr4rIUUXVoBALzAiB66tvzG77MwTdHkDLgd8LpBDAV5FW08Bt7mFaIXPptcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfETdxCRA9TVsSAnZWagAAxfQP/2a38lKM40jSlA7YpB1i\nH1luB23omL0hevSk0Yw6AeMpiIvRv/1ivnaX3F/ahbSF5gvR8Hxv6fSZPTJj\nMYfPvT9Yu9eaAN1nu6pbWyArPVpjIGcWHzjfI2XFTQzr0O9B9jTPsNHyu4+f\nwInHW95cTYbQJdYc4iGDIbiviwIZKcvTmsjrzilqhonBOr75BzaCCz+7HJmZ\nRZTuw5cM8+B/8AmihQYBXg2SHcmDVPys5qLn14wMmISxLcMDkyAg7F10CpDd\n0JMhIkw2xCALpZZvIk6+cb2N8f+UJ5K0elS/39wyvKngHZ64IMSvPkcDS6Iy\njTmqLNx82wnpZIboTE7Jf+UYr51pdFKtxn840vwYn4XJKGtg/brT4iYi4mO/\nI3JI9FYWfml0eszUpYAKyUFNGbRCoy+sqT6/sxU0A5OILWEe1aMN4mwY5ewL\nDz14HqNkf7Mo/uCEBiLWvdCgun0T2zkfTwBMQGLutOqcsBRqpGj8aUc33t9E\nC1lwXGW7IXxeZxgLDAmJpArVT1L/mpzRfBPiILKPsd4jqHWxVWlMZCmTUvuF\ndbZhIzJEcS0qas6jIG5BAhR8cveL4i0MIhGtw2XlVL44sBrEDc8UhaXzL9YL\nyJrBy+xcsQHVC/lFHJsZgUtmnTULttuWxY6fRfz4ryYr3BehTaM7+XvcDwou\n4aTk\r\n=RTpp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.21.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-74aaf2e-1594963764968_1594963824743_0.8313606281799393","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-687982a-1595047573946":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-687982a-1595047573946","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-687982a-1595047573946","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9989be3d232a82b14c9481109b8e1ee729df385f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-687982a-1595047573946.tgz","fileCount":7,"integrity":"sha512-5zHyQ3HfjO8/3sCNTDwVVulwzT96ersr02L33vxxhsw7cXM7tjh+dOPLXMHXwIhEnkFLQaX4XRtLksTMc2IBgA==","signatures":[{"sig":"MEUCIQCyKlj3V64F4P7KlF3sGha+lqxsPmlt4bb6uT9pRoHT0AIgQjfbFYDoBGaDLlLc9A6MdxHl8NfSPOGe4DPKtNa4/G8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEn7JCRA9TVsSAnZWagAA1y8P/2Urx7tbeNL1Nwa8uH/9\nytlsHoewh1w7B9VvRhKL7fRijtaYJqPVUoizJNJx1c4rNdQsRxZQjOv/N/qR\nVOIluBquJEiYdoDLS+FEA2PhE3MaAsQpkG0a1cFC7SM2V73a6YBdbPrKaDGu\nJFYnzPfiFYVzj2bEfcdevoL1dqov+JRLFqWAIxAwC1A1DAS7nHHnTbWctFtc\nU7FMPoSMudagjMkcdr2BFNLNCse0ZDH7JnPyKxkyKe3YvwxC6Ip0tVOmMLRP\nUHi9wHz9jvCrWIfvvALkH03Omb6yXG3N4sD7IsHkIUra+qQbQZZUWBCYuHDI\nYe90ubCGkYKc0WYBWVOh7aDeSpJPxQWT+1eu8F4x6gMU/vNETDkr86szHg7A\n3X5VNSPzhhbuc5EEt3CZmluse0RKaWYL7EFh3mJmjh7tvmDTuHwCt4kaa0vi\nMpPr+lkJ1WBBrsyC/pzLaNyG9gcJBGgGS5tgV94chGiL3LOKUKz6/asIziW+\n/xqIRyZfORG6zqqZ/hZrhVPb8TV0rGYS1hZbgxwOTJESiwl7+VFC2l3p+h3W\n3Dlrv9jQcNk557xR1J4Z1q0ArShjlS5SoF+BYqipbhkU4fcMqSsZi3v3QN+l\nkJIZu0IPYxRbuH03xrW5LhiSqYwpC6lQa2u0IDgaRsoF2f0JdOsRxl6rB/6X\nIU07\r\n=mx10\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.22.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-687982a-1595047573946_1595047625271_0.602111622428358","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-687982a-1595047574980":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-687982a-1595047574980","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-687982a-1595047574980","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c5d83c4072e528eec1a4fc300201da695f86c17a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-687982a-1595047574980.tgz","fileCount":7,"integrity":"sha512-smA8eIlnouJLrBHKN5ZBUAhVrh6eLC8aKWs6SpLps+5P1nfw64jRDMgTdGqIw0ydRKcVxzE82LpQd/NIi9JvfQ==","signatures":[{"sig":"MEYCIQCLiqU3dJNmbK+wcRMHrCC1G3aSWkzuu4UsSMutJ4htTQIhAKaviOOA2G2TjcvB7QgsmMWs0dJWlfcfPpfXMNnqFzen","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEn7QCRA9TVsSAnZWagAAW0MP/jwjfVT3gcuPOvCBw725\n5XeyRmsReFqCOuKZWjw2aTQ6YxRuy4rHh+kdXzfEBNO3ityfa2iX2nQgX9+C\nw9lNsjV4+1ObsJd1vhCZjjJxjmq64HjTGTGnvW4vAoUw8PFvew03DmAKw7fr\nm0u34SnqO0eBihF2LgT2AzXLxvUFU9kA5XFHMjY1ZI+Hwn3UrHFMUFswd+Rk\nWBDUxQZ26JgL1l+B1UldJNnsHJZHfXAI+DxekC0ZbWJIXl+iaAzUZbyVDlle\nPtWlsC5t3zi+THt/rFW1+Hc34TWJXZ15WhWccIsHHoh92sp6rRKX2L1WsnZK\njatStkrqF1vd/39ax6nuDQ8sPBSsftRF4mCE7xydjSPbMvJuoDsCmpTlxIpi\nAGarDF7fAaHVSelirQtXcbrDbaQ/+EaDMp2dt0uKp5COEZvqleiYDxzraFoL\n4m3WrEzI8gKZvDBQJuiH4v6XoZsDzYPf/a3XYJl7V5yoHlci3ZJI03xO90Mw\nas/PxZkhITOZSK+KdS+RdAcy6z/D5z1/O0YrrS2rK83GZcBRUC9pIhgSoGlL\nQlsShb0LUF7mof9G5yMSSFDH0VTMa7LX1a2N2Im1PcOmcdjtjVfNR0cJU0ln\nGIULWx5zxAn+HEw8H0eEjTLoIedEwFVg4+ZDCdgB0Sq6qaQd1ak3rtm8YseE\nz/T8\r\n=qFUb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.22.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-687982a-1595047574980_1595047632275_0.1382104788499532","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-6719245-1595052611845":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-6719245-1595052611845","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-6719245-1595052611845","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cacf88583483c8dd5fea74b98aab3ee0868ffc26","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-6719245-1595052611845.tgz","fileCount":7,"integrity":"sha512-f8NQcaxw5NKpm9UNd4jV6zV99cIT2nwjPktSMbvYH22suhhYJQ3HGrmv6UDtI+lluqZ3DNeDpqjo8MOtIEE5kA==","signatures":[{"sig":"MEUCIQCg/wM9ho+wiC8hpX++513iHpnzY9dB12PA8adg/alZcQIgdKDWM8JVXCVltczUARWDdR74oUuf8Ova7IzT/mvb4bU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEpJ5CRA9TVsSAnZWagAAKpwP+weoOifx4yJSUHEo3zim\nnh2SmxGAQtg3HCu/3TlvnRv79gYzOBbg9xlwB4SdngEwlGRHN3vm493ghLo0\ng90hrp+of9Edw50Ch5wFSb6RqU4p9WCQ+nye4A3y6PwJa+tTQ+NIVzLbgHhA\ntmFKH1qQMKlYSjQ9eU0WTW7KjAKGSKrrkK0nGHPOtFMP7Fn8uRmzYysiz3dZ\nf8DsJM4zzRD7jqH6ORStU8sAif/YvnTEi2eCgbuFeC9kNYTNik6eY5YKckjJ\nSZVyTiKo/+fxoZxSNd1L43HMakZStt0do60wA+qGIJRIxDoeqx1Hid9/mtVy\nat1yO18UUmc2FAUa//LTiCCAVtgUT1ODpYq2PfxVLuzdBJIJJb8+TKkk+lPd\nAan9ZTJ0OMZI3lPskvuogy8bRH7wxGXtSv6PBOzJ1RMji5rUOI+9+Pwe4+IC\n2FAxYtT4xPwsKkuobriCv1d3dAtQSldrkrWcJn13uD6m8YDTDVisya4svvII\n1S7G2mvRIIc1zbkIQu+T/ijF5nwTJrVJ0YgZ7FR1Q3nfUewGkKdbPdK2DLNX\nmulnLoFm4/NADNccH5ZXaNbdcRk1z7E1K52nT/hVZ06rhEL4pJeYuESCeVem\n3CyTO2HHeFCh8PO9EnNrWadMNwJ8uiwuZJFvXG+UHLDIMwpvqtfZTBbA1eCr\nUP68\r\n=A5hc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.22.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.4","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-6719245-1595052611845_1595052665240_0.19954661408932806","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-49d093f-1595087830249":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-49d093f-1595087830249","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-49d093f-1595087830249","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f0c44e04074bec3a2b9746f2c3067fa3816072bb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-49d093f-1595087830249.tgz","fileCount":7,"integrity":"sha512-zh3jRiIXv7DmwnqJ3qhq9P5nTPgoKq2GImChXwkaYpOVzczUeBGMF4os/164mURtFL3ZueI1HtzRlB2MV+4YyA==","signatures":[{"sig":"MEQCIHozdpL08O1rY87iLJ9Wzws6PtGg5qIWhcLxHGZT7/slAiAm5F0XnsWUWIq+kHYEQVGhsnF7svc2v5F/gQddnnv9bw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfExwECRA9TVsSAnZWagAAMFAP/0QytU47F+6kihGvpYxJ\n6ifOApRnxMYbhwnh4cABDprBIOfeBqF6rc/6SWRggdDANufl+FQOtlfrlUhj\n5b69BXCOEcMnX8WZ7RVwD7uS2v5em3qyVWbaBoYAriOwbpgwggN3hhBDLUUZ\nTR5O82jGBxCaCm5no0s52ZLvDpe4UE/rxmHh1WX5nCmPRva/8ZZ0zw9++2cl\n9FR58D+cmeWZFPQlOwLr8woZ9RwQv27cT6ATg97515yAE2Ts9GtB5QVE3aSh\nMZlsgVZlRDv58Yr2LfgFzNBuXV9leFJjsp2c/RwE/3MesIeyxFHiNdTZLw/+\nYz5+iU0vPEd8rIcWapRYzf5CF63aMEB8JDIxmu0QYzvWG6Ml6kxD+9BB2XfO\n9Ei+eUu3PBxRsZ/z0q5SKCe4EoelJU6x2F7aLrAfK06SiPHkwQiyGDH5JwRY\nrS4RgOMt2G/PSDCb5wT/7yE3w7ELOYkK/ZdtOkKU2KREgEJY1zT3797sPRaj\ncg0Nn4CF1X/d4LcVWHkjd3Rc7+GQbeHvEStOH+6W4z2COgR7QADA3YMMr86x\nVPGJso+Baf8BCQVqsGRPR2zDI7gXKim6kBJDst37Xb1i37pGeBCVoAZVcepQ\nk/BVfF2OE8bLPF7ZCR+i/6X9eeVAbxccw2+gLamwfIE1bZrNQ0xwW4Hy9+dw\nQ31x\r\n=D0Oa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.22.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-49d093f-1595087830249_1595087876012_0.016446310852925583","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-49d093f-1595087831358":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-49d093f-1595087831358","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-49d093f-1595087831358","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2566feff439f70c46b469e4e4e6095748034939","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-49d093f-1595087831358.tgz","fileCount":7,"integrity":"sha512-NzflGfF2HJwAsdOTvmI32XLSPDWvhptPYZJo6OyccwteFAizbrEQq8AzSqvaoZa2GAsmKVYSA0+IcnjfXzcNwQ==","signatures":[{"sig":"MEUCIQCaZ7DbHzdby5pEZUA2yAtsfzRBdl7qTAopwbzkSza1KAIgHyJw9X8t5ZENAXgXy8MAoyUqpVInd6w3wovc7tG3WZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfExwMCRA9TVsSAnZWagAAvNEP/iOXn89x1zJJvntuczpR\npznYyTBR47L5J5P2wNQ1DX7JcbEeOlt/9CVn+xQ5TNJsKcSTk/5UEYtlsTnI\n2RVRkUC2s1SlgHBXOFa6YK5WqF9/AU/cKffK8VPUpj0e/WjaA/76FSjETHWG\nGVHwFMSn0X6J+Gw4N6MqX1Mc/mW2eCQ1imb98qd9cQRXC/2PsVpfcoBQpvu4\n0t/9SBjgRIJeLSnQvyx3MvS9TRZ0SMBmoU4mC/f0VzY5vKH6PyRSWsODsI4K\nL+TVVVu5xziHNWwfbRbADkzNmTAyzA2c99PovVW+56mqFmTbB5NQ/6uEhSfD\nwA+qzAyTxqFpzUsJI+3rbTePMH5n/WCbxukZwhxdqfwrOcVwwVMdZKX5KZsO\nFX9SH47JasI4YWeutzwtXECtL5yizAeS8rfoAgpFsObb0s1y2EWELqjxkptZ\n4MCLCe16tys1wr57rnEyaFs96uMPSHSGaKw33cLu5WWAxCtzJ/zMx4/FasLt\ncrq6Lz3e0ykbUquhAIWJAJ38yiT7hJc8HTfilf2CFqZ+qJAua14J0E4KOSm7\nKFFLg9mgt+OjKBxZ4n2/iol1AmJ6AUdpar/BMpulB44R9DnDHc+dwTRmTAbf\nGzKUmoLOwDE4a+y5bFYxWO0/y7XBSk6eeQ+S/9gtYuSP8X60BuUlEFKCN7u4\n0dCF\r\n=ndDD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.22.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-49d093f-1595087831358_1595087883707_0.6656204408252073","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-946dd6f-1595099943103":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-946dd6f-1595099943103","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-946dd6f-1595099943103","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"66f9295a27d35303c0d42726f5eb936bbe84d8f1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-946dd6f-1595099943103.tgz","fileCount":7,"integrity":"sha512-qvtCeW3IRVIESOwlYWfa/omdYhlY86InSCp0rYPnzhQAvrLvhHdVbFzatO63Vt7g+g3dQx7o2B7313hDl6by0Q==","signatures":[{"sig":"MEUCIQDNvnDs/fXn+xGbupqZ9t4KkGxV5XXkfKik26aRihpQGwIgIh8/wliM1hWYe0T9v0zsU8WOmxDA3rdrrb5ldRkvp+w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE0tUCRA9TVsSAnZWagAAqqQP/ROhWx6onH+ObejOKNFm\nvSBPxY8WkCJJRelZt4XUFjJw18XVm3UdUuacFn4xIG00hUPgJ4RgmbVXjxwB\nM1X2M7fn1qSw9Z31bWWN3CAC1lwS7o25ok4j/gbknFP0j6wHAcjsyRgjq6HK\nsbWYQdm+xq4NIFqyfcsCnAd7S+IumzQXs9tahzQcHtO0fhfLAyY9+bWLzv/g\nScQcymH4Ej1z/R6UYpePJZ1JUcqbaj32GOAtP3dNSa6kW+feomT0ru8y4tVV\nDXcpxrmXw1zFU0SH+TzD9AwWmW0IDzV1HuvUiXsfz9dmSgvBEzd9y8smq9nc\nywui0me8wyd7M9E6z8U7l/ykQrgleNq2EuPnt7twTOmwt9dmXv2ycNKJkFX+\nxUL7Bb6t6yPFEyYunjtQBI1ecI5rd7qorE7cXFlSIpETln1aIhonEZ4wwwby\nXtbWQVUzTUYS8VhAb88u/HzIu7K2PsU3CCmu7F4VKcuvMUoQRVSM37z01MQh\n8TRET+inz5ljmAQELWgSMBaYDg78j4W85jA2CEcXbpYGWGiLNszZlq2Sfjnj\noSVCrUN83AydvRnFgVo71wX7764kEdbqO0Z4H6vT6pTILxYe//7zfeLuc4yv\nM6yRcNIdEtEyBqMB78T1DuC/bjk2JXKPrLkJ87FCCf4vDMare6LgtxBY4qal\nAHyk\r\n=ntaH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-946dd6f-1595099943103_1595099987690_0.6920375338760523","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-946dd6f-1595099945070":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-946dd6f-1595099945070","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-946dd6f-1595099945070","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb0bc1eb829d48afa7c3555c5c196776f3514944","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-946dd6f-1595099945070.tgz","fileCount":7,"integrity":"sha512-+DExnGCuVBHW42kKGhZlZk5NUuX8Gt0NKtCXdGa7sP6AZshU9nrWVMvVoztYTqcvlWIYsVdDEdWfceYxkvMXjA==","signatures":[{"sig":"MEUCIE74GLc6KGK4mboLZN8YJKtJ2+Our2UHmFgmnaazeXseAiEA7tTG0UzYh1qGspUaczcJkGcJ3CuDfP3ePl6cQnR7eVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE0tbCRA9TVsSAnZWagAA2PoP/3dYMjn8kJ+nuQVVIgLH\nfeSAvsBJ3hYOWahONC9sB6J7kKK+pdFonuE8uLF6LPx0TR3YZtU66/c2OKWy\nD6qPcYhrKIpSbpYCZWwu/22cLP9dBdv3v7b3/ChZztIwE2FRncOhCUL9A+A0\nCCwzD4WJi9QxuDxviG56t+3etO6SfQtUH36jLvCUpl6yQOnllf/6RiuHE8lm\nY/mLEbeGBJxwDk26vk0A9T1GJ9zGCDk8Yledz7KdQTME7DsT3aeZMqj1raW6\nLA0ylXz2QiClFY3+6Nq/GJ9aWHO9hoZK2H6xTbLftAbfU/uQpjsAkvxbXlsr\nOeKiNrFMaVUY/Nqa9H+Dq4pwDhaJ4vt2v90735wgCYh7iSmLtnCexvWK4YXY\njbAh5WdcOlrIzOx7c+n5FwdpUePFmyv2MVrywD69yU090BCyANF/VeSx8sVb\n1FqbnaxlAgjuAEpvpjrz7tzhAqHorIat/dffot7dmlxjM/AvTdfo0osoDpsT\na5th4JfjG7thb95WONSLfE4CIyI0k6s5IsOGW9Lh82V3ER9ojP0giBjsXD3p\nQILwaKfQRDdEZ+MwXUD/du4MX5i4ZFacx5pAtgwz97LzrmIsCabK3pjZYPP+\ngsMAI3uIwl4MKPDhGWaGPiYkx/+21uPDAcvXZjhGqXBCVgwWK+n/x/pek6ZK\n+aix\r\n=NBIe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-946dd6f-1595099945070_1595099995466_0.13520955028705783","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-9a907b3-1595100304446":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-9a907b3-1595100304446","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-9a907b3-1595100304446","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d5b21d49610952d962aa362edd7905fd0175d57e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-9a907b3-1595100304446.tgz","fileCount":7,"integrity":"sha512-iGc0v82wisYocLEk5si1al3ASonene5h4AN4f9jedPBel2a+G7rvluuWX4ZCDdeLrYnl+46iEIGwO106jFYM6A==","signatures":[{"sig":"MEUCIFzZM3MXcxYrqhZtUgPda5X+UDVIndVLOXO4XIm38ZxBAiEAoyE74AQTxUxiz3Uky64MRwsS1byEHNFHZKcWmMMOndU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE0zMCRA9TVsSAnZWagAAW0gP/3uF3OacPwHt0QykxaoM\neXFtfoyV5u6btoM6rmK0rKivNGJRaaxd5KH7eSFilROd+fIf+Jv4xZHC1A9/\nwLtkdKStU1sV2FwSM95Q/8RhPP0ZuwiY7PsVcUpBECUowSPQBO8fYGL9RxUU\ncb2TH7zW1bgl6BaKZHjLihZX91TzDh7XRjz4GOWyRXj9Ia2Y9hrJeheNvlaL\nNXq5A3TPlMpQ+CGvKcVxI4iKrsHmbklW3MRLSZYzNt8TQ+XmGkAvACWGBtHb\nW6x6sl5oNDbI8vQNxe3mbZbTYHP0lYkGHpiEMaujRI3cbs/n8aX23BQrE/Bj\nZhXWSiC+mdzV+ZeeL2kBYFv6z6Yivxvs4NHPMCcjNF8B0NkAV6MpiJc5xCCT\nWK9gsgPO2qobVHWJtwWnBFeNMZWiby1+inEM0mQyIXHBEnohgVCzj/oExriH\nzQI8Z0PQAghRP4ToIvyI33rsiQmaZhX89A3lQwIVSdK76ZYtejrhYLQa9YSz\nCZ7HCiqcZ7uDcxMZQKXE0L8oEvpc5CvoxMsRBrH2yGkn6AnMOEx6gIQZ8DoW\nKPxmBVhkcp1gh3nIHmqhvv01Ln2kCqFXHeKf8RlMOHsTlVerRsR8tAi6nAGF\nmu5fOK/Q/hdknLpVJSv0CvhDApdGhJw1cTZoae+s3VRk7muGpnv5IiGC5353\nVs27\r\n=C8CD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.1","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-9a907b3-1595100304446_1595100364547_0.41261310420757913","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-9a907b3-1595100298936":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-9a907b3-1595100298936","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-9a907b3-1595100298936","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dad7fcab9a563a0e1c6a7cc75efe1b35de71ea15","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-9a907b3-1595100298936.tgz","fileCount":7,"integrity":"sha512-RJDSb/7wJGQ546sVCmutg2YFZTnhbCfEOzdd64iKcTtbVNSaH09kuEiLfdqVKFyEcFV4lkIU9ttZo9FDSZIeRg==","signatures":[{"sig":"MEQCIFB25qCqQbbXwZ9Ra66M1fAt8v7A7CX2Ta2uhh7ND4anAiB2Id6q4gggxp0rmupu7LOv3u4yQCellZx9hq8KRgc5bw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE0zlCRA9TVsSAnZWagAA/LAP/izlNYzqSnTEMjuOh6pr\nYh6uyou8r8qik4PxImhbcO0VoAu664ncSnuP+W6CDWpZeL6nVNmaRCS9kKAa\nVLEgLkMl9wADxycgYgRxGcCb0Y9eqBknD3wgD024RoLg1ewMn0FSulIUUpop\nwyshV3f5AMnRACrYVS/+QUUCDGSSaHVjRWJWDoSNYnmI5WDGqUCWjrAeHZUA\nkXsdPLDDrjMIn0tgVKtDvXw6ANBkIMKDobrVlCRiTePNushujDT8LjAcnv3s\nWylL03vhrgM+6Usrk6aEQrWoCdno/sjWE9ii2N9lHVqXXRrTjoqzH4sfzVXQ\nN8Z8GNTE/AtF9UlDzNbwJ7QPQp00tPlazl2FYWII0IriT0/Z40rv/uEAgLlP\njn/iP79H2f6oUumc+T/EDQTid+yRSWvlUVODSCa7dDKLuZcid9X7swSIrGC1\nqsEGKrD8LxfsBJqizrNUjNCL12ZbMEI7Q3TWpJIOBirURLjgUYTbcC43Sq4s\nSxp/u7uCOzKQXxmSObKuR5JwvSoKGDNna+cVngSHAtZEXjTbGM2MC3xuWZPv\nkLijuqRzBU+NZTVLR6LBiWBZjRYVJqp4yiGyAZKHNyHEq/AQEmzj3/p/nY2f\nvpgR5JJWoRRIKM/9dFH06gIH+Mby712+F5nyNJe54f11MTLbu0VDHWyfadGY\nOfX9\r\n=BKug\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.1","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-9a907b3-1595100298936_1595100388578_0.517513360822424","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-cdd721a-1595100650802":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-cdd721a-1595100650802","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-cdd721a-1595100650802","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a12d8992e743db3454853f7ef71ca4eba57c4f35","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-cdd721a-1595100650802.tgz","fileCount":7,"integrity":"sha512-ZH2oZhlBAXH3CWTQC0ZKkUJhopodvb2CO39vMkh3pOC7Q0HxQgbHQnyxarKvhMKLwjgT8bGwYGGd0oVYqxG+Sg==","signatures":[{"sig":"MEQCIFqKgxq16GP+PaFsQPElU4bm/Za0iUPLeckT7dnch/GeAiBIF1ZBfQjCg9tzolWIvfFcM8tLpJg9av8qntFm9W2bQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE04cCRA9TVsSAnZWagAAYroQAJzwDgNzrEeeoXaQM6Nl\nOF2bdN2EuTo6mjKsHmnOZ1Zw/7lz/gEQUqC2YvmaKQkZH8Po8M4ExtLm4oNP\n7CQr/iwM6baKF5ovoZQt3HT6ps9Bizu734RzbsbTIly/bIUIwJVRUng0wl0Q\nRo6a9vKudfwPjeY56SXfwv45mQ96nHg4Q0JpqxQuJmb1B0l1yZJmHloDLELW\nkyL7TKYSxmE2NXRgFTUkioK94onLpK2mRR3k9NQHipXYCCGtJ5uBobSstR45\n9unGfVPeafAxi2EtbEcWshGyVTiZFM2G5hbnTao7PyCHhkB+cdEJL6IaKvaP\ny9gzRyA+5ZyX0+FgF8hWTx7qn8BnEzMLuYu6yHhJOouTPI3mAZWcC1eHKKut\nFXBXq01YXtkKbbWNos0sihkEBL14TEsYmPhRUWqGNF1fGWItZD8jetIt651I\nwJuC5yAcCI4ee7jKB7Gyo+f3hDS1CnC7EA0y3sf80a/uS5uPuQs6hrfWfXZ9\nshR7LA6UNF3oC/SxvkNuX0jpbuOGmvlCnDsjxkmba+Y4j7fmKgh1+MNcDF33\nD9YAkwV28VcscPbd/B7qdXhXoOr+ePPhgcV2d/opEEXpJeDTb7LKVRcfl2xM\n/8qJXwykvDDDWRlhfTASql0ZbqCe3MxQt3ffqXcrk6clURnIjrSodzlR10U2\nQ0Z7\r\n=0jAH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.1","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-cdd721a-1595100650802_1595100700177_0.6704888430754157","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-fe480e3-1595100805685":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-fe480e3-1595100805685","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-fe480e3-1595100805685","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"458d9629f5bcf9ebaa9c8263c1e77ef4b09006bd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-fe480e3-1595100805685.tgz","fileCount":7,"integrity":"sha512-2INYrPlelnhVUM936+R4Qvm4aL4iBC8MuKxUXtiHxrZHMRluu5LaRVDqmphqThYGadgkPCP/sVmlPHTDfVcEug==","signatures":[{"sig":"MEYCIQDpbfCScU2s2XmPmx4J2mvIp9xGq72sO1EEAoLfNzFW2wIhAJrcvT875aeFAornZqgbw+dLntfhP7fUWsHxJeuds07Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE060CRA9TVsSAnZWagAAOSsQAJzvT0ddfYwmVRhMkCa/\nk+Z9UV/M0KbDFBZyQzVfpY3oSy92/odxpDriarUY9bJK1rnHoqzlPGYkc2h4\nhIpshkKR18OxiHu0MEceBxske+kNxT2BDvCMXfyxeiNu+lkh7ssNFTwwYycJ\nRdTF/JA1qZa6zf7MXMV6Ttk+sheYUgf1zleMx+6RoIxrs+Xv1hFMN0/WcuXu\nEH11X/dg8oWqSYYWg4PFq/PiVII/BccVzn5UOuzYCC6MIWhiO32At6Ozm5w5\n8kuv4rFw2JInmEt2NrKx4ufD5gQw7w6mdFHE40KBjlG5j+kNfdbWqwDdIfft\nPALQU6JXrW4iqluXTQ7SkLotqDv/8I/39Bs9fB6W3h+n3JLqRMhvbmakR+bt\nUCtbCqdlWrt6iyYy+YKDHxYdhRZKXzKMNQdPYIu5dor8s7TeCv9i+y2nORK/\nPSONl1L8iyQmXJG5prlt0ECBOYg8nGJspZ1hykoCyXUuJo/J36jvHScLhFgf\nXMRDwNmB5g3o56uaqoOywc/6PtPNpO4hCRjSOJgarL2wntHaEGuMb3Tv/ZrV\nsfAIlwBUkprXFwcTKiT2XRJGmJ9u3EG5Ke7rxRKm1jHI92o/C1ObYoZLwEyB\nR2JMprg0osepYcc3V2SpXHnmxqoyPJJO5vQ7RwY310p7FwXga8k5c3EBIayQ\n6e/P\r\n=h2PI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.1","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-fe480e3-1595100805685_1595100852015_0.7342308872163708","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-49657eb-1595101034703":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-49657eb-1595101034703","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-49657eb-1595101034703","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"831b3f0ac48a6fad0b57c7e10e6f6cbbf6e967fb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-49657eb-1595101034703.tgz","fileCount":7,"integrity":"sha512-g0o0xbVSjmPrOzaAX3sWXKp0BRZgRCko2BGcMHU+eycud3MSlAwqdPd7WeOQk023uFsUNx5med2qynQY0s5yKw==","signatures":[{"sig":"MEQCIFhW2JIg0wf0rkdwVkOQ0Gu4hC1CesRmtHoCNsmnLCtbAiAQwhuX/3t9diSTx3P5mF2kkmoEiIYWRH1oqqaH0DhYFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE0+bCRA9TVsSAnZWagAAoMsQAJ3bSp0pegPLqQKLIFip\nbnPKScgIQxNjZTWHYYV8w7Kh7vKSD6ayALNybAT6pBFcrgANp9ofrVcVlOGu\nLzgWtaqT6JnJDBssbuzYtXn6x0J9ZC2WyQMcs2t3nn86rcR3smzt/XIO2P+f\nnELah/6xrMZGRVIg9L+7+0gLHq6IEHEMs0fYOWb8g6GYkVo75t6IW1+L84bA\nn6wVgDGeDkIyu81xojS57vxwKirpx2rBUIT/JSCYgvQzuEO1LrvXi9GcoOMY\n+c0PNhwxadMeQWdlI6L2idSMzcOXF72qxAO95NLqXvqjIJUgk5JlGw6epFJu\n8eZ+cCA8Uu5Jx5LADpJ/jemFNeNE2lVASvY7wKZw2VGlJBTplFDcHNpT2bpi\n0rOUwI1RXQUh5qHRUfvedne03jltpY0QwXivSdxE/hKa7JDhOhiuLpfr6X67\nA1/nx++J3rGjQwnA+NbTvBZy+YvbL7Ys+0NZlE4ah2pCpK85mjFBt5pO0Wbm\nm/JrMIf8j9ogyhGrew+VDyB3EfO4lctVHk0ZC41dRgKnHMQHVVP0+OtQSLx9\nj2+TPEldQIKPXrqXp7w1FRpl2V10OEtHijmHGMts289wkTDf8coY3EH5d8Gy\nAp4eVP4lYBNI34L9AaqmltLmBLWH1TD5pu1L+ZeovOVI8ziJpiaAa33N/ca2\nJjDp\r\n=un8f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.1","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-49657eb-1595101034703_1595101083351_0.8883158997426628","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-e895a3f-1595343763826":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-e895a3f-1595343763826","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-e895a3f-1595343763826","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0ba1060aefa2c93eb502b523bc4c6deb36c95b0a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-e895a3f-1595343763826.tgz","fileCount":7,"integrity":"sha512-WqU+LehbSLkqRu8sgQRrJVENnCpTKw9hAKKwRlygObCrHdWr+mQHqh2Z4zC5vRH/sp+ACHg+zQH4ksPTXHS2SA==","signatures":[{"sig":"MEQCIH5EIAeZoiTaGXTDt5XZ/RNi2pnYWG3ccz7BCiqjY13eAiAoyjej14a4xfmnKCGIqaoKgAVNNZsMsaUCsB4FJMP1YA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFwPHCRA9TVsSAnZWagAA8f8QAJxU+wDxeElfjOyfE4Hl\nQYIPcSnUbgWR8r41jS/zu/2UbTaNgFDn838vaq975McxnbMAoG038txhugsD\nXdPZb7O5BrU/2yDzs5N42yupW6j4o7ULmJEEAjU5KuN3ycvAoHsqYrFhxnY1\n2gpTlRWpPr+P33EEMNoQXEPZj2ab2J0I4X8aBi2qHPdPS/oexcO90pJlA6O5\n4xLQL3hgmAsC+4yYbi3L7Wmm2hk5yxZ8pAw82OA5Sb1amesP8Tv0h82f7jQO\nm1hXt2m5TKYg8N/4nvnO0RYGUXQflf4lk9W7lRIdKs1Dl2S2DFXSOE0+0+30\nUG2vY9oXWJl0JaqAChv4vi1/iofWI2c8Fxi9X66Ecgi1TYL1HCkTygDGwYXp\n57iRNdZWPD1IDpSwjbJWbxZjT0ATWxzeT61wUilAajzBhEx0o+6hBXFiaJ58\nGHLLc1wGNflpVx1cJWrKiaPGsWY2PA/W31iKIirphEsJNtwQ/wdXfTDAv7o+\ni9OfE4F5uGFXFrHrSOiGSE0WvnDPenGpEeE4h/Lx9fS6QMX7FS7/zGWL9/5J\nltTMJRvTOIDLYJ4/GgNZPzbZnMG6oA+1fdNZ1dQNy5qRfTWTvefmjF/sOFt+\nJ6w7Ygeu0O0lbrXuH5tangqIImuvqWlikZoPjz2OOPSJUPFIgvYXFSIYrPPq\nV+Hv\r\n=K7ln\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-e895a3f-1595343763826_1595343815359_0.3736095907959973","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-e895a3f-1595343763478":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-e895a3f-1595343763478","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-e895a3f-1595343763478","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1a686880979780437fde203a69c28f2c5c714d67","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-e895a3f-1595343763478.tgz","fileCount":7,"integrity":"sha512-IpEr8aF0yYVBBaJU0SgTUze1+I20bbLLmtMidAUPxo8uwLOez1p/EiAEoecRGWvWvnZoDCVV20oMjkk+GTRc3Q==","signatures":[{"sig":"MEQCIASwRTBner46ch1r4lEt/CK/1CdT/HXmvtarn/NFb9qNAiA/CtGBsWTyzpBBn7Y1d6orKwQ3AHT9pywMJxYO13g8zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFwPNCRA9TVsSAnZWagAAYaYQAKOUzwZiZIISB9K2QO9g\n2L622zA1NqG0Xb+vJA785JGETVyTMYkDgemcoABMofVIkUqRMaB4+R8eaQtN\nP0tMAlWyyfFZej/EjLnkj3iwVMxsOh0t9BMBuNKzMfa7d3SEu+PbVHich2DE\nAGHPRRfgRENwDOz2XmKw7etkWFPdhE4lI2M2zULXUFFvg8Q9gPO+CJFPbVlw\nNGTum2vbtA/GAfzPOxsLfuYFmSi2fl2uJd1p6GEeuGAo12O35IVFDUs3O7P8\nBrcq5zADtOCEbfImQ1yLnKLm6sCitx6HAXiM2gFLK3O8lgr4uFdZGIo/+Aaj\nvotqhTPLTMUHKJqLjw7aGSjGgyDBNP1hnvay6ThQZlDq8rzV7XgE62g0F0T0\njrgFmNBzngYoS6ZzAv3WgViQE3cmf6rdrvUvSELBSz/vkWgHE9S4qWo4Kk8Y\nOgU5LBgZcksU7vw9i6GIX2PyyAlMpqpkdAfT2BMM+1Lygd7b/fRPgVgBbC3L\nROcwuCJHS6XtkDSwsfs4iW0qm0BzjRU95HM+8NkeeQl55R3MB+q2U6BqBNJA\nEeQuk92S/FjdCqoBr19VHNGW5GgUC0wxVb/eygB7vZ9J8xBB3Y0SnkoIwnMS\nE/rnIPhP/i74Gqye0ywdEWh3FNg1yTeJRJbKCDQuVDXsnqdnYifVxXyGh/qr\nDYW/\r\n=gOdi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-e895a3f-1595343763478_1595343820738_0.749725706705535","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-7b827c5-1595349564001":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-7b827c5-1595349564001","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-7b827c5-1595349564001","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"107c4340b5118f244af6e0a9685585e366456c06","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-7b827c5-1595349564001.tgz","fileCount":7,"integrity":"sha512-/tzkMP9YabQObhRkMi833LPeG+QovGnuKVWP+B22BMt4b4/Xe0yHVmm9D707Q/SAlxXw2OPlqDZ9TEiR/U5r9A==","signatures":[{"sig":"MEYCIQD4K4x5fsYiVIQtT8xHzYiu0dXIDCuMhKSUqa2F731xmAIhAKOsNHnoghd4iX1aOTA2hJvlj0AMdE+AcW5f5q2fxj2s","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFxpsCRA9TVsSAnZWagAAT/kP/194BVpoTF4oBseNzcPN\ndFsXrMXUtOsz/H6XX1dnwsuRA5kwmhwC+0NSqlOpc67z2jkp3f3IiuESajKx\ngIxeTQd9R/uxYFZKYFsVPBd8Y5sFpEJSs0jP2PRYShMfPzS0p5Loq4mZEfOP\nJBoNPl0+TEjAA4gftwf+95HYVEYOcwYZ5dpd3N5ToSzslEg2CZCcaQHLqPcG\nTALEqevmUYoIiBmpB/mh9qjn64GourbfZ1bnse/qvKt62YcGZCTaDBVxh+40\no1LB51XgKZ2fKImH/mG5gstEoK0jajOY3Qm7uVtcz/zZBxpK8a0KrTNBZuMr\nsWxfAMLRih8U0PDAJppv2vrZr2Fjir/Djqhd+Iex0PluCwyiNwF3sTvpFQ/d\ntiK/0IVnP2WlKsCkMi5VVPZJiv8O8dEzv9+XW65PEBnR5x0MF7/W8VQG/kQh\n5JrjG4BVYuCRXInCcufanUb6nHvjA81L0w+4yURBvp1U6MWfUxDJmp50955Y\nYCsIw3Qy+MKP5X9s0vWtBrvw4riVigsE8qGMGohiaTHaPDDLnoJy7ZnVuz10\n1MWkBoWAVtV+jawnYceFQO/MysbzfLmqsKyzfkrLvvCiySMTKqicOXKywMVf\n6lIWfh96nAYFsR/70+eNsJq5HPTk5Z3Yejii5xF0oSNlswnalzUjMBFeXjES\n8D0v\r\n=IPUE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.6.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.4.0","rollup":"^2.18.2","ts-jest":"^26.1.1","typedoc":"^0.17.8","typescript":"^3.9.6","@types/jest":"^26.0.3","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^13.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-7b827c5-1595349564001_1595349612039_0.1547581296454541","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-a4d9871-1595395428098":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-a4d9871-1595395428098","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-a4d9871-1595395428098","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2c0360c6c4c46635d15f17eda1b4c5a6b74717b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-a4d9871-1595395428098.tgz","fileCount":7,"integrity":"sha512-gbstyjKThBucJbBI4mhKYEsxPw5+B59WgaNBRdPTyoM3Ldip7TTlYGafprg5SIkRu94NSadzdHARg9ALcSSGag==","signatures":[{"sig":"MEUCIAkpXfnAeCc+11SsYuLuRoY0U/XHn5KL0Tuv/d5X5wkvAiEArdgSykEbDWJbKAIhd49ddcgCd642k8BEMleX770QR18=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF82QCRA9TVsSAnZWagAAxIAP/RBYTXvjx3zU3Fo5+JJI\nISsbry44Nwej93rPokBpERN81dCC5MMVoxQXmQ7DOXtHUOLUE3Q0f5/MiamQ\n3+W+qdlIH+L5crjroKj9W6ajztWoUZ3kP/YTg5Gy5J/1X+a6SK4/wrGNK8Dx\nHo9dMQuAuCS6Hj2JDqVTXHP6I6pI5CTBsDsrCh49lBTxG7e223yweraZj4uV\nKLZvm4Z6YPCCPWkijA4Q2ACp8cmOdnEo6u6pE3B44t7wLoF4kE07EJ6VvP+1\n9h9ffaB2Un08H51Z+RCPbpe6J6ZpGDNvgbhq5j2d64neAgUAj7wIt4bCDTDx\n0x160hNpVdB3Nx87wFnEEMZp87s4D620LmvI2VMkhVkwbw8xJjE3Jju14FZP\nu5k02q0l5tkaDJQDdXy820dgDXDeJeiN8MxTWJO2DhkrpM7A6/HsBFHz4e22\nqy0lRJ9qKeknQDGaUYSHeSEPzk3VzfqztPqNzNOomorSRCzb0d7LhZiL4kaf\nz3fxSmC4lhDcNKFfZ6MpQzWZDyUEcHJ/p0S/iEQ7Scrcwjr6FQReNQInVuJF\nd7nHqQ6NB5CC75UB9EINEixdyAE1V5tLd8UOeET+YkZ//Y+mEXT5hw8Jo6Sc\nxeIENWTcfWek402SocYNh+W1SpAZURcw3+4+6z8GOTI8LxFAIXK919wjS6Zm\nM+Sa\r\n=3I8v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-a4d9871-1595395428098_1595395472022_0.05191818972500406","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-a4d9871-1595395428990":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-a4d9871-1595395428990","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-a4d9871-1595395428990","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"97643736e68eb8c69a453cb4cb9f448a8ef0ff71","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-a4d9871-1595395428990.tgz","fileCount":7,"integrity":"sha512-WTWUOmZjZuC0naXK5dQh/ecVdORoqgNA4kS0II8Lb5wQHwE8tDVUVYm5EmQgzu8VdWVCT4/l93emn7/cr3XfRw==","signatures":[{"sig":"MEYCIQCNTq4+ln4BudafV/hAdLRdNPOKG2zjkcz968aPmOUZRQIhAPdcjKKAZd58ErZqkrjuta2bwu4aAAk+2X0pNAZTyThv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF82ZCRA9TVsSAnZWagAAas0P/RuT0WN1tXrJkryr1cXM\nU03c+QyG2uFf06qDTyfYo7+STdvYUAj8toE5ulUkKkg89wSDWteTIcJY3vd0\nX+TwiLMqQO9tRfvBaKlsfwZ/0mHoGeRANa475jPUs4PhNwQ7EWIuc9IYrAAs\nF8c5oSD5HrmLTXkJCDoGlrBh/FjaRvlILa0aXbYu3cJ3VG6vHQzUjEU7jYAP\nsut2/GICDdKmWJK6JaKoRDQx16uAW2U7lolBVjP7NkHhgLnrZa39IoSsW4X4\nB/CF1kthBngucueB+7NfuQDYhui1MJZJko05fF6CgS+3eysLX507x918veHG\nnx4QAb+0z/vnbQIdibyru5wsVRQ/N4knVmHkAcBKEMeEqy1iB69WTlgd11T8\nZh/z2WYfQkyBFVTKXz3DK1D4KvnbUWgfIc2YeNXLhGRhTT9wir3asWJ1wAtv\nz4B09INHaNMW4JBXYnddgDMvtxjlMfJGpM8isnXGZsCyrt2lr3CXh00X7J98\nphVoV+ukannXalNvl1lzfzo/o4wr3RgY0x2cTOY7PDbGGEiS7dGDp5HG8jZQ\nDiC8fVCcqw+iq7gBYHYNVRuNkNpD0jrBVG5EumPfwG6H8uIVmrRgC8EIYiOA\nQZj8FjUtbZXyYqo1wpwXxVc53O532KRjjMt8o6VGDFBmhAwpt1PnjXHbbrWz\n6t8O\r\n=Oblw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-a4d9871-1595395428990_1595395480672_0.24587255709318367","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-4fcc0a5-1595399873269":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-4fcc0a5-1595399873269","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-4fcc0a5-1595399873269","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6a58e20268e0207528bdfff7d1d65879fcebf8a1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-4fcc0a5-1595399873269.tgz","fileCount":7,"integrity":"sha512-qAP6QgBAkve0ZMGA6yak7jK+WLk7PVh7iot4TTMQqjLSDLhIutLEVTVfoYT+PrHhbPCQ5hdguC3t3qLX+jw2bw==","signatures":[{"sig":"MEYCIQC5FKY8uQYwGztWWxb/7B8g4FFvSLbrroL+RrybakJrogIhAIZ7cNEsN3GcCizOjL2fRE7ZLBRvpc2ihlnDYowzrEcf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF98ACRA9TVsSAnZWagAA4YkP/j0Izs4ZMthfjb3zXvV3\neFXIR5aP0GSmbbSUff9HYEVE4GW2gHX/UvkGSyAOrjgHHJH5SIOIa4ygMOoP\nTQaOB7ukhJ1+q5tByrE46b9NkOxvrZ8poKDRn4sYiM98fbr0m1AcgymAQ9H1\n82b72xUIVc/MnSbSU45nrS/hus+sAGFvW2j8WqzlbaVlBLX+tcxpdUKSoM6z\nnG/Jz8KqthY3psoNFYFwo9k4cW0xUI1k+oMc8Q5A/cqIuNG6o23o+GRn/nvj\nEXODGazV2nwFtVZ3jIaBby1jHD7KX6BFIGHkHSLZe9o9f5zNv/BP0Y4S53+5\nQK0HiMeaDCTK4+v22/y7yRhs2QW1s5W1lC95O37G6lC/n9apRGaiPpaXeRAB\ntfZRF5o2BGJAUGPcyWydo5JVP/eB1xKLp7E32Oak5YkMIWHHtTNQlE6ym61j\nyoncaIjENX8EJqoN2m98wOtMOuM/Zw0BpYV0Cg5/QWfysrpmFEG4kVvTIua3\nm+sWl9ea+HQSsTq2SzAEefc/bgh2UzpKbqK3OK1U40luMrhdnnL4YiATNLQx\nC3S45pOEJsZnOF+PJz41ifsOYYoRws979dZPB3m0BHjR0+hP4yBzJm2ZlWqK\nx09vcEM6ZgXRe8N80NtWpmWDPqhpqy2HuFFkv7k2scg6zxdhbT2Lr7COPV/X\nPAPk\r\n=FsBc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(store: Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(store: Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `store: Store<State>` - Array of one or more stores.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-4fcc0a5-1595399873269_1595399935746_0.4111267632221718","host":"s3://npm-registry-packages"}},"0.1.1-beta.0-canary-ab812f9-1595400544875":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.0-canary-ab812f9-1595400544875","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.0-canary-ab812f9-1595400544875","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bce17269d5fd8b52effed8b13e8708daa7f2f6a5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.0-canary-ab812f9-1595400544875.tgz","fileCount":7,"integrity":"sha512-bD7qHLdMNjl5ms9LmjouuoF67f9e7bVk4v3NGbr13gQmgFYxTt5RBuC3DGO3FyTNxfEh0soZOwihPGY4TGykzA==","signatures":[{"sig":"MEQCIC56dDTclE3vsAllhh3+P0P6A4HJulLW3tA5SSEL+dZpAiBOuF4qXzczF8arFQmaZvNH743hhQn3ltO6yjcvPAt9Zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF+GPCRA9TVsSAnZWagAABzYP/iTolWq6oautC2wkewq8\nREnYGR6wqlyxwvJ5UTs4ZwVZw7zgBBqhlmFM+LqeXB26rwMuVLnCDTwyGXzU\nnQDqzY8MmI/cOerXIvWfLxNoAL1HzKXYXiFejWrvRJalEfr8daKDevd8I/sS\naz9ak2zxQxBkNc2koUsQAVnbQTYs5eLzP2e34FE0YLbQjRX9VUh6iGkNAkyW\nND1Q8lKhTz0RsO4y5EWWEf424BKNN8yPTq8RVBT/LtCL8wMpH4Li7GHusYLu\nLNy7k56dz2IL/KQdO7OFMGKfV6lEIIyX8rZB6TlMAEmc/siiAMIJbWhqOWDI\nR3UhmObmpi0dNAslIOmJazPSJjjurJnMfDburRVs3x7cXiF37aYQLx9nbn+u\n0LwzdzD/cdn+uG1klv+FmuJU7jJpGyQ9j6F/ebml2KQwAFbKVjFtHMEnce7t\na9Bsn+FTzslq1tvv4euMkcKyBf9nyfhpXFKbs3JpoTB+DdDICyi0f4LaWaHA\nOHEZIYwE3H8U0SnsMmHSXGV2BfIJaHB4OuJubIoZKKK+Fu9VKUSslCnwNtML\nOEyg+ZJl2cRe9ds5xO/Rxjv0PZXMShk5JmrXug4g+iExWxXmnfcVr7QtPC53\nSif5EiM2o6joRYD75UgGISJRShePZnCDJ9pzgx99DJjD+e2G6NYZK/PLf3r/\nExWW\r\n=Sn1r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.0-canary-ab812f9-1595400544875_1595400591008_0.0589262053750208","host":"s3://npm-registry-packages"}},"0.1.1-beta.1":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d1aa4e1e9c7a577fb13deec3cf9703b3ab7cef6b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1.tgz","fileCount":7,"integrity":"sha512-U9DC94QzstNI376HecuZ1XWraS3i3FHwyUbeJkBXTnj7EEsHLxib1mdxSLeH8agKp7az/6SvNEIXJvDmAsa0Hw==","signatures":[{"sig":"MEQCIAFo9fpMDBVvPCwhgIaxKfnwyfATArAaT4OXWmzrVADqAiB9QO3SL6JtwM8KOPjxAd8VHU8jYeYoyG75Asxk4Q40DQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15012,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF+O5CRA9TVsSAnZWagAAFlgQAJHk2NH+yfeoKXEgSX34\n9nAgoKfzv9JChudEnbpG/ZoglJYeTcNbb0ZBBaD7uUucEG+y87dX0d/BAjU2\n6+db/yXpQQbTGERdWXX5I7esvCllmjJaOsNdpbojZfhREYrYATa2RCibiL+b\nejb+gwgpYxveLp7BE/JX+PJ4pZcEWtNV6dbBEJvXD2dIW+aUc/s+zE9wStYH\n8iFrVRtAVLl8Y8oAAftpkSaRXeKqv4dYV7wE88ahuJleh8Bywi14hOKrvVJy\nxSP4lhs2fg5tzoVJpAAy8SuyHddFfzghq5rW8yEdq9/xOFbNBkS9tjqSGT02\nY2wQcftitDIoAqykwQx2/2zxwM7yjaKsa7dXg2KBfU3M1flCmoLTtep4PF/Y\nutdTZ/X7Y42IHr2d5Wa/TinGDmv8aDyc8rmCPHQfIzvurFDQWxMT+dCn8WVT\noZNKI9fhS3fOVs/TmFZN0d/xHe+azkOcYrGrxba/wNbd+0Suw0Faxvh+Um+k\nfkg0xwzm3EJTUWL/xAuw5YW4dFefXFZCeA+fttTabQe5Qdu308I6DGkFJx73\nzNe52cKKsZi5NE8A0G+FIb4TGThCTqDROgR/o4q4RkQAsrZh+Rudc+jBjr9C\nEOFuTeNGW8jrF5zzl04C5xdslZxO6H0cK+NQ4o+NMitVofeR+7JnZqKTXoCv\naz35\r\n=pkAA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1_1595401145217_0.10829618265399277","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-268faad-1595427111575":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-268faad-1595427111575","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-268faad-1595427111575","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ae05f2a8fc8495d5d975c748734404620e7ec974","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-268faad-1595427111575.tgz","fileCount":7,"integrity":"sha512-KSdwYZGmrXYeDbqcOVVL+MC8bNbN7+5MzIfDV/qSk7ot5xYneo/G9ZdxCcUoYgVIvyFBTovs18kDdUj0Jo0hYQ==","signatures":[{"sig":"MEQCIAFzE+FFx1o6mG9dVh2f+JxfI6wmLG9qpCKTteD2GmUkAiBi8H+H5+2jX0XwWXovAgAYg0FFk2Kl23fEqm+tjAHb3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGElcCRA9TVsSAnZWagAAweAP+wQuVgWDGthV6k/FEsGN\newkV+e9K0+h7Of2jtAB20JJLASzH9YFlb8oZ0U0PUsNsQ3202fvILglHx+td\n+kVzZPO+18q1/YB9s+MrOYoxjlYoCb1lcdqUJa/+kTd16Qc6A1G1TugF3s9h\n7pgDTqWjQPkb5/VaFUvltC/3rvhuO+7Ues45OlQG/BytTyvksmQ5nVrRBCy9\naPnNJhfltWLANitH764K7n2ezUE0GO6DOxVsLr5Je2UMnf5aKiD+mBxT3JYp\nuKdj11f4/Adj7agdKhdTp1ad5acsI2aIOzLy8Rj5OEjcZ0tASPn8nukoyFvD\nvMrn6D9vFPcWEUadrcuaGUcE2GNTRsTmcWrDOugorlWBCAver6xd5M42nXcB\nPr/7WMDTnJD52k4d66LkdayCC9ZcG5pqEGI/AUVhnJCcG9d1gAuAGlfabsan\nQgbGW0SOeMCTxXAWn5d5LWBBRqvpP2fO2ZYzp3NQ0xr8+/0GSfAasoTdbl+J\nSQ0ajzjLopok31xwaUUe3UcufeH+NCiKOf4xmH22134UePCcPhUO2OVLK9wA\n8NP3oYcTpzk3cRe9u1xaVZ7wa028ExFilOSgvt13Pyk/njxIb8ZLcP92dGN+\nctQ7r76yclIcno440kys5R2kHKSeBrbLOgb66xlBLtbkQa+2OLxRou/zSDbb\nXNDZ\r\n=kaTO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-268faad-1595427111575_1595427164255_0.09548225138907562","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-268faad-1595427108054":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-268faad-1595427108054","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-268faad-1595427108054","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"894eeb2808772608a7fe283fdc8adc51b9ae1344","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-268faad-1595427108054.tgz","fileCount":7,"integrity":"sha512-T1gmCc+L6yvXjCD7qwpedtgmMEBNJMBOo+0JvTlK81dfuG2QVY8leePSJlEHIQFBMhBaiTqidmPK5oU2RHtlMg==","signatures":[{"sig":"MEQCICTS3tttHGtFmieVoyWEuSwEYKaT+Hlva+WyYGRUMOwsAiAxrDiAbuL0gzbTuLvRpOOw+Kiuo8GclY8TZplm8KYqFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGElvCRA9TVsSAnZWagAAsF8P/AwEsYD8QYbNxU8e/xKD\nvGxDPDITUw/+oopDSsixuRgFhmzhQ9kR8e80czwfakZ2VItWjmbtyTqShUEn\nSyf4br6+T+7xRKUqWtptqV0XEadWEOFAO/98hVUAuRIy6mYWle+YEAUjGYtn\njdDGRVThzdazhKLW/6BJl1qBahuTN2r5ZbPiabFgoAoibmPm5UrKI9E4Ir1D\nJR717QNV7lDlvQ3f7di2JBIAEgHW80FC/mkKgCzUgy1GQ6H5lMxOwEHriwwW\n5gAEYIh6v3zPwZuiIZeKzBQk2RdbcDCDiVrRq78VLXE37mdz2WlfQDEwdj0d\nMVEZVo4KfvOZsH0xlVA1Me3tVYaBHsbKLauXaup1voKSXsqOkv2X11BnZbzK\n0w5XzVT1HV2/s2pCe/3UnbzFlDkTUKSKFIiQAr0M60ll41kg0RTrLqTTSCl5\nKmfXd7dtSW1cJzJqsMhBm2J65mWNCVRmBhxusKU0sUQ0OO/fCbaB8PUsywnc\nhniomdqv9edTFCk3on1FlbvtwIxIBvkrzzSC1VU3nIQ5GzKdshSUedq5Wceu\nEVWbLSCnIeYQF4Q4RvMulLE2irg6KJhdUVq3bgnvTUDjujaQwzTnzFZ40YeY\n0MXXBdIPXXXqlHu7/thNWJeghKBm1ZuzKesz+C035ET51tFtyUg+Fh9RRYqO\nSGcv\r\n=AAEO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.3.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-268faad-1595427108054_1595427183472_0.5157483184484604","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b048df6-1595498106720":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b048df6-1595498106720","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b048df6-1595498106720","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"49ddefb2141d31e6ca99b3217427828e30cbf2d6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b048df6-1595498106720.tgz","fileCount":7,"integrity":"sha512-dcHS1jKczcYNGav0YWYp02yKeYpfm/dI9diqHR6j66XkFuQfQprMbY80zupqOnfDAnzduq3TQuOl6iIsA8WANQ==","signatures":[{"sig":"MEUCIQC+tBrEsdw1bMw6HejQUY8OMtJrPcSxDTJnJjLLemouowIgRRdy6X4/6C/4FRsLeJ6ABr+ZM2W26CCpv0qySLe9Kco=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGV6pCRA9TVsSAnZWagAACcgP/j5XyQkliaY/BbwixxfY\nRCCA9twIwgDzMorPioXbV8O05R08TrzxqeNGuJWZCLGA0bdu22X+wOjySrwe\nSf7vu3XVmuWyneFR30Zqb6CWng09w4+U9sgGFyP5rjby81MNi8Whz2CWOgrn\nFxQyhFFuDCpXzXU+ydlLZVsn1457ic5zpU9w/NxQcO3vR3Fo36mGYiC804zf\nfPHZgJqpeflGr+8pRkKAaF/ombwAOGIL29eIfLkuqpWl8zK+8gZeDVTOSm3n\nUAWR+4tyTxn+fLJKzF2RUB2Zydnc1xXYELJJasxGVBbQJhpLONYOu1O7nRhH\nYZsgsYhsT8q1M6C/i7x0O6D9KRGX5KixYEkopvB5kNltf9bvClpRxu8699PL\nZpbdrl1E+xPpkwbjbfQNMtM4IB+tcruGX9Ve5UOLZayHEngScLd0TkhCXI9E\nTgJPfK0FBq+GurpuubpwWCDEdyI6ZVOonqTjMdSIdTimKNCaqop3eqi1stST\nuc14+8UI2jV2ygZK6lFZQRp8G2zDdQA2S1+DunuEElmEqS5IF87/qBuiom4W\nxCfQ6EE0jjL1HRNtMYgy0fnbBdaoBFlc0N1ZLIVTwt8PiHpMYYMyX1MMiNxr\njZjs6AoDj3hnRd2USXR41yCLeEQ1i5EgAdW+weppqtcyNyL1WKLKOgc62nGj\n3FLG\r\n=bS5v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b048df6-1595498106720_1595498152584_0.5263617174876942","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b048df6-1595498111113":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b048df6-1595498111113","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b048df6-1595498111113","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f2d01e1970bd8de729f297a95aaff49830206d59","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b048df6-1595498111113.tgz","fileCount":7,"integrity":"sha512-VjEYCwKWtpR0J357iFWZAa12t3oE4vgbPZ7oZobPaOOrdVaIo5OCGsVhB3sANiG9NfXRnJ068flumA0FjHBfbA==","signatures":[{"sig":"MEUCIDOa+xlJa//mEgI1EphynmoGTKfmv/6qWdDCn003g0UsAiEA58omGXbnPG+KTbzTTlk0iEGDUoky0MF99bbTQaBQE6o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGV67CRA9TVsSAnZWagAAI9QQAJ5I1ISIxzwZxRYjla9v\ns/n0jp7rWfSTXE0MkvmDTQ38E6j/SaGqa6ve5SISuMkic6OmfToMILEBKi+y\nMMVjgc1UyxC1zMOcFRGHMhfDMp186xVchjOEoyuuFvlCBibCa4O5CFFP+nJ2\nuJTdmLwfc5kMc4r7BwUwbafS1ptb+t7rOM+T8BBtgKrxHfjWaOB8pMB75O9V\nbcrPSTySNRbwabrErUwfKV+LSvSFBmhrwiXtrJ+J/vAAHFsPGr/iLHqsYIYY\nU1xsrfEvILMf21k4AhwZmMQPAUNcD2BNTHCpzTGPlEiyCem+yHLQ79WbLy7J\nEdMQ02OY3RJyZc3VXHcd76+i06+7hylX8U5TQgh/ricTBWwDoqPX5X3kawsG\nYfMot2VjAsuQXlSNAK34ZkcMRmAQVP/QiE0EdTOvqcuN2NvYAMCqGhUoRKOJ\nYe6vlpXD7kmdXC0yUXXY7nwPQ+0DZlBgCgKye09HMiOHWGtTfaRu8kYupVKA\n6y4C/zmH2ZeGoxJCoBvN0UpD04EOUtqCzvHTYAboBqxEXI/aCMNuCjXGTPxN\nPrE20iPMHlsPekKCXtz3ppfxB2+RTGFwgFxGyUFcXUh8bVnZzwkj2gM2vnOh\nrPZwaA2aY2R0Z9xuFTQTNOTp9VbdmRQN31YkkHOJTVTFQ9xSUnlVmUrEh/W0\n4Z/6\r\n=WEBD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b048df6-1595498111113_1595498171589_0.9223174078090786","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-cb85473-1595522811002":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-cb85473-1595522811002","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-cb85473-1595522811002","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d7fb4c3bb1b91c42302284f32661528a5ea7891e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-cb85473-1595522811002.tgz","fileCount":7,"integrity":"sha512-J+BggBLd1SupT8Y7XIjxrzzZqp2ujtVOaf/oXMvreqB/2JWrghRz0SNGicGyTO+imizlGDqzuKDaAxCtGnSpPw==","signatures":[{"sig":"MEYCIQD3/eKCYIc+daugbSewNPHDYuKM+x7ShnDe6rkGDfu8lgIhAIGWQGq40WGHJR/j91HK4tKmQVcFW0HFTGzm2evxE+3e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGb8uCRA9TVsSAnZWagAAF98P/0iq3nDRYqqP6AQk78nS\nuw28+sgwHEtLAdIwDt7fXHsYpASVvWQ0JqkqspqjhgUQKHNjrZ7oDYBpi+lw\ntSld3sG3Z3CHTIIaQlp01oQp0vVPrDWEmAsk5qJAxUhqq/YZr+0dv+7Q1jjL\nWdQAH07ZZoaQNG/F4IDtmR3LgpBewbAFkMCMxuhv3DtURUVBnv1/F2SFlG0a\nGwWw2PPelbKPJlgWRwKKR0YAzNs5yCj+wrUKzmp289JKGlTd5lbygOjlhbeD\nX3UQjSC+95wf56qyGGQxOeQlqEPmD9iNVuJIHZ2SSlFdspdYjfrdSCAtc4QK\n49LT4bOTuCkMrWGHSSPAuGdu8lP7ZBXGJ3/X/UzM2y+4u4UHaSWTDh0euvj/\n2IVg/AWXPd/ZBfkWf9i1f0s7cfKIo4jqfqnBQV3KCzOOEuXeL+eaYkcKykfS\nymf7oG3BpYx/UOY1HTy6O0OAStKdoH2ALBIp8p2kxWmXArhGspNpZNJkeJAM\n7awo9dro3IDN3qkSb6Srlh9Sk39JAbgN7aZ546iYf1Ow7MpLuXz8E10Bng6h\naheCQmo5EBM2GQzKZepoqdNxDHHoE+cNV5x3b8KYAwKi4ymufKi//k1UsvPq\naAOE1vyiLJy9rcQ0A7CUB1BY0gkPvqrzxnrIY8ouxs8LFqj3d9+TXxR91tad\nvaid\r\n=8NDX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.6","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-cb85473-1595522811002_1595522862098_0.6703316258142307","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-cb85473-1595522818808":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-cb85473-1595522818808","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-cb85473-1595522818808","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c64220b74337d0ec27af0543a670a867f0380226","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-cb85473-1595522818808.tgz","fileCount":7,"integrity":"sha512-TsEz+z8fZJRLq0TXh/b8AEbXRRgA8a8L3S00e3+cu7idBYRBTDoc2IOjSBe/tDzn1Y6EjstrTWCWvaims894eg==","signatures":[{"sig":"MEQCIAa8R77QzrHi6wq3G/bcv5Rsfdu2z/gI1IlZ4e38q7P9AiBPYAD/weuOWBKP+K/bVPl6yRNJerYO20V55PAvf2vBpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGb8zCRA9TVsSAnZWagAAK8gP/2bqIGTBIm0nH9rDnlrS\n1tiLnopgDm49Jf41T/+kaeAh3JEchmqzaxVAvYSts1wcSeOI8BD9xk6PVa3U\nWt4bs82ZNkwFBNN62MNTU1UN5hEmMoGAnbqLIYsNdc0ZubiD4l0/zuEsr20e\nMQAlEbV5Dx8c54hW+tqG67xXXwxDC0DdwIvNceswJKRbZMeSUl4GguMTqkHQ\n9QCMV2T6TP5ow0szsjZXo7b4QySGbf0u8rr+jqTQoLxSjmsBgGIp/e6ZAmv8\nCUPBiIFHqrvEXmZ7d8NUyVuir9K9CtYMOWS5ybfqFQdCo9M98spNtkv6YRwU\n4fnxpxmVcUln7DnFXYskFsBlwor+p9/GFB4cI0LKrtoJyUqXWrhL/oRZTS+C\n/A5EbL4b20IOH7HUvHxl5q1SIqVWNd7+QsR3QdvVgAGrlpKzxoy5Ex+5qtU5\njfvOg2pYrKrBT3SyCcMDJq8GhiFRKzR//FQZVBmRMsKTd2jPZEb7DRD1egSZ\nyKIUHKQ5tsgQW8uthy66J/d1VSCBO8nburbZ5pH0dKbPVZPdtitVfgiLs5x5\ney/ShfHRFiWje3D67/lY0fUulgNJ2T1Q2/bfP+mGiWr/eUXMdmTIhkduJw04\nY5JvHyf1ccvWXACNceYCvGp4/sr2j1yWfO849VQZh347Pm2aYnUnsC0teY2g\nEGbE\r\n=f5p4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.6","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-cb85473-1595522818808_1595522866814_0.868259324981737","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-cb85473-1595522813637":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-cb85473-1595522813637","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-cb85473-1595522813637","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5f6d6479de631e2273980e2238f9b32a1f97ebb5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-cb85473-1595522813637.tgz","fileCount":7,"integrity":"sha512-JBlIjzDAMGdYz9DJvWdwcm58Y+vOJhtB5lvES2s66EpioA3r2XXhzCQ0UGQVl59paghetKG5TV63jDxF1QW6xQ==","signatures":[{"sig":"MEUCIQDmSL6cIHOUepL2jG4JOoLg+kirjdh8if824JYbUDcWaQIgN67AgkiPIIsj0bJRoMC8wYLY7WKkdd2gBl6nv1u9S4M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGb8/CRA9TVsSAnZWagAAyosP/1R9MrciyQE3inr9C+6c\nFOk4ElFezOihld/NG42Gya2ZvTQpffVKBFCUkTCep9uNomkKpyjbdXr8FVEe\nfcEzJgvyyZ2Rn/zhsFSZqJ8fLnsjUfnwyDlrnRXDJtLFQTS9SGKI0vj/Yllf\nRlyuaEQAwIpYMERZDjWKOrZjz+M67KHAKyLMAPob6kLyC6bygKfmFiM+9yQT\nRGaZOHmO1R08y7XDPQ2089vhUEW6heiqMislhwurUgMN2900/K3agAnNAgCf\nelazQTepDfu7bwHN3KHlxIfLvtxCTrW71RDwF3rUVGIJV74ZpvX24keE7yGL\nv71Z6ega2oGCulB/jYu6e8r5Gt5K/0e5qwvqin1W9rz9xHuoGf7VDvyCuz/2\nVe1UR4Xdba1F7FD8HTDMnlDagUA5tGwTv4pdVrzUyYy4Bdvcegya+YZAiIc0\n9UxHZTCTG37tdiLWZGoMgrM8CNkGiqATW4lqB4ueBoazCRO5GXG3x8m/tIoQ\nesERZzvJMg8eb66q3Jy8irKHMW81Q0sjd11smiqOboU68OzZeZvnta4/pRei\nwLO7pjhYaIYcBegtu8slwXveFt+KUEj/IfFa7goLipArgrQ8xIJas5q6+G5/\nePQkGqaNbFFpOtTQVN7LAK20EfeTn24x43O1C7y1tGzmaqNRcyqjytFO3P8c\nG6u2\r\n=WhO2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.6","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.0","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-cb85473-1595522813637_1595522879206_0.9343583355113878","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-882545e-1595523519771":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-882545e-1595523519771","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-882545e-1595523519771","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"964341f3e9348e257baee6be25ac96b2c0150bf3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-882545e-1595523519771.tgz","fileCount":7,"integrity":"sha512-t334N9CS11Wc4I0/Zg5S2zVIMd5VRq3EHF/aoaQ393/BFVi40/nAHzgY+AlnR9oQ9Z8NuRC3qAy2KqPcXWmnWQ==","signatures":[{"sig":"MEUCIQCe7616P3Iay6vccxckkA7LUvyVg7WmHX3u9U254SZC3AIgaIPFKEn4OU62o2zO6iwsbuwOaazjkKKrWWdNnHU87EI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGcH8CRA9TVsSAnZWagAA+t8P/3tMBiCxxNOOMN184Yeq\nuaoW2ZJD3MVERTAiYxctzFi3ogg0SwruhRB1vmnySRdTfZ+uwo4tQtnGKX0I\n7zOEmvpGIjJur7iMBzR512M0+yAMhjIFtc43Bvr3MLRN2C5AQ4EazuDNp9/A\nuqBm5vGpajeXH/rn1mSLsk9Sz3ETDsCtLcI0AkA9YqS2pHaivcAHDaYufzXw\nc1MwnwcsmpS76aG6mPVYV1QwoqI+AuyfStZRCOqMgFYddqwflLz5pE7vHQOS\nwpXhvN/njgjJDp+iiytd15i1WTzmgdWNb6Mu/4syDPUT7enAvf5apWZ5nlZN\nJkAA8SZ3Hil9wi1EIa2nQBV4ZSiMOw7ZrEB4nV4TscwJI0TrVH35LC6VHqb5\nGzBUuOaZpY6ayFU1dk9Zi98fzIZX/oZNX7G2DUOQKBglU7e+opw3WlXJ+dkd\nsyQam2BuuUNh5Si5xFmqSY9Q302klBNXn4EqtuLYZouJZ5le3dM8GwSPCrLl\npSIlpZB1caM+WrDCiX7sKv6n/L4RT0K914+M6W4nTqkFwZB5TcPCfGjHYBEl\nEzxsf32TChzQjiFehg4nY9+ihJle48JPUjnfXLyBZX+sogP+fvOSeqVoetw1\nL7m0S9XiluyIQNk0hpoLmrJae5QWKeXsPRi6Og7//88Wynf8/k1BAvZWRWVl\nnsAh\r\n=nkyO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.22.2","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-882545e-1595523519771_1595523580272_0.06770849801889267","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-9b1cbdf-1595530788594":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-9b1cbdf-1595530788594","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-9b1cbdf-1595530788594","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"92503148b6ec50da47b69dba862f55861e65299b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-9b1cbdf-1595530788594.tgz","fileCount":7,"integrity":"sha512-frpjyaDAe58Hjl6EFbYfa2sTj3Wga+xlITDYiwvlpPQ/29cME3bLe7CYl2oA3OZOV9uuMHrtP9eFuJXVxuj8Lg==","signatures":[{"sig":"MEQCIHJnvhNtcKe5im06r2zWxXA2bwWEUJw2j14egGNf78VCAiAtH32DIAPmzSrZA4Pm7aRd5w6gvUgjWXSydtOR6WrBYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGd5aCRA9TVsSAnZWagAAy8oP/3bskNzvCFqHUPe+O8Wf\ngtxZK8ahJKPDZ5Dr/2+xjy3jOYvrx+pyLY86yflV7AhvwejCnCW0cM6oK740\nyo1CEw7MDOV4TxNqdCxs1MxOveyYHUa6cSQmSc618T6utaXn93eM9SloNj9B\nDEVGeL7l9K7i+eMs1DSMWUQvuf8OjF0hfVpd2pFZ6a8u+YIUEIWJNCOMwzeW\nq1Kb1SRiJ6mxa9OQqaikH75b8XMb/BcmFNyt2I9MJZsurbjXN2xbrVCl9qLb\nyk6Gv+jMByq/roFynJxL8bE61OldHdQXFxlPVSero34wABNbMU+uh2EQxWd9\nWyCp2wQZ/pNfiz5yCuQwTrksSaMfv33zRPz15da0NU+HJOObxo01OnME5tu9\n9GDNJ+fvEv6AO1ybHUhQZEz7NWG+snzoI9n6AW7czVPQ7hEkYBsl9Ffg7VwA\nCdxK4PIV5hROm+DpqTMhkEZEJhPOyDN+b2uZ/YapGOYZJeEZrMBGrHNLyALT\nuOjXAynezR6XHd73aAvS88HWDmxFQD1hAY2Sn7PsggdwqCBgcVul0IFMBBBT\nrgV9iAWRqoWtfJU91Y4xs2/3Y2Jnj0nOZSE2+uT/ZWLgXonPB4dYPQs1hn4v\nx+9eQ9aJRe93l3sapP5aCW6dC5VSS69nXdDUncRMXHTzapqvtSOhaQvnrt8t\nVz5m\r\n=IlVg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-9b1cbdf-1595530788594_1595530841890_0.5345002639611507","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-9b1cbdf-1595530784056":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-9b1cbdf-1595530784056","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-9b1cbdf-1595530784056","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7487427353ef57db36a764a00d09ea9173e91ee2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-9b1cbdf-1595530784056.tgz","fileCount":7,"integrity":"sha512-1jyCeMfPO/FoEvSqujVufEFjd23pi85hT51OPyMrWM8sy4TnxzVPmn76mGTkvSkL9dLMdK+wo+Q/7hL8mPE/5A==","signatures":[{"sig":"MEYCIQCsCmTtIB/xzoT9bSiFwaRyVX2VortF9J0lrIxIdtbl3QIhAI9gqSmVZrX1piX8IImXGIQpTJhsTSyZzFnwdtiTeYb3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGd6eCRA9TVsSAnZWagAARd4P/jTS7w5VWW6gU9+1hIvA\nnnX8AN/k0GQnNH8sBK4gDP8sLosjRW3370vRB4/w8or5+YPUB7EDwTOpnE8U\nboqEjsuq0ihaQxVgNkolk8tBi5bMCS19uTsied9TI6jxiQq/DvxwlvNo6mU9\nO2bKAQuQ8zUxrjAQg539hCqWvbbyMAA8avZNtxV+NWv0omAOGH36QHn6g7us\ntWxn3MaQMo0slTRRKVfsRL+hmmxGFzd1cnSmblm/FdwBicdzIpconk2QhU+M\nskkstFpVDWD5EXZI9P/BdQwalRVikSMYSxiocW/WFCSVA8fnmSl2YP7FUuzX\ne8TjmvMtVgWSmkNfmaIu6dMGwTro3nD830sQtCmLpvzjdK8h7OZvskRWaNVv\no9ERcajViHtYQKS1ez26396wj0dMtE1CW4bh9WMu6KIE/OAgkZnMN9vn2NGd\nkujPu1uWJK6VA/kYrREBR8JAJf8pRIZ8olfiXQL4ciL/sc1hBkk/8k0X/16T\nfhyyyP40Fph0PqD14/F6olPCLCzoYwb4IizoFJTlHFVX7hDcHnv9jO6fX+ER\ntgkgPl3Gi54+QLYCvkj9KLYBqR57fp2HQDNcsS9L2UyVsKgC1WtQbAke2hUp\nVhILYM/Qi7xMFIWhZR4kTZe3C8oGZuIjFe665QX98F6zk7Ss4gomapB2LuTq\n/D3d\r\n=15x6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-9b1cbdf-1595530784056_1595530909819_0.500863419904221","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a4a5e05-1595536792160":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a4a5e05-1595536792160","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a4a5e05-1595536792160","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"999d4ec794111c84dba49bcfa7e32b211b12390b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a4a5e05-1595536792160.tgz","fileCount":7,"integrity":"sha512-PDB91D8toRM6NU8iR8i/xwHgINcPWD5vtkj2Jh4rKzooXma33v0Qx9Xeh8MTk7ZsMJ+F/laSgxkj66G7MgQvtg==","signatures":[{"sig":"MEUCIHb5s1xtPoG0CUMr4KxEXsv4LST+X9+v3NUtWceW8WeeAiEA+/ksl2Y/ZQjUrDHm5FYkVcwtw8Rm7TowT0nu3LCS8Es=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGfXKCRA9TVsSAnZWagAAt4YP/3AOZ01/KjoUh8kekBhd\nAjQUgLyGa2To0Ag7bR2e02u+76rCyuclwVngC92rWtA8EH5SW7HFxHHApo/m\nse6N+QG23bpJnWCWIAAPqX/KGr1DHrOSkAkXliBUVOSVzhKOgV4kDI56qUy8\nuS8O1BnasQVOB+KoJOdqn2pTWnLLiZosH9dCmcCHmHSDp3ionZGse6OyXsQY\n8GWeguUiOCDCaia1sajNeZ8ZZIZmFhtuG3hAJAfN+XV/I3Jx5n3MuOS1KMIj\nfXjzd33FLzLZY7mLV3mSu59h+qa8JPmZ4XJO9e361gNOosCFUhmls8bjVCIf\nhcrIiKq9lQ8jK0p47eXO3V/ZJ9oThCF5vjTrl5eZ4LGyJHbdOUgvyQTT3coB\n0Jx1OW5s8wmQPCrhub8mOof4kqxcG9yCSsSj875lbQUuZHeReRO9mld4ex7T\nOWfsxgtIksBs62C6nJK20uJsYd/nS94cizfbcHesOn8hKS5wrKMM2bCkHBys\nMwgxnkpkZskZhUdUSImrRy31oHHoHzxykTf5ekG3jhwtD2jG/NqibyiEjmON\nk+jJZt3mzHAPIg+4910Sfx93VuTglr8ZSXgG8p16k3RPbf2w4V+zsx+eKmyl\n7nuxPix6SUKKQNl9pmqGM3ZlZr3gj+hbcOKGO29TTDX0zHukbD9PFKNe3El3\nsGpt\r\n=fRRT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.5","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a4a5e05-1595536792160_1595536841949_0.9146203886095186","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-26b96f0-1595804048643":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-26b96f0-1595804048643","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-26b96f0-1595804048643","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fe36a30c82ed6eef69bd087691a8994af2dd1431","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-26b96f0-1595804048643.tgz","fileCount":7,"integrity":"sha512-KPg2pQqrcBdGjx+NWoh2+yDbq9oezeZXqPT1GxeMPLxylq3y6CK+ld1QZyPDZxfmvMvOlCMZz+yUAoPg18w+Sw==","signatures":[{"sig":"MEUCIQCx5JpZvERpK5eTm6Eifc9mSdBCHLcJAVL9mTHoTS2mmQIgVFhQZkNd/Y/giOXwYqXzOFcBRoXQ2mG9evem/HcpbhQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHgm/CRA9TVsSAnZWagAAaL0P/3tHTX86H+Ad6mkdLtrl\n9Nfixhr5IUF5eJqrnhVEfVmqh0CoKCJar2VTmmkOnsomDCR9isf9DsTQkIka\nAbdj4Nm7oySaldohZXwGOhF2iZUQV5WnjM7btz2SVzjC9oAk6oRt3NFwCpBK\nBlt4/ZhwiH51zprIeJNjFQTChoxhAmbwuZNeHMYZPBnNyGSZ+KmAAo3OSCVX\nE0z/43p2cmtg/97B5sQsZEMq3fbrlb/o7/zannwej97DNfUghNJKMKLfEhB8\nTBpt1i4KTNdIwQdy1mhFGEneHL8Lu9+/1Kk5SmdLPQJ/rYDdNcaTXIxj+63f\naVZM8cVNp2xeG6GP3vjZlS4BH3KLmXCIuDZ4JSYPZ1P66/hyh8C9N1XtOKN6\nmMMz3sms9vSW12pCJkpqdCt+kkh++dEMibeofnKr/L984r1h8CnPKgt8CwMs\nu2e94xOzP/Z2KEe8ZZKYl/1tF2LBoVi1vxGYXiHy5kDAFFlqfq4NbIe3ZwBZ\nvPaatKf20wY9mFJjJepNMBENrsjyw8ESGvmCA68qcE5gNHnCfuu3xKFoqcQu\ntybrqgzTFL4e+lElPQ6HHELPfoz+WHhDnwWCTliGDDrp7chnVVi6ZooOHGHO\nYlO8hvzrZa/aj8yNfOERePIUTxwxTcApv1dUBMEqvA1kldwmAUeYMCX2LxY6\nxbzP\r\n=nMuc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-26b96f0-1595804048643_1595804095423_0.9036481347560372","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-26b96f0-1595804050942":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-26b96f0-1595804050942","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-26b96f0-1595804050942","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a123a3202bf7e2abc3978ad58d356c5f5dbc5a92","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-26b96f0-1595804050942.tgz","fileCount":7,"integrity":"sha512-C1K/O5xGH00Di4i0pH0id/HzxKwoTaV3VRzzCHx1BThsih+3EQwZqyUB34v0klLgPnyh1s31rdJ3CIUTNSighg==","signatures":[{"sig":"MEUCIBIUZ9S7ZtLSa98YmcRlW/kJD/V016j/QPrnzb27cPn8AiEA4YM4SSSym4+BsRPfbw832JLWO1AE20l0p2XxM7Wq1qQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHgnDCRA9TVsSAnZWagAAV+0QAIEHQd8u6IudLnVY7M6Y\negi+CJ4TrAm9iTAuLd2Eh5g8rDvGigyZ9FNRMA3UyeLhuavo8aHQS3jrGn7S\nrwLWtQzFGvoACHKCktfPVe1xQbjNT1MDUPG5iSXlInsIKJpCzpljidwGJAy0\nOavMIWfIWYdih1ipo13tRuAeioY0ABJrsie0xR/EP6fdXwtYxXYWISaJ3VZB\n2AwifU29hLuqyJRP0MScE0g27xwGy0Juz3pV1daNYIVWGroXq2pVlY3p38U1\nXVyahD656aRmBQJBl/p5LG5lchqVZPyvL9+PigqDLGav6uCcyM1fOR43MRkO\nnx7KlYTRdr3r4SDp3qix60K3fKekuFWiP1Wl+4MpUjhyh3X0ga7KZA/SjpVr\npEcge4YHw399+/rkQX+b8TU8ttwwJYF2CRB2nfvTcuETp0ZUaW4DL2Ey7TA8\nbcKYOntPl4/C0irO3VCijR8esvRts3KFi11fFOZbNqbFCqrZWru0vvQ/QgPm\neaS7uREZzSw6C6r6HJ9ioZa20kJFvhKFySjzxHdVZSLp0za9y5PFLjSwYnfe\nv5H4IDsc6HDNMNeDxGilZcAbxe5VLjzbGpGbA26smwlAs3iZEEfvKUz0xa4y\nGWHylN/wc5/UvfFKFgy2pYenMMEb1xZ8QJ9UdRd7wW78rFWAiFLFvl7HgMcz\nQwE7\r\n=keb/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.3","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-26b96f0-1595804050942_1595804099461_0.15566876561960585","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-0b2d17c-1595927595601":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-0b2d17c-1595927595601","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-0b2d17c-1595927595601","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6fb0b31b41f9bbbfffc384e507ddef71976c250f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-0b2d17c-1595927595601.tgz","fileCount":7,"integrity":"sha512-yAtoVvBYkykDvIL0GN++EVWPZaMxXQawDZXFXsoiF639krqvCYlSakzEuSr74dnxXjqSGPfYEukBiKVWX1vaOA==","signatures":[{"sig":"MEYCIQCJxIWPqmnhKr2ArjhIiciKH4cYj+1LYhTPEh4f7n9p6AIhAPAyV5CPFAniV4nDy+7UOoEmYHXsXD6IoCL/NuVorGhH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH+xnCRA9TVsSAnZWagAATEsP/RtDK+HhBXDqhvsOK76C\nJ4VtDZh8XVRL8bDRFh7ysLSEh2z75UqEKvz3OBrKVSRvNqXwfTvNeeHFV1Ib\nyTUW/4CnUHq8pjfXA2hhZevX6zjIHpsviOj2kVRZpgOqCKlkRxK3MWLhEV0e\n+6mqbExTEnbrP+J2tyhZemhgdWj+Gr1Cfwm4i6pSUQ96phgXssHtqcpyiF+E\nZDHsEY/dMnsKq8Nzw1cC7AbJAgS9/mXub9qLUmt4wabGC0wqiIKZGeHE6kPT\nWW4EZzuILWZfAloFy3ereoPUowvqGUaGIIcNqNZI+Ve232ZYNKPCt52ys+p1\n/EQ72/c4O72J81QFwLo2z/D5Pf2G7Ld3dFqXR9VjoTGrvl8tl85CLvuW77Cx\nzE2vBHaU+g5dmow1xCxx80QmMUhh1/LlIvT/4XLYBLvTeAS2MfXTj6Jsu/jZ\n/D2ZGzZskaA8aNN6v8vXp4pZJA1WCaR3X2VV3x1Avz0Q/FRJGmtAMBIA1ru4\nJ0+dSWHNkxYtfWFna66+eyrQGf+F0uTaOWtpJA3vg02HiCpFNQ9cQO9NaD5+\nnuTDgAD893Si1JoI3laavHBdTGPyzkZcDOOWvBcNnkPdxFfECwhUUFSYVnpS\nteVAGdFNyPHL0NyL/ZJ1RAXpFCvxEaex/mUas7a8KCFyvT9shCK0Ii9oa2oT\nV9Nq\r\n=R1NN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-0b2d17c-1595927595601_1595927655402_0.5018397282294897","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-0b2d17c-1595927601745":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-0b2d17c-1595927601745","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-0b2d17c-1595927601745","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"da12b428bbd2d9a300bca5fa854a51df764d1389","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-0b2d17c-1595927601745.tgz","fileCount":7,"integrity":"sha512-eFp5up60yiKRygdX8MpNJfKXPjHxuDRpSmKTIaikGAIRuFRj1nol2tKaE9n8lu6lrbUhVi2qxwHfGoXWRpMkhg==","signatures":[{"sig":"MEYCIQDgtuIfdwg3OE2iGwnNL7AMHdI6oPRqbIvfgfghfHWC1gIhAMR5+9SIS7F4oS2MwwagbCxQrG/enZncnV/EGIZMv8hq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH+x5CRA9TVsSAnZWagAAdKQP/R4qZAoSWxQxLlRD1Gsq\nQ/aig7ROCWZwsBFufJ2YDfuQXmifW+r7++AixsLD2ZdiXz9Ugs9f+gdasjE5\nhfut1MIaKdHyW0fWxnzwqJrc9KLANRLR2KYnuig2jrS7gqaWNXHzOrfAUl+5\n2mjDaq2t1eHJdNDXIVRg/Fkj4Mj1O0+nlIM18DrS/2WQdn28NaWC1MHM8JqA\nLIvV/STHqE8uzjklgy18guFIOQDTI1QLbmz9YBfKxDq2RR63y7APNTOTtwjU\nrk5j0aRHpz1JHUNsl78Wa+AZ+osAmKIRItaav/o9pKud/gZbjklzznnZ0TZ3\nTSsF+4RdV65QLAEhXRSpCya4NurdDlMdrCXynlMEUdcSoONJFYyNaaKAaFbL\nXBxMZfZanYufyt9/+A3cpvlkxLO4IuFI9wPccKbBmx2VrVYnha5JXXb+3tCU\nJDarXX9QSWQ4lDPT6qQxohEGtwh3eRzkLFcWYn/p55qxJvsYcVYlXxCGOw+Y\nzUtkrGUdZhgdEWSYsHztOugumBwxuYuTq37hswpciuT5Gcdyf91L86TNCkuZ\nrNTln7/U8EJSxqUZ4t1TjveXozug9h5wz5qfObrmrbU4IhvoyA0uVaBMxrJi\n34hVAxf4ymnDpvCJ1mhucch4Wr222bGPtB0lhhcFC5ms3wsmrmi/mp5R2Avq\nNbx9\r\n=fkXC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.4","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.1.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-0b2d17c-1595927601745_1595927672772_0.7504816777770691","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1e2f23e-1596105936555":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1e2f23e-1596105936555","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1e2f23e-1596105936555","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5c09f47d758503285ce845f7bddd2ef83d2e497c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1e2f23e-1596105936555.tgz","fileCount":7,"integrity":"sha512-HTO732EpPGh+zy3+Lvpl+wtdSsBB43LuSbCxYVkPf92fGrXOxm7d6fXyhGcCK+fOYe/E3YAPiHyPoB2zpBq+MA==","signatures":[{"sig":"MEUCIFS5y8wVkhwtERycguZalpisj5w90W9++EdBy9fR/gl2AiEAqqrOjIMpEvI7k5PztzXtSHM9yPjb+uPISvM97ck53m8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIqUGCRA9TVsSAnZWagAAArQQAJ9ziO3tkYuxfh6oA3LC\ncKjvf5VkTtCvpVzMSKR6Lf5vZFj/aIMuSMSonxbSw4SxRQPPcUUvQxuAJax0\ntjn47Q3XSz3cW2JPpOyG2LiYj5HluErBakbVTl6db8yyRmJmI7C2LXqOlw5F\nMZMMfjlzJ+1qc3y9hpM3+8a1OSYTiPbgaeEfyddXIcfilsbSQ75TrGC5zcJz\nDrT7T0g2gUG2ucL/J5/aHXf3b/pgtWiuF+GD0eXtv09tEAtHoHvtGQbTOWKf\n/F+vom1eyyZM18cQwiONjhlj391p6VP0o3m5B7cdtXHHxBPK2Gbcho9Clfew\nqh5wUdEDFXqAEawNCIr512ntqDTEEk5/+/7fnobj0oYSCDoov+W1efruKQI4\nEQnLazrgd7dTyGLXCpTPYApsv0LDysGiQgN+kBnHBaLd2ypMSXrG3MHfcoAC\nrUOFCAoEveM9FCSELF2xE/HkruF/WA3VYXLpfW19RrWLFy6VzH9Kzpy/r/nk\n1yufw4cTL3RikuVh5sa7Ax/0AFgPXvbm0YdLvnYO6AgAMoHU3Br7+7JboB5+\njEDxBxuQM9oPz89MjQhZQpAxDHQXwmLALpeKYJ0yPnvteTmfBFF+wrzOSMYr\nala/03sqEVPzQfv2XmA31TZZzr+eUitfNlvZQmPP5sPyqPomSogoU7SqOhJs\nGif3\r\n=smU/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1e2f23e-1596105936555_1596105989538_0.20122910242705516","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1e2f23e-1596105937714":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1e2f23e-1596105937714","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1e2f23e-1596105937714","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"60525336cf77f86221df612eaddeb3ff0845ffdf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1e2f23e-1596105937714.tgz","fileCount":7,"integrity":"sha512-dBfC8qVMNGnVVJR1r4zcd6Nt4qV2Y7+4xUmWB5LBPsi16DE+YzlooR0B+bPRJAEkhXqICsxKSlNHj+xKVj1sOw==","signatures":[{"sig":"MEUCIDZELWDDx+a5129XSMs5Lzp33HnXObt4Ps3Uo0iof6zqAiEAgKCgnHR7qEkDoHEsxvt7fHEzE8BB0M/EzVPqa+N9LTs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIqUVCRA9TVsSAnZWagAAHnMQAJeA+y/uG+/FPWZgOJli\naH0uOGK4rZeRz5bGABGFqpkMtSOpa+szKOr6ld4Om8610+jTjoXCdDSg/ex+\nW0gQhMvss2Lc536qJ+KHl8qBFDnUNYmTvzkfzEUiGFj7GdfkKGM3iKggSyOr\nwQ/erW5jcC9t2lh/WGNvxjPCrNK9Itd6ih+ZLraRywRa56ODUxzAd6iR9TDX\naibN8hRp4MNihiXY2J4YHAZDdPzyeypi2Y4G/mLcb0nPHxSJigefl3Gxv5cW\nwIFe0RwgXEKY7jM20fpb7bMDLp+o5B9Un/OHySBYdPg7ycqyGFWFa4A6Eor1\nebsxvX14eDY3/26TsIp6yyOGj2wXalOfM87dnrOmZ2L63hNgLvy6RY/KFCTy\na7sTSLWA5iZ+ix9BKvmgET9CDMjsLI3XFDQtga2X6g423OBmUhodClQidiu9\nEB7iXSc4wYZLXzUgta4F8r+E2OnBrc0BWCENAK3Drap5YO32l5U6qseZnC7H\nXNFhepG63N0dH8iO8S48fkG104//Q7cux7fsLorwo3S9bhv1tIi2HaCGMgtC\ncers98kybQXId0kpmgRaMY/Da8spmkhEu4pEbPMZSDwgJwBbR4mRBe4FKlbN\nrhrKlmAMiQ1shykkNvQAfQEXeOwzQ5ws6U0J25tBNwHY/CbwPLgZAJyba2mK\nN+8y\r\n=zRNi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1e2f23e-1596105937714_1596106005059_0.49496924992175106","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-ea3b198-1596106571393":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-ea3b198-1596106571393","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-ea3b198-1596106571393","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4f0feccc735b864746081108f2a02e28436755f6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-ea3b198-1596106571393.tgz","fileCount":7,"integrity":"sha512-5QB/eUTIgqIrDYnPxPRBDorFMnnX097jYOXGiCBtBh8ih+ck8MyceBOmdb87SP07po9SZdMn71VRVfrW/SzBfA==","signatures":[{"sig":"MEUCIQDB4hHglxyogoHS/UFArr9NfYNJOIWJemm15Amx6ooI8wIgRcLCycEpoi1N6UVZ+BZIL5nxzR89AsOC7yjYDqBmbR0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIqd4CRA9TVsSAnZWagAAORsQAIBIQXvPT/5UVdG5Fn7h\n71ilokyoh9RsrJekkErGVMgYPPGj2VKhBdhNLGv7gEGEOnZ5eun2uo7MFt7Q\ntxT0e5+fs0Ld8FLQ/rmwjqRjDh1Dv0knCkcO7qxN6x75uMe+35jh499KrVra\nG2ChKFMzy8EikHVyxRFqEDgqeEF0T04BrAud56CJXaOJjJ8zmQyhGuBt7kLS\nXYQb5j1fxwjeob5AZJgoyGKyEh0rWmCRZyFKEbnRpQP7dmHEFD8Zffsxaguw\nEPadQ09eXwu64Bn4HlbCi5i5fP+vhUubnyqRJfcwX8C17shdMhOvvnngjEw0\nfm9js1bHqBnH0/Gqfe0x8tJhJu2C+MgEiKnN82oZtSml65O6RLQ7kdEjt01P\nL5XAxF2t9HeXD4MkuP7Z4tnQne89VI6eHVlnSjfsRi4fF01bGuK8FsgH9SeY\nMOeJ9UnzgjCKVnhExdIaqPBrjOZ7VGY2AhlrQY6QcNnYADXQhCKXpdP+GT9B\n96/7ijuFu/BKDxEToYrfByz2GrPNtllKQ2DP0/bSCgaMeoYQ5/VDJHVOVA9X\nBcRicoQVSeeAmgqg0r/N64U9zRGWcZB4P4tHxPu4c7CVuZLprtPYlQBUCUXB\nlFw8HKeLjxdvubtIyEYTPfN4MbvcRGALrxQfVaHaCPaq6KpLdWHtgFLwAfJ4\n0x4z\r\n=oVHx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.0","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-ea3b198-1596106571393_1596106615816_0.22887178445277367","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1633b0f-1596109345438":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1633b0f-1596109345438","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1633b0f-1596109345438","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f6ac0bf0481ac16a0f1f5b8602afc976841812f7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1633b0f-1596109345438.tgz","fileCount":7,"integrity":"sha512-6DBB9A/vOgLvnqG6nwiGKfyDzezr2zJi0GvBLx4tuZCeujjTAPQai1wo/gQBttHw7wBy7sY6vO6hc9aZjqnRdA==","signatures":[{"sig":"MEYCIQDfoxpARelQaKCHfB6FCxpaW+cWCdFGQx1OlxUcBTIxCgIhAIXs5pk02LrVzu/PxDlVoSaT0PfiWxZufvQudn4+FlbE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIrJYCRA9TVsSAnZWagAAH3cQAJsVpFXbPUArEvKwiqlz\n0D7Fy5daLVMbUuQhTHnYLXOefSEX51aYgyGMHXNXguwarSgHGls9ogCCxtxS\nq787me3PvY0UUlrnrxRyZiAYl4QkS1ii3cbKMTnIud+Kkgp113zQ2cI4uFiB\nrRUgeSY7ilC8PMtcu4Rf6ff5kNq2vvRGJEo3KQp2fvX+c8wvIaFvDSIc4ZdW\nzNuhXEEh58u4Gukpqdd0SsN6+LuYaWwUAPQJIFDGV91AR3yPkiFah0fuKv+9\nacQleLoHvHOrdRSAoHIiv0jJcT/Eu4EU05GkSLlJZE+maOOJjksHJN0BK+2d\nE3A9rL5crwKR6cGfx3QAJmEZUvow487ICiiq9ysv9mFwvrToPjqUzbDuzKOD\nJyI1O6r7xg0Bgi2j+DmTtyGSJ/vT4IEeRVayk4gZUsz4rDNIxtT4Xvee52rH\nF2Zh+4TfPXT0QvYKA0dxgvkYnCDF1OLb1+KK5O26xd5gmHjxkaT/HwkvPVSi\nTzJlyS+hl5iIFK1kmQWjCTH9Lw6r+SD4O5zLshrO/+sLEFgwtWXoNXo6naOx\nlmTUSb3w3qFxDXmSJPirKrsmFEmh8Jw0KNGTi5RZJLoo7waPP8TFQ/vd1HTg\nLnqWFuC3Ni+rmWtYTU9l3aCYsAXYIwmxo9Dpmla0WgWXKGQ8FVU2B2MHXcc3\njhEw\r\n=jo8J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.1","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1633b0f-1596109345438_1596109399718_0.0031309295015709004","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1633b0f-1596109355406":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1633b0f-1596109355406","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1633b0f-1596109355406","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"20a46a105565124a6ebe1303ece263f0fd0aad12","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1633b0f-1596109355406.tgz","fileCount":7,"integrity":"sha512-W+Cz8EoGkk1r3Y6l1qxei9gzT0nE8wToUIc4NRaSnT7/swWpxlw4hQI5aIj+zRPoPeYMH4ai+akGIKOr5G68BQ==","signatures":[{"sig":"MEYCIQCFex7R+GVxKJ+BMCecKDSkMR353HffvuPEnMmlJdrgGwIhAPW/WrFmD1+s/EPwOmUQJ3iyHnfvB26o//EfDx9U0LQS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIrJyCRA9TVsSAnZWagAAhkYQAJSQtOsBMeLgmVQAjBy5\nrOSydkgUif1gAiY04+xIx3l+aRR7D/DXRoooVr+hT+s+be5NLhkvas654g47\nfP1LLbL0iZ0tpvJsB9SLZjJNUSbkMIkPV1HhNr+IvR43eXriWPlZz7DtCXS9\nle2Yf4/kYYOr9U2X1OAELhytbzZ4VKwhEYqtxxlJBnkrfovuCKRl/BdFy/gx\nQdj2lmwrmetx3kbKsd4pKeVf2LvwKpod5ggpo1aWN0CZbY8wATf2reJzRBbh\nP0ukxN6/iBt0fi0fvxGoh3Da9odKfwFvHjzfV2HFdOq5vzQGnz893vK3Jdh6\nib9eMRzM0Fx62aUAki4iPJyaV5hWaLp29XUPp6jK5hf+0JlxMuhgVcXLcG+M\newWeLfXXgdkXQO/0SUWZpy2VAPQGpWZeMGtcYdguLGuMAmKwnUGFdLgF95A4\nNygg9M/TAKZ+KYtaEWR9m6uG+6fAreeO8tDoDWR/mENXz0Blp7Mskm7rmVNd\nZJANAeD9mF16al59kVRjmT7tz7RkfPCiP9aoYsaQbqQtZT4AqAiM9RXQIDmB\nc7x1u+PGjgJc6FRNipdLb4R1TUBJ2+iGehThLEJ4VU8lQwE5dMqFAbo5Zcvw\nQiysE3ZKqQO/fHEZKcUFzy8h2FiL6s9n75gCqT7vSWUtXBAIyJZHi7EMqhhG\nH3wq\r\n=3coJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.1","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1633b0f-1596109355406_1596109425669_0.6990208010523877","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-ee695ef-1596109897315":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-ee695ef-1596109897315","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-ee695ef-1596109897315","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9b598cd97218e3e2b4863d724e1de70633d2fb66","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-ee695ef-1596109897315.tgz","fileCount":7,"integrity":"sha512-SHxGOPeRsZrxAk5mxBFtg7vmgZuYTis4OW6ek1pbeiBGL3Brij2kk/p7Xlt3WH231m13Ak0WdS6ZWzU+zKnGYA==","signatures":[{"sig":"MEQCIHRXaUCaWU/syk3gXSoE9HB7rq+Tzu4X1qD2de5riRS9AiAv1pvZvlAPr1Zmz3ZDYj7r0mft0GDWIG4aGXcenRoHnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIrR2CRA9TVsSAnZWagAATe4QAJoPvw7ZNqcyL4hNJo2p\nD6OP3M2azn9qOb+UHLtNUZBwaGi/BV/6EK/ADiUKPhYc4ljOIe1b49kSidDx\nujZ40gudj8XN1UAFmih7hc+PriQt5h5IElneqNK5F8+T4ijDFhDXsgfYnehS\nodbHgZoaoVS5IU8ubakLXbK+g/s0DBURZz7pGPE2AFCw/pnodJKsRATb+lPJ\npJMNaCqLwxKULSUZdYMuSGk31gwHAn0vrf8TBnokQNyO8eQtVe7puoD+KWV9\nV9FovulNmAMlkPf+sO1XlRQQzq5x6HGQtMARGZZVatO/JET1tqbwppTi830Y\nYGnTLjrxAa/TtOEFASEnvIAQlxJYTTSRgGFvO8Qgl9f1ym7zrAiHNq7QE6wg\nG124YmCHzP4q9dczqyxrYxbnGv6MhztvuWBswpLaSIaxwfTVH4Nv5eGMPn6g\nJpgfYbWif6+1FTt0/LnSuyb/VZdGHTAEjVSqMqeB5AvjHID1uwktTTsqzf3b\nmhapGBmCs2pHVw5Xq1aGB24rj0m4lhh0jEGzkZ9iBK6rFHVk1v/VZGAsgowl\n7+fMFImJIaOaYe9VJYdw/k3KecrJJMAStavEBZ+y0fjAnFyLVgNUem6St9E4\nCQBcFGFHbOntzukt+X6VpeqFbq+9D4e0F3XVkglB2hmsoWP8RcnuWQg8pt1Q\nQUwo\r\n=jGbH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.1","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-ee695ef-1596109897315_1596109942390_0.807771639833039","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-cd259ee-1596173664887":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-cd259ee-1596173664887","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-cd259ee-1596173664887","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"037b2ec23b49afebde778c2e608c20e604e49620","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-cd259ee-1596173664887.tgz","fileCount":7,"integrity":"sha512-EdSUIxlwmMaPhmgwYkvP1rcQvd/O8jceI7z5UGUS/6pethJ9ZD9Vw1avdOCWsGoWnLTtjANg2L+fl4+Kze3etA==","signatures":[{"sig":"MEUCICTfIwiUa8HuEL3+pbcfqU7c0bMQwZTwWHKE7JQXX0fnAiEAlRE3LW0XHNXDxjIi3bfUE+X+jz4YOb/S7gpaL3xmKRk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI62QCRA9TVsSAnZWagAAqx0P/0ai5U67EEE6AFnn4ZMv\n2seUbYwpFhvbRFgnQzySj/gag2GsLObUUVN64OmKc6UsxM3tBsSTLYolmYLw\nZ+kRqGrO9DAy1tJxVlJGF9GYsbXhoVpp6NWeMcbj93pi2IJp84FEntzONvHo\nK4yv9G0JMriQBPZFAVjspDB7CtTRjClU4SVdPrvDPU9+XCK9kZyi9T5CH1It\n+fPxHxMLWMuggSZgC1KKF0aYWBn27oRr+4lDxVnzJffIZNIZcndn0Flf5wNU\niIoWi5EDRS4OnNxbr7qMzuCofPDKqY1LHabZol0+cYNWcInI3ZR4jjLWEtmS\n6GEbEs3pXpE7khOvoe5Mo/xColGaZ7K0k3WsoYvI/w/TXi3pDivkEe1iRnXX\nSdHJi9OkV0yH1iF/uO8MX1BqM4mBsHfqX86FjLiDt1DaGSjFISAzNODb4gt7\ngqNfKqbYcFciVgoqiHn5hGykurE+HJypv/SI9s+kfccsHAWSuraC2E4kjzuP\nS68Y6wuLQQd0ZgK/Fg7UjFaGfm4w77WZRFyHb+Fgsy4crLuLAOePlQljBZ4W\neIuyLJ5EwXHgVZeK5vk8xDc2m/JDstvVAZ/yyGfLSp0k09BMqeNJs4I9OBw0\nPpRZ/+o9UNF0YVJWLvOFlljiCJatvoZ0x58Eebzp1so1Cj3adr3EggRv2Myo\ntusW\r\n=LAgK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.1","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.8","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-cd259ee-1596173664887_1596173711966_0.9353441448816271","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-cd259ee-1596173666470":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-cd259ee-1596173666470","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-cd259ee-1596173666470","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ea99f5901699b1b2b926c9235a117dff465c9ca7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-cd259ee-1596173666470.tgz","fileCount":7,"integrity":"sha512-jTUw4vJgcCCj0LeMOo8Ps8YF/8wKklTF/562QvrrbHQLWQrjyctOMm4G029e4FymjUgnFedl5TE7V+8iquWgsQ==","signatures":[{"sig":"MEUCICg+E4ZPpIxGKUgV89Q0rPeKQ2D9fvSvlnv9QvGdHNtrAiEAuvCpITXTUJKYGVa4s9DNVeIUMKVsr8g7WfOl/bvCjhg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI62YCRA9TVsSAnZWagAAM9gP/RL+8fmYmBn4R6oOOKmB\nYqPoaGSls10R+2wyffSgLP5G3cibO8uVrWPh3zuRxC5LjnP5sVGIxAL/9NPb\n161OfiTKp52fvGvqmf/F0VEFn5Rtcilws1oNihZmeuvc8vjXt+BI8oCxWVFn\nbkYyyr4vCdBzpeRlg+/4aR8G/DLsRQM6WzT/DexMIFkMmpz0UQsUfrZghOp6\nBG8c7eDDhnnEsi/xmA6lIv/7ojaOezRpro72hzexUgpDUy5b6woeVXxW2eZS\n23y+ZZnhQNCFw1BZ/hEbf+pSLPaRhYQC17A3MxQXJiowiJWviG5evYdewYI9\nT4WWdbWhPNH+K38LST6HW0LwwOP00LLayezpmW8P997yuPujnpmMfsdxdIW2\nihKvuvv+fqS1tpzKJzVHk1njHq8aK0OZkPYVP+I8Z+d+GrhFxqESk1Fl51bj\n3GuIrlTyGzw6t+ZBpoWrRYZ+JT3FVX+3Z57+bcLwzaNUN0hLE7twTJGze6C1\ny4rvo3IRnYOINB1rX6fBfmUsbkdDdn/siJk5lOMVT6VbP01p+eh3JM62xtvc\n/Nlf38kI7Mk3XawHNGt96gmSIUC9fHb9VmHW6K/wVqSfkA8fk7m+lHl4jf8k\ncd/3c8lZSnxFKB6JYtsOcPVCpOh6kQ6whSV2i4DYnocULAdF/1j3hxW3WYVb\nYrUa\r\n=8q5c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.1","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.8","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-cd259ee-1596173666470_1596173720441_0.5753130794339978","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-48be87b-1596193300833":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-48be87b-1596193300833","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-48be87b-1596193300833","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3a7a5c45cc2229cab55f955465d2761ffb802a40","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-48be87b-1596193300833.tgz","fileCount":7,"integrity":"sha512-bSSdoL0s1u5KLJw33FILIab4G0iMbmiG9FeEoV4TXfH4wlBk3+AYWd1EbbSy3YRM1Xu0YREjY7HJI3gbboP9uw==","signatures":[{"sig":"MEQCIFHkF0GAhpi9s4/lC1HxCgs0BCZBcektGL5jsL81QVSFAiAaGv52yUduxgYuGiVh0w0ZR2LG1P042NTKej84DxyHbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI/pKCRA9TVsSAnZWagAAUZoP/02E+cGyn5NeW7hI2s3E\nGZ3G2AHMVs3OiuSd6sYuwXPyfntp2kZHTkNQWTE1e6ID1NDTTtxJlg5Yqqmz\nbqxrQrrkZY7MP/S+FBSa52JVWHaZ14y6tP2Syh03mBR7P2VwUHzlQPKrk1Ep\nc1arMhKGcQpUMUSBdVVg9KLCj2KYb2PdS4rhfuB9ZebG2Kw73/YQBwp9THby\nDBxtafpajt/QW7eyYoJIsVwn2yyE5JPyOl/PiqwJ61FAGULPlimP5s/GGoI4\nTSOEGadcT7ND03T2EebkHVjoScvTj4MIB+HFhYdaWJ8lu5v+unV8qxPY32AW\nxPMCWlDTpd2MNG9d9h7x3MBiUm7Gl/N6vSF1qr8WioWUcZxD68SwdOE+bodY\nGkhGsyDOIbeAxn4pXafPViFrkUV/ZPycq/sjyzcw+JuVYyEE3rj+r8TdAWss\nuEIpBZQKY26/onUU1nsUQwx4d9EhSXnQCmeV38ICL9MVeBcWjNn9LrNO7v6F\n7kVlWt3D1kw2JTwO1nukWmGqiC42k+NDqKOy3EbU4kZMspSaBQ3W9y6j2icg\nvxKWZwC8cGbzF4BcKBK4o8nZsc7piwH3GmS0bIkDfLjfnDY6t+hikDMh4imB\n2JVizhcej5h1wj2c63E4uBwfkKPobcR4y+eoFhGlXl6+oCQz7PcQawJDMgB2\nBFkm\r\n=8Lw3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-48be87b-1596193300833_1596193354294_0.4023888360416088","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-48be87b-1596193302906":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-48be87b-1596193302906","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-48be87b-1596193302906","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dfa1db324f77a96452443fe6da4c0261933b2fd8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-48be87b-1596193302906.tgz","fileCount":7,"integrity":"sha512-FijBiBdMbEsjReZBQxDNv4EaodmsZJMFqJXs2CIlnday9fiTDC/OcpOjc+yfEE4PIwu/egnP1kWD9OqQkik+0Q==","signatures":[{"sig":"MEQCIGY+mIYQmLt/UpTgLz2kGY4kuDxL2rJgyFc6IInN8tqAAiAbCNAXZR4e5x3gTplblNr6BC141RV+WX+oVVu3ReUe7w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI/qFCRA9TVsSAnZWagAAaR8P/1/tPALluvU7jPfigiTd\nE6o2O4ZJYhXmRWl2+SMsC2MBEwERRkv7YdHUUafXYzsBpLm5SRzJxjVvtzPS\ngQ2mFaDoh1PLuo18aHNDJzEUjmHbQ2Mp8Y/XPcduelv6tTJ9DjLpbJrb2nNO\nfFnkbi/mzfCAzr5fEHUvl/4akBszM7V+w7+llnkBOahHV9zroiocHNRw2pTF\nZ4+eknclwxiN8VCZn1hEIjQZ20+7i8E4dxv3CMUo2KNAZVD9NMcceadCXHyJ\nG/Ybq6QlRBLClJ/6NLHZF66b1Hvk7w0gpi5Mn0izokaROFpqLS7pTR+isYc+\ndZMiLF1FOwp8LW/L7uJMUOD9Ey6K76EgIGXy4yLz4gyNULsJmwIOrLkXSi6F\ntMy+j9NZ8/KRedW89AuWxiuWnRKfB0VXW6McxI6V1E7xDPS9M8n8gVXISKY/\nuk4IsxP9NULBE3axy6o/gMecPs7vzdzURl7XvSgq6Iqxlv3Iu+0Wmxjeq/5k\n3SBdhNfIsVk/AbNWSwKppVWITHEh7AZOdTn68X9FOps3ju53pOL0x+VZN00J\n3HrsAx55AYPd1E6pB1Nzc5inGwwdKk/mVkcDxodSKVhAkL3dFw2YfnL642oa\nUxur7D9p/Bhnyxa1RPq3Z28CU+F0wIw13VcrpYtCkSs47wzhLbkfWhRKIYl6\nsVtn\r\n=Zu/N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-48be87b-1596193302906_1596193413245_0.7825097939550822","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1d8aa8d-1596238649617":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1d8aa8d-1596238649617","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1d8aa8d-1596238649617","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d9de5b7e5b51fe0a141836734b9d54e6daa036b1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1d8aa8d-1596238649617.tgz","fileCount":7,"integrity":"sha512-eaEfqoTI+/fiMSKo5aixEZe6IE2Kw5n9nZsB0mrSUolS4VDtzECYALl/fJdyJmOu9NPOlC0jG6zgoNODITJfgg==","signatures":[{"sig":"MEQCIEeXAjPOjPG9A0toaXbq6iFCxd53CKmSFgtGYqNBod1lAiB7jSy6V6DWo7BhfJni5lV5aThky0QX+Hr5uiS1LbDfqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJKt1CRA9TVsSAnZWagAA02QP/RT6Rd4YsmM5eJatzUAU\n97Su+Mplc8gH2bBPjtNfnBThky5+DhFeCGAOves/wpKa64JkcwCshQA82TNI\nG84mMW0VAn27r2s2r6IPML9cGhwSLT87GJl3DoZJ/J9cQRWPgE46rmRTkpa4\nnn30n+d08tnhPALXnh8IE1qT4LRvsozCY7cgx6ovlW2kTDSMUSIIlsZXvYIo\nW4mPGdtio+pUEL1hO3BQSavlBHJkZcCkaFYkwBen8wdRCBTcOqGW+dbtRwwO\npL9U6VdOENZTbdTh/jIBJJpWtmHt+lbsEr5a6SPKjwQLCsE/PstjALcV9mAG\nyK9UgN1/RzfqdEo2aiHBo+PCL+xYfvTiBLoLx7F3pfSY8DQgtjRMuUuXPvkL\nFUnKC84jbuYegPTjBkZKcjOe1Wa2vl5oeD2miO1XQ4B7RJrRN9G+N35l0qor\njBKXnrJWNgU6NHqWAjxXXjwSabJomTTCf5KE3cWexU4gkop/5YtY05CfzsPq\nvXnWFi9YKQQlNSdTdyooGbHe4njlRVbYczKuSm4B4/tTG3xhVSy9M/MM9J2X\ne4Z+9ppeoMVcvU2twJQBwIvsMcMoxmPzcErY8w9abcdw2obgtZ0r0D9zg4/6\n9JstqXvGTtkeYRSVQrm3/OwBtM/rAclIfr4b4IVVddfw6gJ+Fx1IVKK8a6yQ\nlS2E\r\n=KYCj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1d8aa8d-1596238649617_1596238709085_0.6968776099444203","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1d8aa8d-1596238645069":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1d8aa8d-1596238645069","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1d8aa8d-1596238645069","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ab9ecd1526436d3fd5458c6b620c0c903cc906af","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1d8aa8d-1596238645069.tgz","fileCount":7,"integrity":"sha512-A+Art2UNS2lRVixugYt0kr070en+hdiWMOTa0RIlkxz/YPqHWEKMUQvmEUC9g2G1ywaBVg1d//XXg9YXNqGp/g==","signatures":[{"sig":"MEUCIHwzRrjVjlmasu1DchZAXvn+rTDy4TZ0dQM1wwRCjT7sAiEAgnRfnsmE2lrSXG4MpXikOmHgSSbN95xweG9AOirCRAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJKt8CRA9TVsSAnZWagAAYukP/RUnNG6lKEKV33hJe46y\nNufCzrEhXRzCTHjBL/od1kCCsgU4+XJ7UA2KkSK9Qpy7ygNv9SVwbLEoi/tr\nALfwFK8ZlSaP1+F6nPst5LKB/uFBB00Y7fel+917vYl84qtw7dTZEsGBMmKx\naqEc7J5AWnXzxVla8s1dTbyl+V9B+Bc/N0xklw5BEfrunvdk6CpSzlzrIgKi\nd7VDFzJBWyQ8o3BAL39Gd90F5NtrN/3ZXwIaPs3vczU+GCxYBzTE9CeBx92N\nd6yrOgHRcOuDXekrGTKyUmnJXZSDXC290fJ5f1tpRi1PqnEVQnUkCNAWV3l4\nNygA33I4MGmBOLxcq96EoarsFJplBiDYrfIrpJ6OjL4mMp7r35Zv47bTXtcT\nC8gYv/O9Hu3srbTaFRr9TW+kmZ3aCEngVwEoGsN4l+YDDqKn/SWLQdUGBzLj\nx/gpODFujDReiADmpCcly5qN28ny2aUDycJvVXGpH8kgM6H/lqej+pHBrRGG\nShUuOkxBXnWSfoVlo6Q3Pmup35k/m8I6GDV2A1/7Tp3vZwzrRzXgHFixX7Yr\nX4SZNhatLGggkk1QYwAgXUhS3cQTz86SpQ4IqaUCphj1+owHl9KnGQKtx14H\naUuupwpBmiEhy23HHfRsnJfjXl9IidDtEqwpInKSfWjnvip4wzqmOZNwUmOC\nFtvQ\r\n=ro+j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.7","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1d8aa8d-1596238645069_1596238716486_0.625092358986264","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-013b024-1596406652561":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-013b024-1596406652561","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-013b024-1596406652561","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"331a943b5397beaa5240b9a92bafeb585a43072c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-013b024-1596406652561.tgz","fileCount":7,"integrity":"sha512-bSI96HHA74q4dlClAmu8eclwWiE2uquJ1tcQSdeOGoGZoIX5guc7M1tB/3rAyUAt4/UbOiQYT6e7051RYKL5nA==","signatures":[{"sig":"MEYCIQD20OU4hZe68SrAICNdgHnJozWWFTwLwuGeKn5RVP8xfQIhAIalk5qBjiPQHOeJgiY9MGPV8nbANVMVGbt9IILssxPB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJzuvCRA9TVsSAnZWagAAZxcP/iEBf0MDgARrFm8Id0of\nmK2CW5vUZPOjjXBgN8arWu7D8xuafJL+f3SpYmNZJketXubfVXcgyzlT5vKL\nNHcSPbdt09lDg9PA+z+Tq353KqwJYBUxihF80EO9aM6mQZAe8vAh5Zd911LE\nfqRVUwA8yAJwp8Clb5IHV0IU3iv7ufSJycRlwoA0w7ATwSR5lPB4PT109PRA\ncIQG3D3eDGnT4Ui1o6Q09B4kVhqu58VRSNZ81TAb676Vv5ONONtqTIKdVKhR\nP9hEqbIGtxxlOk3+3MOah2Au1UFFnO8QL2anTEO7Q/dFglC/QsOZjLgTXV3v\ng4Tg/vjjB+ZEwI1yXuWe3bOA9i+QjH4p2TMqFyRwd3TnoqACzlhac2E+kPBX\n6UlF82hp+TM7Wi0IyCR/dsxSaXF5PD1rUeNxq2kKF+jBgTSuwbzjE3EHM7Ii\n9cki4a3cOpWDzKK4+gyJqFNAzotvj3zLE1Yp5zIxuFN85Uz65rkAJJhlq1Rf\nnsiw46/krTMGiOBUN0RbamdtcfnxwoxLD1wN7KU+hYvXYAyqc+gGHBGkn3rg\n2kSzSY9Eua9eg8sdI101B6HMRY7Al+nR/5/Ls73uN6fgxdC7g1q2v80KflbV\n8789QW7tiWR3vk3DXjNp4e8/OTU0sg57eNPZTrJGIiLuXjUUv1stchWy6kSm\nXIGA\r\n=JlW+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.5.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.8","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-013b024-1596406652561_1596406702599_0.6366801982061896","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d123c5b-1596492928367":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d123c5b-1596492928367","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d123c5b-1596492928367","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f0906741d96d9114a876e8aa634978b0edaec76a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d123c5b-1596492928367.tgz","fileCount":7,"integrity":"sha512-tTOtADDIZvTeWfgsMbwHbXFonPoJd8arAjpTsJbUwwWAxygVkNjnxmYkplICDv1NpWwpJtH7WPdfqjNF/EkVEA==","signatures":[{"sig":"MEQCIHr7phfMN5WhGVIiEQl6SbRm0XBpsvQY5d2qxZuPyTTjAiBMGnCtDmw8RmR7ey4dBZi+FhJp670DgZoIQhK2XhiI4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKIytCRA9TVsSAnZWagAAMjQP+QCIV8NQHYeX79vT2hRm\njvAQpN57qcLe3PfoSgrF44kMYIN+xPRk3QXSwSTdd0d4PnOClKTXWfrfJJ/h\nZb+NyTeHTwJ5jmN+ui1oWmrrMWrf63huVv5WzsrSWStAVmKyBcSVVNroAY89\nk1TCO3XWbxKK1UUSgHPP62NIq04SQNTRfTFAtu8+xGslUKrn1gHvZZGNfhfM\n7NrXmuPuznuPxl62vwTP87gjiTGXE0JuE2MzJE35sjPDPrgI6YLpFeKmGMe8\nZa882QO5YZJGBVAH051Vo6hrd0PZIpjtexn/2e2p+qQZrnyCaJZbFClesy0F\nwxfiyAgheg0G0yNdlRge8/3nmKufF8KxS3UZ0cC78i4VhHkRnB4NJz4t8vGt\nkdqhlV3M75u8R/89Uh4ln1e7LkajS89I8QjrcwDlDxf3t42BIgkrpj4iFyAa\n3jeo/vAsnuZQnakncwUpCi4pAyT4jzSzNV0c3YSBxIXEo6Ou6bKjh6wSI6R0\nE3+hqpujl0V80DKB85bitAzYbB7CBuPl66NrM/BlpeWYJ89alIjSPweeZdcV\nvwpC6ooXHWef815SDwPb7a7EcbdUPyQQ5hTR7utu1N7Q6aCWxNjfeCFmoVCr\n+4gay8IhhJoq+f1jJzMROk8B5ZvwYEnJ4JL27mOjPABOWFDxEDd8Tw+H8bX/\n6NY8\r\n=uCHP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.8","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d123c5b-1596492928367_1596492972570_0.17248033313568611","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-9aa48e6-1596561585819":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-9aa48e6-1596561585819","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-9aa48e6-1596561585819","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d6df3f53d0436d33b57b1b19bc51ab5602cd1b16","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-9aa48e6-1596561585819.tgz","fileCount":7,"integrity":"sha512-xwmnbnzBSeznZzw5M39gbTZzEPp58UCgUQh0gbGmrAYmz2f/hZcfdOzx9ZY4QY0dC0FUJNGEWdDVq9mIqybDyg==","signatures":[{"sig":"MEQCIFCG/OAL8Y7ux1WY2zP9DGejiPwJbsaGBeT2/IZ2/67hAiAj21LpZtmbV6YwNtmjjHq4VluhRY2MWuIpikBZ9lN7Lg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKZjgCRA9TVsSAnZWagAAHbkQAITJ/l54MtCE0fXseEZ3\n/kcjEfdcozVRiWEod/K003E9pZDRZaqSL+qtee1utrmnmtIMAdD8peJz+mdW\n8lobE95hx7v24K/uy4MCMJic8+7Tw9d867K1R9679QwmMHsTie2TMsmtE8an\n/HZHHKyHaz/q0zL92LLFJKBemSv5McGV6L4Lc7K3usbnOwGexIK2Dc+06gxU\nPMWn7Qf+GMSYmjiW+BHrdkyzi8HpNtjtio0wKOXe522Iw+pVfZWwxHVFeTGT\njX5G9tTjiUuRjcFfyfHLpboZSSEQzpCudo15u5HhFQVGdZbwmd6Hb9cAscSi\n6oWTd35uNGac4baRBhPVKRhCT1juyilli8luM3pxrfT/shBQhqNH6Vt1boaW\nakr6ZUCU0ELyuLN1wJj5IsuWH/8vQjCYMaayAxF/zC0JykweGJfa1CjjFNOT\nMUohSmjUyCDYitavlXZdFg4nwlRhReZOH7dgG6nzNY2JoSurCuPbH5dsQFIb\nU7csRhjrxKeIpXwS3dhhCr8hQZfOEZdrE2Xl9XX1vJr866v2++7TB7wnCRWx\nl0t359IKz2PoRvSjrXd8Vf4mmY94P7njnBEAjMo2oF/G8PqCjZYl9w6/XWrI\ngskAqs19hG/grfEZeLv7YAVpzWYkfFieJ8amyZoN9G5X0rAd/G9qoJwJ6ubH\n8xix\r\n=4CNi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.8","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-9aa48e6-1596561585819_1596561631876_0.6425918948707716","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-9aa48e6-1596561585173":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-9aa48e6-1596561585173","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-9aa48e6-1596561585173","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"df3bea304ef3ab058aee5e03bb3b9f6dc3ff7313","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-9aa48e6-1596561585173.tgz","fileCount":7,"integrity":"sha512-tsn5wVbgZbpQI/kyG3QauIrGXfILSAMj055EnwbHK3BL1oTepj82GbYrF8T1KFplFmg44paL/6QmpjKGfGO3KA==","signatures":[{"sig":"MEYCIQC8gKXDcWpI7uEKBKA9S/vUesOpiQZSeMNM/RkUtrnr9QIhAOc+6D44aTHiNDQBkPhdZu5SjO44J+GahqtmbppyWxqT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKZjnCRA9TVsSAnZWagAAyVYP/0uTjrLTKh+3swP0K8kL\nCFKJv5A0pMOrp9JuO7EaM78lZ5Ue4UIZjIKHgJij0hAJ1ahNJMQns0n8j5i4\n8PHSjQPpGpfZ+N3wddPthMLlVR2AIp4GHfC2U5NHSJtQhxMKJ/BdWXA1rUCk\nDFXXSnKEP2Ax6svVw1aYgfeXgsLcw02Fw3jBZCZZ9CRsSf4cpPwVerXnJJ3Q\n3/+NYny/g4NcXfnAOqlBhv0hwlilNQT8JexEELIZDfLdOye8HMxv1Fu4pGeF\ncvs07mhJw0FxrJilvfXpLSDio8s/HKO7T78rH3TCjw4xTeQwKw725euoHLWo\n9vLOtSghaeu0Jvw/stm5ToLjJIrYLtPD2jcG2ROgXu2y5igcLzDiZhUknLip\nF8N4dFw8JdSrFGEk44XOTvi52O6nZFrV+3HukRNM3SP3jTakIlG7zvX6vDGv\nfurmlnFqXQtSgI1lFkPdC3LjdFMyXXmo3YeLDqmBAtD4wl50y4NJWbU55NPo\nm35Ug4OHq3oypQk9TXJTR97yK1JCdiq2qqmKXpkBAWjcGhow5pDKQ9W7bGZ9\nwfxLQ5BIOqM9dzhlWKdjxUE5yv5PtnbbvtIM500Wk39Hmo5HVey3e8MLevrl\noVNvDFc6CthgfrR4CUe9OTrL+TQbygXHgZ1o1gPJQmpqZuV3jq874IcEnrIO\nZwbZ\r\n=S8Wo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.8","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-9aa48e6-1596561585173_1596561639337_0.8191885961909022","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b8c1436-1596665708970":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b8c1436-1596665708970","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b8c1436-1596665708970","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"95af3a984eae2f24b8c59ac80287e0a1e9ad72ab","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b8c1436-1596665708970.tgz","fileCount":7,"integrity":"sha512-SsR5ZGRyF2cE8Z8boZR2FJAHjy5yVxQBrUn4Op7w8Ku4Zs19GxTB+y9k3Hgri1Pavu19zhNDZp6BkWU7z5iBYA==","signatures":[{"sig":"MEUCIQDCm5Wxzk9Q9kIrsyfXrtRZ+XFYghq9DuT1aPrBqUxw8wIgRlSo48fXX9NOrHNtECUQZRokSdI5boDdudTvOJZcx14=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKy+aCRA9TVsSAnZWagAA8M4P/24ntE4Za2MyL8RmgsJW\ndATYodUcjUFjZLs5ybxVxfnvWz7JjvwGKDNjj1XXYg0e/dMfhhgSVVMtlTxh\n9x+/e5U50Hyfyi+eZwkE4X5v41Yy9Wl2lv4tYjD8ao6e2itcaNpPapLxnTau\nydtwR5sGbGgUlT1AFYttnH9PI5OnDkFSx+4RVFxWIHz9PmICbCrAw+vPDmg1\nkcahpsdNWAT5ggutkMiBCCM3IBwRTgmiCWsxzoyVmtvI+5oVbk2fQiDovJ2U\nzr2bx2Il736WPJN6PMUglI6Wi5ce8YZ06G+1WWNrGwHQm2R60lSEm+LiQxwH\nLb123/nkKqargbu6j7dCGkVsB/UrHlaJ9hYI5M6wrJqY24aqAol7Lgq8R4Hl\n2tOyAhlYUAby6Ej8qbVDuOpZEGaVU1pwz2ZrBvUGHwtGLCjUGyxHTgaQi6ax\nGQtWgD0aQNhQiFNsbp46qc3yS/nWKLjpQK+AgvJp2TJgxndiiIFZeEoPUBWp\nL8nSqC4uR865MVRI/N3InngNpGmG2GJgpYWlYO2DlsqH4ZG1osiDQTkvMjRl\nExZ59QeDEq3CpDy8tLCyOJzOHNGW9GiZKPf5qv7NWn9fyVUJgUuisPpLsIaI\nFFpg+QgrIy2DcKsD5558txkufoSS85TPiRh+Ugq5riAygYaFmmElFC7thBtj\nzbru\r\n=NQ0q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.8","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b8c1436-1596665708970_1596665753958_0.022252975524115204","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1dd6b58-1596674114085":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1dd6b58-1596674114085","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1dd6b58-1596674114085","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"791f0b2ad4494345904e719aa3df7143b0e7ad30","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1dd6b58-1596674114085.tgz","fileCount":7,"integrity":"sha512-PnT5svWrsqGzb9/x9GLIv31CQy9sr+KeGVsHjtL845LIA+Mq+hhUyGP2oTLtQ2zjxlkP2jZPk+ZCdiw5CESoEQ==","signatures":[{"sig":"MEUCIQDlP7An9qK/GLe2/CWDZENOlyt3Fg40kekPxlRx1hyGDgIgOrd639bbnhTBagfhQeB3NsMkxmC/yTumgWdU7Dt2sag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfK1B4CRA9TVsSAnZWagAA82UP/jrFjYcXxUqFZyBxYv5g\nJYzZQkRIXeMtDU/GFP5HfoyswrkQwgxza2k/EOpetE3nJjnVvNxjhPvRBTeb\nWbNo4+AJ98loOY2HrePgRJLd7XVMONE8nZwNVev28kZ/bhZ39UHTUIgKYgno\n5vO1qQZhBYdNBQ+W580lLtQWXTreo7KpNZ64wbgHyOe8yI+rsm335AWF3mpA\nJxVAtSVh7FgjixuO+9Y/6iA+Jv6i5zX9kscWuBjYd08sxyrRapaFCNRyD3PN\nxMgjGU6wOnkAOA8CofsJMnVxi5hA5GxJoshuld5FFPaFzQbOhCfSufS0pD1I\niSPKsdW26SADpDzxAtzFdDnoByUaFkH9tW0Et2tnlgODa2gr19GSbQLb6VdD\n61w7P1mkFTQwxLy0+W3dPWIcID/WIxECRcIuhZfAfa/AJSckf5Ld/AJm9DRL\nV4eP4LEqSiy7UOYs1v8dhduZpTE7gEAGS/K2Mqz4oKUWijM01brYvfcrZ/hR\nGX7QcfD5jAKoQAtOXzj2CP8EvU8wVEAdh12n0jbbUYfEeVfAzbVEJE1Yk49t\nK+o2VTy5xvN/sucxysrRBAipF/uzpKPAhlgxC8N8x8LeChIWWBz1zGybxmU+\nvYeqAqgCGmGrF6bs+VcRXfrijriqm7IkJAruRhWIUOa996SrGMgjOq7zAf/u\noYnw\r\n=jUPY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1dd6b58-1596674114085_1596674167868_0.5583709981201563","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1dd6b58-1596674112399":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1dd6b58-1596674112399","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1dd6b58-1596674112399","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"205097b272744f9a285014b721be3583e5741186","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1dd6b58-1596674112399.tgz","fileCount":7,"integrity":"sha512-FjJ97nyPrLpJtaAACpxVaVysiH3wBFgW/79qW8F01onG4aQ2FqFIo0NzTArBG9IVWviErCSepiBhGIOt6RGtxg==","signatures":[{"sig":"MEQCIEcsgaWpYK2i9hjG654pf8ghiARW2mN1TgGioXt/ez4RAiA06gma+LJWmYzjihzptqxBDGLo4jDR51wzQYfsiKGCFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfK1CJCRA9TVsSAnZWagAAoLMP/1mmrVSaRSAqbTl9eCMJ\nlWn/JGAK70YCALZJ3+CEFcrz2uCA5dV/ueFsCsIaXFqj6S72QtGn+GZnJ3ce\nbCUkwhPK7S4m6NMVvLmZ2VSLgrz4R81yr2ont3NR1OA/ZYsICyY5JAIojGQF\nGZHa7Ky0AI6gb8ZKiv2OwIu5ZcAWExb6+8bdM341GQ07D0uQ1IUlX6SnDGYg\nHTffohHMycYq3gJYEjc2I8AIWMqydlLZWh2VJQxOc3WiQAFp8bl0XZe77lV5\nMcpcpyeq3jwZLXCWtaPsA831wFA0eAIAEIqkvDs29SAIS7jhvKDqTQW5/aQ9\nTGenXyRDMIHaS2Wx/G2m16QyrvQmz5/YTNnLK8Uv/ufmnzcZN3b7zpNItyKq\neTP170TVRWEgG0sDZ+MlN6RBpSZwCDfef7IKTLATt6rpPQou5EnxZgXsfJsL\ntIbs74OB+vhA5Ziljgee95c8T8vkkfTTEk4ibbbBHTo0LNZm+vRKXjpagbFo\nwcuxg8DsiqXZniV9o/zgjnbtQPr0ydNSm37exIUrzKMTVVIZfG7jpOJLKerp\n1NjP3oauob5v5zXEAYHeb4TBNGZilWRgy3XB8NgU3xlBvYa2ZssNOOhz3Z1X\nmDZHKLtTtzJnPPZA8IQ5GB+O8IXgiPkzRXsmEs9CB1pirhc4pxAERF1hdfTF\nZjvd\r\n=CIeo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1dd6b58-1596674112399_1596674184372_0.7573998627199359","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-93a0e35-1596752056694":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-93a0e35-1596752056694","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-93a0e35-1596752056694","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"437de2eb611f9fb46abca5ee466bcbaacd23da63","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-93a0e35-1596752056694.tgz","fileCount":7,"integrity":"sha512-EsGUKuWGch+UBrWKPmDZdvgidc3acK4UJmh4kO8jrlVJHcgOFG4REVR4qICl2zXur7XKn0JYfIpfhuafMKQ60Q==","signatures":[{"sig":"MEUCIQDCZmSh9hYjQ0cOVCsrDtvTN2/Srn7p4mNZWTyIQ5k3GgIgO1j099/zKWe49avfecFZLUHe78IWxywrcBlgZKIMkN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLIDrCRA9TVsSAnZWagAAspcP/RahfuQ3zLvW0XrwqB9g\ngn8Kr4sxRw7wAq3+hgA4mNumEaD2CxYXmt/t0o0z1FJoT/yBhNIO1uX9vbzk\nUw+TM0FkCOgGvvwmv9Xr1gZRzmNnok3XOXuRRU10a+t2x8VsuLGS/Bxk4Jpw\nMzVomiZBKNDIu99QJouZFg0+MDIkBOt2l1RoesD+dWkCFvfjgsFsJS/C0sIP\nugYbR0aKLI+ymoKM4n/BBQmM6JSDNBKkmQmifgpe1DtRcZEL7cNcO5K+NI6/\nZXJDPZcROVWVIVXAkGwygRi6UxSbEtQ5esfdaeynjACgv6dDyILI7sIK84z/\nzGg71JFjSawNQBn6VrvyiywKNeeyCAAPgVvO+rvQqvqpv5SKMSWa9M1V117g\nussRgh/5sF8IkzfR22RoJDHiMp3VkErhIJbPUkD9+mrsT7WQIOOfzUjZ7TfN\n5PStxBngHwq1wwX7k6iZdEDe/O4jx05CtLX+2IosaiJnawM5Q6oyTI57at3E\nO/cNBuCjTiQ+TdVSz0qxWOsS3Ii3fpeusR03EdYomfjMWX6Ty1sYOw99bX8L\nZCZpSGa8Nq2q+AlT7IEiW+ylcX5zWgUyf/sGYHGD7gksUcq0XUojpPQMgq+Q\nYaM6W4xR7JWItdijmwQddqPbpAld1ENkevoKBEzmTU69gPOVtcnNpTSbyrGd\npuo/\r\n=HNsX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-93a0e35-1596752056694_1596752106741_0.8522662196298134","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b784ec4-1596756885858":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b784ec4-1596756885858","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b784ec4-1596756885858","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9d74ce0c59748409748772e81c59148112573f59","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b784ec4-1596756885858.tgz","fileCount":7,"integrity":"sha512-uRyjpPioVCu1DpKsPpQ7jLQqpuuXECopLBhUJw2Y/ThzM1Bmbk9Z2dZFcT5JwM3lQ6CmYtan7x/rMS1KjtyOkA==","signatures":[{"sig":"MEYCIQDS/qFLiae4Vvm+PP6rDSEHeuxDUL5cT0wal2/98NgdcgIhALfvl0U4BoKkiY4wzPlju5U2MsUxnyvIBGh8mLQ//whE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLJPACRA9TVsSAnZWagAAkOgP/0gEuWhqr591NncxsmnG\nUgsncEy0frjgO4GnMVRNw/bqIT/9ICdHl8Pk5e5WnkOjSwQGqlR4xLcJMe5a\nq9aLTEwbehvl9u0kxnU+sWOu609hAd9M6QgEUvuk6LRCRmKFVg+E6+LsiVfd\nhWbWng+dBuAS0x0QFTZGg2bagZGnRvqu7AphrBX3Egm+y3i3CcH++8w9vYBH\nosYVb5MTFGQ1T/XELxwsTxmKyHV+oqrwBHDU2lSFxkzKSfZJoT6K3YlckBQM\nsJpwkk7XmENDHghGnLLiKfcP4FBLcxl9VvJLLW7NTmusi/LDKC02KJrlGKIV\nbPeAy8NKFT87qbUtsj47CIbGF9kso/SC3umbFm8muBxiqwp+zS4l/D2qAD5a\nmmXC3w+J4AqH6zmz/Mm+wiNgkn6NN1dOUaBHVFpdAo/uYScZJX/+fpShs7VQ\nfVNwBpp/uHXzU/CKfEGxVfdzTbI/1Hmsu+h8Woa96r7Z/GqSxUO7WD/8I0gD\nXeOyWwkfibE6gZF/rrcoH+Zm8f11BiccjVNcUudBU3+BWOwNTwCoPVVr0uTD\nRkrU6fzML+F6ew8kxqHycOb01rI+nEWbFSAnxsUC6+05TThe/+0s/sjLtRua\nOrzyEoVc84d3QNUM9y4XkU0Hkmis7g76Q3JXrEo9eZ3KWXuiJ4a6dB4gpcIU\nUFNu\r\n=MPba\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b784ec4-1596756885858_1596756928309_0.3130554422242613","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b784ec4-1596756891650":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b784ec4-1596756891650","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b784ec4-1596756891650","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c493a07c56ce6586bcf78614d5f3b65bda0f35be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b784ec4-1596756891650.tgz","fileCount":7,"integrity":"sha512-PofAOeC1/Kh/Kvsgc9GxeNMyCJygA3Z+xqWbl5yLJrAmrr2QDtwMBMBEoWIUUUFR+lJXtGEBuUKgp1dtnu9NQA==","signatures":[{"sig":"MEYCIQCRsOfrpI82yCIQU5fzWpMPTH7CBiMZnKStxkkkoBhOQwIhAIinGP79D8/1S0N+VZ3rq+UoC5om7rUgAls2ALGRwOOD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLJPMCRA9TVsSAnZWagAASSEP/3dZn5eAervuQ0z+Fjd/\n2gdkH+uJj6xYJDPCVLHVx0azCZR5PP5ncY9w8JyG/sq9/TlGMW8dODQ4wgR9\nY7Z83mNHlWfSlCjv1cYeZGj61RGgCMYF0PB79OjJbzIaqrplLGItYlsh+mQy\nym/3IKbuNEqC3AuBvCgk3wNbWIt0TS9rzFcULJNKJlS0wTBDyKwbc44Sv/6E\nLaCWJTZ5fO/gErpfh042QPOPoPtMQlLe0EzNeBI+hlckMoOPBDIJFLRK2tb/\nnjMaE1tDpVf6UtchSsv1tDkraCR3leg+S8Bda45jqdm4Y2jAOgL/p3NwhnQP\nqmDvDhLJ5qjM978Fr3eXfOL3YJAo0ABcdKI8BHU6uJ5PfOZ+v77+fYl30mms\nH/3ihlqIDyNEiNwpPSP90Y2RPNLfMY6KalCxwHZ4ybzcM0aJDBbKIVFrNAus\n6m44zADZ5cbrEuNjqeAyCg0/FJR/3GmwJc5lZgdSbMGpMgIVESkTlzkmXOEF\ncavqoo0hSVA/MI+OdU5XKtoY/RUO8mqK7MQBzU5CwnZrT/pHk03IvNQGw+6e\nV6/MPdaX8becCo8iGCz9+2NaGF8TL8UpbIud2yUQFyKC8X1pY0H3wR80cy3q\ndhlMchmOXIpmJe4x4PiG4+t9Zsp1A7fJFsd+ReOs4NdbLlt3e2XhEqHdanzm\nJYL3\r\n=4bfl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.1","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b784ec4-1596756891650_1596756939504_0.6803366235623023","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d3cc6be-1596828307719":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d3cc6be-1596828307719","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d3cc6be-1596828307719","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0aa58a6a17b8bfd59319402573e3e35da616c148","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d3cc6be-1596828307719.tgz","fileCount":7,"integrity":"sha512-XgBkjt17gcSd54EtDZ0TBWZV83c3aAqThSQrSxEf+PwSMFsk5VoSDuDzCs8egly9mgnTvfWuYZb6JjQNeQLo0g==","signatures":[{"sig":"MEUCIQCOJ5mBJKfHowCOim02XVw6lp3Ub6AQ8jhx6F5IQjpZ0AIgFm8vu4tDJraO3vui1PCSBHsBjAzKjr7s4u7MsB2fgFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLarCCRA9TVsSAnZWagAA7O4P/28kHJe2dhH+2cMQsRiE\nr0w/3TS5WYMA5462Xq+TzDuwhieZBwDLjvTJQFPdwlxJdQf9wo5zEVsTZuZP\n/TdGw0EieHHCmjAB27y8sr1Ivk79senac+dESm+41P9/MWBCTOW8IaTgkT8V\nTrCEzbfM8HHREZw9Au4qDCvLbdcyaI4eD2sIhhnGkr7vT/v3tQkMMYVahKoJ\n5QVDKw6fK7PK/UwmqVHlEx5ZOppI2URscLFj8b2i/QD2iAu+7G/iChku5BTf\nD49MnQowJZe3MSm7nIB1s0sWZkRmjgVcP7ZorxdcTlLcTO/d0opXTVeB17VB\nPDW83QiIczS1uv2eCXeZiwxhL4GSWFlSC5USMuwhJvy8HekUIWt2M7TZOOu+\nPfr62JQTJ/xM0gqYzmw3bSF9inuuy9gURqPdUwIXjPptiHlByN0pK766eYA7\nt3KIAlN4d3O8J3e625DpFqlp0IWzIh9jFYx+/LsoHHNhMg4khmU+0qjafDXb\nGQN5CravsxtODI+58EG8ynhnFty+i/bZC3le/VkTqESmdB+P5C3TllcLQOeT\nmmbwTpTaJWqgTaSv+XQuHXS9NZLgXrMYUUcTYkRh/bTK22Va6vG2+EbcY8cy\nsF5tHgU1+gs+Tw88cr9l/OyhvStnOfpqK6LNUxKlho6EUmGTn+SIli+PNgnH\novkE\r\n=lozY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d3cc6be-1596828307719_1596828354455_0.029957015527998898","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d3cc6be-1596828310662":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d3cc6be-1596828310662","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d3cc6be-1596828310662","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8a7d35c8ba002267c00e0968d8ce316fb4186ddf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d3cc6be-1596828310662.tgz","fileCount":7,"integrity":"sha512-qViCrYoSTaLq9sCRTDxJEMGh2uyweVs6OvyFODP7kx63MU8k6DPM/fO0NPF2Dt2k9jCL/yBqOSnbO4km6Xr6Qw==","signatures":[{"sig":"MEUCIGpyEWofYIhEXvXnhCeDM3BjdTgug6+TJvCnNAqUaCvtAiEA0x3Qi1HsePNfxqRSSEgKN7NwxAdIV0R0iI9m9jn/Iu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLarUCRA9TVsSAnZWagAAfSkP/RBsxJXlxiLewIe8zVTm\nuo+yo/zmjq75QeclRJGIyZ9kS2d8UEXoPB2Rnuh4v5wwMw7SnXWzmuM8bTf/\nkSwEZM/NHVZKPtWNQgcjRrhcW1FKGkgdkhzEpdPwLGd47iJu8T2jTfafamVJ\nyn2ZgD0edZWpDNsztSy1Dhfu2Q9/81mZo6PxnBryGblp8AdG19+edwHfa1D9\nNpLVQipXBkd6Jrw9gnVis90Uopt/IGpobdJSPyWGNpRZY8nOid2YNMDC/XxI\ncR1QV4CBLm7sfq6UlMx0BBm62ElHNjnwAQIJNKz4JOo36M8OBZr2NTbYYlQD\nLCm485KY6DyNN3MU+h4f4sscVWK3eib8J+nMH2j6xwiJR3idfWav0tTFtYoM\nMcsflo2B/qfoY8rWgGMs3R9nAVJE4PqD9UxEEoXYYOOtDILKpfmBiCRiOber\nnuSfufNbN3TTKrolJih09RG+glI96dIzacaNA3jTlRx6lhXlQ+/t+Nbz5K78\ntVBDXSUYNuBZV2Yj1jtuwKFNdO/ffbLsUZ3WRFvndVRoV+6QYCyyBXvalyCi\nIGCimxVNUsT3QKpn+gfeGJfizRkN1IC/JykG9i1fY8FWzlIF7cdx9/1SG3nM\nhicQsSbH8Z2KrchBNqmZLrcIh9GLcYXYWmIR/e2sBvbZZh0sVYEl3E+OJtpW\nSJpz\r\n=aQrW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.0","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d3cc6be-1596828310662_1596828372508_0.45969113784988713","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-2be6722-1596831524324":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-2be6722-1596831524324","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-2be6722-1596831524324","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4735d0c7936a6414629300ecc0bc01339fd998f7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-2be6722-1596831524324.tgz","fileCount":7,"integrity":"sha512-Doslb6n5Hgfvqfb3mze2l4MeXTWcbN9EnRJrouQW7s77C6FvD/0mDmZes5A0jX6ABX7VMHjzmXJosXwas7MykA==","signatures":[{"sig":"MEUCIBHbcFvHF1QiB2NqG6TFqpIpe8D6dPy2KHAqaxixoM/2AiEA0LWBN8ydxdctDkWoTmSXrw1PftSxPY9LZ3VplcMMoys=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLbdbCRA9TVsSAnZWagAAh7YP/1hNAnpP4cOSmSzUhXyG\nvHYzryz1tDsUdNol4MA6iVERrXkdv5US3WarRGSrToanqieDZ7zSgbnVHD5Y\ne6U8IJUeepkoWHBmlvbe8sdkeKE1dNlSunaF6+w3rcbN39CwV3V/t6BnW/Aj\nldchIxOplXp7yVIHEJCcw8B2UYUzpdNQuRgcSY7cxVvYJTEov11+jWpKNmUe\n4TBnMnNu0q+6SPsyDWL83GhzqRzTEKMpuu1Nfi6mzSW9zO9tG5+E3eyV9np5\neooJ+fXn5MCCqZ7dYdzCbXfl1etrNNtQhH9l6Q5nc9qYlraMH5fZni0+MlTy\nEzPBJM3trEXeqOl35IGUG+RUnL7AamwWMkij1uNnuM9cok5Yo0LGk0bYB58Y\nyAx+703icDqP8ML5vKJ/OCz2VOSa/3kvo8CmX4qeUU0lJXLn+OeH21vUzl/E\nbyO9FefKXcmSFS1pWB6dmK+2yvnLqQepS//p9NvnDF5oybdoYypSk/Y7ZgDl\nTPUJb4jTMIYOmF/BDTF9ySIv44TRMJhpMzf4ZVuOTGNX0CzPhKOpnrZyXJJw\nCDDHcU6T2WY111E6dsCkqsrI3AD8omBDIJqzHh+JbgIfKagd31GBdKCGbmC9\nSmydLud9C7YK7J9TndzWO3+TqqGaj8M1fKQiu3uIF8Cp7HwbFEnY336Nh40N\ndMln\r\n=df37\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-2be6722-1596831524324_1596831578690_0.43256825208538485","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-2be6722-1596831524356":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-2be6722-1596831524356","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-2be6722-1596831524356","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"adc95fdc308283da24c971a1f51a89518dcd5905","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-2be6722-1596831524356.tgz","fileCount":7,"integrity":"sha512-Qw62tnxD6n1m06+haY77l4KxGUOe5fsTh/D71ZADw6PKRIXZILzWvx9aOc8s4/CV9wIYk75r3af70Tmk4a27EA==","signatures":[{"sig":"MEUCIB+kRZWIsOwG5kz5CgWRDK3DLsgYacuiiq8KFFlvERKXAiEA/CedyuxCJMlnajQPOTSAsim4gk0GFYXNDyQKQ2GEApY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLbdqCRA9TVsSAnZWagAAkE0P/3XZcDASdxWQQs67GbcW\nuK+ZPSnfOzT1Em+s7Al0uBTPaHBHU1w4c/4iQdpBDKDLffRkgxLUIohaPtuA\nAh83h0/cHaDZoVO7K9CoZ0hcR4Clgpy4Db2l/kz2rCcRgsdcgpLSPonAH/qq\nK8Sq/T5V5khLxhkuhDtcMuSL5f3jgjbqxAT+Mt6QxwWrIVMEBmDcFox97TEd\nRRMRzTM11lyqpwtjxL/ywJYw9xAEpXAiV19c900FnyyTzAMnO+vOfL+ETaxi\nFOHskjD6K/Qc2Jl22SFNxqBNmrS5fx+Z1oEfCmHicFnkS0Q+bnRXZXcnNrGF\nule3bLDMLlFLBUldgD28IlOEPHmnE76Z4Otf7w6mceMdMRo0o+cjlIfB9IcM\nF1P2zYGROyUyHCOSUhyWaSlOs8y/yHsDuiOH56W6ddnbxormifWpFy0OmCGo\nRWFkKCT5yH/66qoNyzY6ysACNuHl7sqBUIb/CxAwECxQFtdx5oEy+dNmPGdX\nDZqOMtggyytNny1Dp5KnIoT/RzvGe+zu5h1uLGo9SB6/RSH/GE2mgodllF13\nX6T3m3vVasThlFL0CPE8rHef+iYsN/3yL7HrzzW4R17ZDcuJZ4+t0e27+iRm\nPgDk0wJGL/EqBmzQ0qT1PZvcW5cOZdZEvgteqxybEDGG8IMnCBg7KClGh92N\nGVuG\r\n=hJnk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-2be6722-1596831524356_1596831594227_0.43567664377529125","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a341533-1596934262852":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a341533-1596934262852","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a341533-1596934262852","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"696c98154af7af5d9b21e9b399c2b6ed770dce0c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a341533-1596934262852.tgz","fileCount":7,"integrity":"sha512-FIx11qYIfRAdRUHiGSggZsm+IZhwOvf2sjI07bqfv/9Gf597aQKcg7cncGGY5na2F3xY0SfTN3I75Cp6M+iVSg==","signatures":[{"sig":"MEQCIFA2j5jGWkfj6r6UvjMrzHLE94yy+7Qmpi/GaUQqNe1bAiAUmlOjx47+cxHizOdGDdi7VyFp2EDzTS7hYQqIASM05g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfL0i4CRA9TVsSAnZWagAAGpgQAJcdkeQTSx2/N4YzLP8I\nW5pydd7Y5r6bYdy5oxJbaoADSSJDjUc55LAnhFTLSFBns0+VmZkboveTbQgV\nOMYImKAluYcy1xhsXqyCNT/X5b8XdxAyU2P5XtOGUXZ5U9FbUJ1jdjnkY7fu\n0OQoo+9enxJAVdEQfvSdOiIS/CCNIg2OF/65CMqi1dugrDV6BHJkyeCyLyad\nt/DsntlEPws5I2aw9FIzVE8hsxHMkJ0elMbNYSEyIjiYAvhrR7pjj2QkzXTQ\nzLhJccweqo2OTu83HP15upHzF2SrvRF22mqHd5lUTazKfhIvZZCF77gUg0XX\nsx1LCjEz5cTg4BGZMeIakTcTj5W8GJ8O42UvRquzUaWHDuEFVQ6EY9kMsRHv\nS0iPOR6XrICdREQVP/W0aCaRzIF7hmsa9wtX4goOPLu4afdB0SVHxkZ5LBVx\nmB9n8/NiBCOdifOHgB/RBheX0ByECL6QjHypycir+IY/h9APll5Tz8Pv7vtR\nFxHXLe3KIzfQDvjO6c87R8sSULqyQCcaS0Y5HM01ilfFfxr+cYeaenCCrgbG\n4IV3QwSTCcAGIbXKZnlm/RyRbmBtmK592pYQB+LL72ZTVawgMdTdihc17Igr\nYdcZx1gxvVMx3VIBzv3t677nQ0jBmwNkNOCMYTuJ/Dhzymo/jBPi2ZaQbdhH\nnGPW\r\n=a2sY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a341533-1596934262852_1596934328300_0.062591445733708","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a341533-1596934265181":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a341533-1596934265181","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a341533-1596934265181","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9ecb864325d4364cec3d8748a1a22730396a5f8d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a341533-1596934265181.tgz","fileCount":7,"integrity":"sha512-20TxR7w++6slf0Ak2qoXaRszyUeBJIf96zfkSpULq4aKvseom3fTmYP43D9mleNNvaOUT3+DIBR8bDQfXlTgMw==","signatures":[{"sig":"MEQCIFYccb0DsOQAKEH4UzmTH3AVBIdB77r2otL4tjTNeBPYAiAbhTl73IHjFdbki7C5saL8k/D1MvMDY2QQeJVkoXpyng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfL0i8CRA9TVsSAnZWagAAxyAP/A0BGyPKAwdk24EotXoP\nRhyGcD6x3wTqx9Qj1XxngDiC1FEzjovlEa9lO28sPiSZ8uaouAgGpERP84r7\nB5I3sGT2MawwVslOW1ExYtwsJrsvOp53VMv6xFpJv+XJhWB3jPUrav4N1pVV\nmupMOJg8DL3wV7Tl99AMwfT5JIrgnwRfLRM2xORjtFVN2QiFrSuQhT+bXX6x\nC/MnvemigXD0fiM0uLWjP035lEiumCWdqDWcWbK3TCmsHfZtuM3babj40HAg\nUwpRxh1MNl9mCdM8+mh6CmS5aDjUPmDLWI54/CYopiAE3WbPgY83/s99jk7h\ndMw71/IJJRy5Wv0AGyT2F6DjPQHt2ZmBM+5J350KKrOAwKVdMPBdarfkAiFp\n8fAqPKNNlOlmn1sezIUitjy2Ku1Xlm1NAIMKxmn1Tgf18XsMZ6j61JPPlLFP\nWh+z6KAmz4DmIQvRHK07EW1sl4f59jlY0IiZoPmp1SDJy7Y3chl8WEU6KOxr\npYFzFQ9dlyalp2nyTG0RPys/xk/DlR5pMdlSfwZw3INsUUKJ29u0U6MZowRX\nLXq/X0h0kIKk2wS1Esr0Ao7b/iS89WcaGOqzsv3LZOp2Xz/fazPNODw51xK+\nra2sC/PTpUEXKjjMM96G3Mh3+AVtRglu0Y7XZGDvV66VWHxcdtJ5J3xzpLlw\nvozo\r\n=F7Io\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a341533-1596934265181_1596934332193_0.6008589884328699","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b71e0c0-1596978463563":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b71e0c0-1596978463563","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b71e0c0-1596978463563","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"62b82678995a7e1ec7b3fd8811bf052dd3a8d201","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b71e0c0-1596978463563.tgz","fileCount":7,"integrity":"sha512-e4n4LIm6ln5jSa/miABYrUC9s1gS/P3tGs8+/azahqJtUtFEi66jqZM1Q63jTMSQ/AT9QhSJnMpts3ZfSL3Vuw==","signatures":[{"sig":"MEYCIQDFGRFcL2ycvIgmd4mTz711zoAfpHHXIxVd4m6abVPRHgIhAJG5TtQUGNKsdMdMb58fhBsH0UN5xvvuQjZLJUea5W8r","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfL/VXCRA9TVsSAnZWagAAjZUP/RizgXkghI9F6thoyW2P\nNSguo1X58TfIWJ+9On613lRO/Q86vYBZOoQIKA+lx0LCdzmEdVwn2dam+GCW\nCw5ng2P3H2q/2vN4vCf3GocEEtgWjKJgIgU2LGdyVRQNSWQofjet0RFtqcWb\nSUrArPzQzqA2km5selnPU+w4LuZEvr5ahKudoaLHfxNhWoM20Jza8Ce+QTcf\n9LEvJJc6iyYVy9rqgifdoZZcv2/Y9DkSFQ786edsoQVU1iDVhe6mnWXw6AFg\njpxeiHBUGzffQNtGvwudP75EvogZ41cB/sDKXDrR0ewGK/K4Mo16zd2UNpSS\naMWm8ZRcTPKfC6r95BO3wC+sdMI0lct0UHQYV4CF2BTIA41rTz2Lw1hhy4hw\nxTM4kE9ZVu5420wsn27QGkmryxY542TjKaa1LYIBamKDzdBVBLMveHAJGWtX\nXsnJTyT1K027kbeW/Pew9xeoli1eGy0dK8O3DNBST2H8qVYIDacLpbYXeqPa\nfn3B284S5tgt4GW1KcsNQWkZa4xPYTYP5IvY6bjnuIujFUtgltmbskNSLLfM\nJzHKz7JjNgmBV7FnCub9JazGUVhKC8WBJxvpuMYe7igU4Pyy3mSVL2u61Mgc\n4bj9OmfoZ1Yewvak7OcOti6IZ0/WROwz02zijEsGoQQrVGbCrN1WZO5dowew\nJubD\r\n=ggSA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b71e0c0-1596978463563_1596978519316_0.5174044869099095","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b71e0c0-1596978466303":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b71e0c0-1596978466303","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b71e0c0-1596978466303","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"45d68a8fb28a99931137c8d18f70c30f43d7e365","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b71e0c0-1596978466303.tgz","fileCount":7,"integrity":"sha512-HqbJdnjA0lKE4QAOIQhqEgzV+D22vVxLHAwv86glLny7LjA/J4oX4uhDPBKC5rC3phdzOSW1xe/CgqHrqCmGnw==","signatures":[{"sig":"MEUCIQDS+SK3acgLGnF1z8ReFayCj7tcRCubLmWYRC5s2lysBwIgaI4nIw8a697k59rPAfu5/2pXvMnVWISaxqv8jfDSAas=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfL/VgCRA9TVsSAnZWagAAF74QAIwu5sb69YWsqABIou3r\nI9p+xo6KKSB1MTb2USoXuWPrATDwo8qttmoCdIRR74Aa3GaR3yBpRaBcdBfG\nUXBQo9Rjon3f1Vr5SZmYx7Wa0GSgxfO2x9jPR+rBZ8WCU19LxZcTSYQsSAvo\n/x4NPGLipiCS3nHXyWZ2x4/QD2igAl942DzxnMRW6png0WLFqcw6IVczGblG\nLSyWGRdnnfBY05kVwWamnJ6EpGBkTT/vvMuiDYqtNWgojxjToI5A3CeyRwIs\nQ6TnbNUvkHKUtjuMny1rWBKgS+oy+OPLTd/zqdtiF/1K76nlLBDXUNlP7je5\nHFEXacsnWxIAFAo3pCev0lE8G12b0HokHgMYZll2PGR87+WmXbGBfqiWXMPK\n3ovWw/I7PaPTPL2ydPuIPgT+5C9eYO6ueiGGDKY4HKKbkAzvZVsgyIzZZwPp\nmTx1Y/7GbpFmzENmkNFxzAZYKcin1xOzrbmWB4GF7FmZ8oNZW0hvpo6fLdAl\nXNcl7qKJ+ftGNJ06UjCzPsphqw5M03nCnXJxp68xuLkUQOKYs5EJkPlR2Alh\nk+HAQ2sLrBjX71mbK9dg8O3Fw9SsnFjmTjadvuvieTsuyfXybzfTlfNbMNx2\ndWWC8nBaSMvVw6aJDJwaWLTJhjL1mNFIpDw+6nmKVp2O5USdCczE/szRiLuu\nRyNG\r\n=Zp4K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b71e0c0-1596978466303_1596978527715_0.37047737919849544","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-350c199-1597013725192":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-350c199-1597013725192","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-350c199-1597013725192","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ed65f6538d27382dba6969432ac0f15776cf4908","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-350c199-1597013725192.tgz","fileCount":7,"integrity":"sha512-eoMf+PQ5iHFmTLufhu3CAUgDMPr/61BwZqoioQSacSkJ6zOOnsgJMUO/uCfJqNR5afeO+vsUT8kxVmbjlKWr/w==","signatures":[{"sig":"MEUCIA5SqSqgfYxlhOedQ/frEjlABnXOLMpmhjjKDTy8DAPCAiEA7oMr3n4Y8vadOANGd+N7zGL27UCi28K0GMROnA7UB78=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMH8KCRA9TVsSAnZWagAAxRsP/ja+aNB//PtHr6yN+Swq\nrTZSoz9tU9+sT7VZ9biLyz5l1AVr6DSz18PCsspKMDSWdDQ7ouVaZgr94hSA\nBakxHrXsCT/a58ZdI4bvec0opLiSNgKwKiVVtKXzkO6cICZhcIABa5WLXt0M\nWfmxplKsYSA1tbkNb6Wv0F/4/dpEKywvu6+3lk5vyXCnDHvkCxRSHkjoIGXH\n+9C6EPmFXQkXUKERTOiZa2OHraJcgmavg5CtrGG36WDeKxKK3mAjoChX9+ek\nsUaoD3yY4J2RASVeJjFyaQautVUAFUwi5kbcn8vRiqqlj5Vw86PulrtoxlYD\nTDDizOA6IfDusdcfdHSjYnbUmfCpjSa2xjpAQ1K3dsaQyI8YfpUrdsAl7C71\nkRZ0Fn50ByLoDDjDjizw5wGBwqw0ML9Yy4fgWOLJjvrJizjj+TKW4qr+9nNW\n2I+RJQcN07EIMjO0DNoaY54ZRBDaewtJpEMrCdStXquNaeIM9C+/Gj8YSBTC\nkgKoXs0kdOLMS20liimpSsL1xRSgxG39bvV3JI8b+Lgoy22USG0FzpnvLLdD\ntY7no/OQi3HosKnUMDT5yxPqH10tpchbmqlCjngpE/BEy7g0JIwvFEeaasSl\n4ry3d8r3N0WKn/wukGO+i0f2mq3J1HkhI0vln1X/0mvILoMWYAMSjf+hexUo\n93p5\r\n=+mf7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.0","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-350c199-1597013725192_1597013769641_0.5035020744893481","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-c5537e2-1597013741274":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-c5537e2-1597013741274","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-c5537e2-1597013741274","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"12c0fc63eabf0e756e007cb9eb1177456997a8f5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-c5537e2-1597013741274.tgz","fileCount":7,"integrity":"sha512-stmYvM7nTKnOSEvKIILCsXF/0HyqMMAtYgjDf7BE71WosdeqvusBvpUVHdHj3xbEKd5Jc71hZ0eMBPkGFdu8aQ==","signatures":[{"sig":"MEYCIQD6PAkZxgiPTe3qXy2aOt1cTI715mQpsreU88O8gozKvgIhAP9P4f+kIibIBp2yK2a59tFoSuDVA4hZS3cXwHJ6m0/d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMH8dCRA9TVsSAnZWagAAzeUP/RS3lgzEksJr6Pk7Y/Yx\nTL8W+fdUjJgIdjctGDKQqDVOvhM52c6Ugnnx47/maho1bdjTb+izogvs/ePf\n4HbTcLdRlPmsO77WeUk3r17vpZnG+6YcMOAXxt/S8zIgxDM7hVii9tBqXhfZ\n+mtJN5uxKorIpQ1SGuaReaoduBikmD+ASr+hh1Vn0N8JKoI3K7yO4fUuBPtZ\nhb7JvnyE6wTBFJgC65mn4Xanxt9Rb3D5zQhtSrDTFxo8mjUKShhfVdoJxpoU\nM9nHJk/2EK5xl/n6BZylOoWh+Y7Ojibvb9uWL9L6AQxXYgaSEEOqFMiqp2uw\nLtquoNjFZHL1r6itD3ZKqpJmg0/UJchBsBGWiPQvFIFCNa/l34QsOi+fNsRA\nK3VrelDWvE+aWI/cR8B690dDzmWSqVOhe6WQzMVEmGbVQ9YrNz41o0rBblIv\nc/KmQxMo5QFmr056P4VUUM57DYVrBXPJMKyHC0fPmpiwxhvSKiM2MFmI8Ply\nei2G+SKRAc80HVry3q5gLL4qF4I7hY2X7xKCmavOJwHli4T8/u2aszvZkhru\nlhUd7dj+G5yC+bAaaaUtzlpXE6n0ATMqTagOKYrgTQOVypAlbIDwqGPTmcCf\nsF9RqivdXPkK23iPp3zlEBoqpKo2S3K2OEmDwETjnh4N/U2B61NqlnPC2EWh\nuaHi\r\n=7lew\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-c5537e2-1597013741274_1597013789253_0.46024428779506765","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-26dc72f-1597044205387":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-26dc72f-1597044205387","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-26dc72f-1597044205387","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"28fb0a8ceed03f1244ffa8ccedd85c5f9fe1403d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-26dc72f-1597044205387.tgz","fileCount":7,"integrity":"sha512-hP+C5q0LUAPyzYpq8bQi+Nh9nvTKJqy0s+0V5M8DFwUC83IeymiNk3d+G4I091jOJ2yloDTnZpQUJJmhxGIwsw==","signatures":[{"sig":"MEUCIQD1n5WMuEn1FlwBHXgOSrtncQIWL1N80zMzwUsjGjW+ZAIgSV0tAML7WH0cThVvQakHSh4+C35X5O1td6PFg11kHXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPYsCRA9TVsSAnZWagAAtiMQAIF/CIf1V1ZLv/8rlnK9\nt+l5YiggQma2n9rFATC/G9WC9Ba2CeUwXNXevSYg2LSYcktuQmEGPqvCYeLu\nN0XxuEFSOJ1f77WtimiT8IqNaTOgaz9dHil2Gh/ImtvsmDelHj+0+sJ9MHaa\n5HFs88j0G159yBXG4ytetafRk3yI00JFurg5q+c45xpyVvhzShonOa65sor2\n+npghS3a2L8gEqp3wuTYlk0QXORdVv3hg+BPWkIPLsR2vah0+S9OhmSsY6CN\n1lVNjocFb/t+psZY8+h264yhM7VKlmSZZGK2jfvg+7YGLdbeEBykUsDvuRl8\n/IY8qo7TkNMYHe8i3OgK4m6apI6b3ZkwqsU0QTQ223BbiKjr8qAjNrkOdKND\nQpCJ4WzM3I1UZuVSp6v1ejxG2sOyJL/8LssLGXgd8LmSEFkvHN6lJjkIzt78\nkxhCsHlg0Ah2dBh0oTHYO1NW3EGsN7Tk1nPrKZObLrMnTdk4ICeXaaFfLb43\nsUhfgUVmXUdYBaakLVsWIeJ5R19aJ7MNmGID3hnpHmLFvMEF0yIjjVuuC66V\ndHTpP9TC+1RoUej4RU91AGQbD4Exlw3Cia/Li4eLT5WlE8XfVVQv0ncFDP69\n1XNbjTcjkPsTumc9oFauL2SdZFSLLe8ed0BHDOEqAxfAVfbwa0PGIUKZLk0G\nAuHh\r\n=uhuk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-26dc72f-1597044205387_1597044267651_0.5407436581551772","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-f28ef59-1597044217360":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-f28ef59-1597044217360","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-f28ef59-1597044217360","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f2f75be9cde70890f6f2700d857075157a1e4a17","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-f28ef59-1597044217360.tgz","fileCount":7,"integrity":"sha512-KbrgOQG6CRdyHEQdgnHGVF1tnQOx01wv9A+DgwcUW5AK44XdrhaAQz4eGqeBEhoWJvM77fALcgvSD+WOrnJDfA==","signatures":[{"sig":"MEUCIFlpO9M8K+dtxbmeKuBrLzaIcKNmdgiGFV5sR9jFE3zkAiEA+lS+k8YENJzH+eY3oAuAe3vIXI7GzMU0igoD8QTcHQ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPY0CRA9TVsSAnZWagAAn1MQAI+7QUkSbM8wwbWUKMcz\nVjcbSgsP0ApWWCWkBRkCABMvKC3cphmEK67IiipTj0lqSOSrFgsRxk0KuRIG\nIexsWiaFKcrPND6lao1xPGk+2VUtngOPTSNL+rNAroZKrEtSEai2McOsMdPe\nHOkMLASDEFQ94VoPjA7FqdpBcEYz3aWH/5ANCvVDA99BGZYiUmxX0awgElpQ\ncBu6tcsTBHITEDs9Y2ws08wkm/58tyZJjmlsLqCspT7kI2sJn9qCkNhcBfoF\nFltd8LeoJ9UQDSlMdTmgFLoYMcEyqYjFqFd0d8sUGffr/wHC6P+FaMMgNRLN\nt8tgwqhY0fPTx5K0NichDwox47i0ehh+MCuzb+QtD+9sIdNog5NbmIpZh4GI\nQ1GS1OZuKAl11QMwzcArdKDYy/LbAcPBfHzR4+6zcP+lcSZwaVFbTCd7oO9E\ng9vFJcZUdtKlz2yMCLZwDACXv1/pjuig+ITuWAzHLNNyOE12e1JgypeZjIEh\nNmjExp2BWuM1fOHUc68fkivdkXDLCnLxLJRGpeFktHT9T0+JL+lce1C6Rrzn\nfy5/1h6SpnAyuS6L4DdjJozQ/aUlK91deqw+pkqMeUukl9CyLk25erskkpXn\nK4p7+tRTb/cc+osxXHHVxEJx+GV0PRsed0HljXKmJyBUNhoMcOYh/+vb/U7R\n2yQK\r\n=ZN2w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-f28ef59-1597044217360_1597044276196_0.6368678305930737","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-2674a71-1597044242498":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-2674a71-1597044242498","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-2674a71-1597044242498","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"31a1f7c99507b52cd1107bf0944f09de3a112209","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-2674a71-1597044242498.tgz","fileCount":7,"integrity":"sha512-vRhamFYbKvrT1Y9N+lWWrYWykoSlgUvDdRQFbHfaqJQqg5+aplEmUfbC3r1w9SUOriPdvd7NuwtGX9yCfnmHFA==","signatures":[{"sig":"MEQCIHa49JEEazyyK2Xubs728D1rNT6xu7D19DQxwYwqCxVXAiA3XuP+QPpAs2hXsQ1HIyJu6YDmnRz29U3+THagJNN27g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPZGCRA9TVsSAnZWagAAKHsP/jhAvs483QMuy/P5/fE5\nuBndZp3L1ZoGm/YtCrr6HUG4TjXCab10y5dO3C95CDeSKU8eVhRo+/suy6mB\nLHPMBmm6OXeEMW8THBpwGsx9/ISXuIYPpE/BSyYRPoRUxMy4gd5kBOUmokX+\n+HRgLm6EIbzUrPH48xd1Z919p09Yc3LPFLKnwoI+U6rxsssbwsqSRN77hUBM\nQwNWkgTqEfi35nTzgJU0Samb13HAb77FC9uXrMiAP9ehRIkFQzl7L0U/yEro\ng+DIR3XoAfl9sTX6vwXxbesQnPByN3/se8x7529bG/+lGkzmwMUQzgY4KQHk\nnVfX7glzexfH0ZRjzEMlJnzHMh8LHIOuO+SmYB+EIXs6jlbR4/3PzeG7INmX\nxptLQgisGKdOjyl9P4oiZBLXrD7IOVQoOAnFYO0Csl0n0rf0G+oSTlXJmlSp\nxzDeaYVHIGWG6uSwrASZP/p22SMCNKCzEzq1tUh+9UO+iPiCaMFPihmjunuu\nJKUMm8/EoN6glAN6E2St4Vw3JLSs5XBc2IOT/GHMJ2qi8jy04jsZOvLpVnhg\nDVwvgigAhBoKe8f1XJgqiDUyE+RoZrsRIEvN2w5BVZ+lVA3nMUw6FrFFUzau\ncaLLUO9uyIxL0F8grrtQjpXi49T7VORO1e4wRgcqCO7wLVGDxU0w8GwzC8aM\nYrtE\r\n=1oS0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-2674a71-1597044242498_1597044294310_0.165714825083763","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d5eddf5-1597044403901":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d5eddf5-1597044403901","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d5eddf5-1597044403901","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"28a1d5dd8e1322635491213c40f7fd003a43baf1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d5eddf5-1597044403901.tgz","fileCount":7,"integrity":"sha512-79dRG0BPiiNrEX1nQl7EulRkj4wAKifonzMHQTMlLMxvX2Lf9v+ZBUFQ7QvndRqYc8KUpf4vlXqrtsi6DtcwMQ==","signatures":[{"sig":"MEQCIHy4OYHlR390H8kCQtn45v7JnodYILc4YfaQ78xa1QO3AiBMwbqr3tRkqFOIwyfNbpcUghUGPj5rx7wHCb0JY8DYBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPb0CRA9TVsSAnZWagAABrsP/iPaZGG8wo55ELLNZq8k\ndu23Bdp2nYuYQ2uhXND9S1XJfbUxezOBueEnkAD4MduQy62jOk81mq/dmKwK\nZw3MrJj7ZwrtLnQEr5v4UZnRS1V/iej86yh8KcZUIbb01ONx8wF1Hx7Ie5oU\n4A/UoHtdo2Trph88fD4VSRoqjosjIo18Y+CgDG9IyjZSPE4Fk7V1SddbCfcV\nmOpXiFeBJh1i8v7929+JV3nbiMDs78XtPU5738CJGEdI/w8aPqYhis4xkZNC\nC4sCNe21dgVX156lDVhxzajh2lIqXP9OOXLjBTIEdWK5e8f/00V3ze87JDAb\n+ZM5cQO5ZTSRiHy3Lfm60zFEL/EVm0GCZzL+sKz8gHJIuKGdO4Qrmsd4wTQZ\nmKyYs3K3XT4zuj2gYv4AWMDUlRknxBOlU/KVQ/JV+A2FDB4u6oggCOMAQ7FL\nPREAsPHECUDfIHSHP9nDN0URVWauUh4BvRnbWDF8yEDkWbCa34+SakBr/YXE\nCcJSe6qLTbWQ1xWPJEM36Xh4pZP1toIi5gLf9KwV+aLzF+KYVtEZvQwHqg+D\niT4RB6bxXcqRV1cIqKTeFvPmbW14K7ElsNTjQxpgGrAQmHPkVHnn1a9IvAmJ\nhf8DdlxNejH8+ycXPdJQtFf6Hdn/0/g26/E/1W+r6lchBYF+sdzwH2Jy/ozT\ntu4d\r\n=6wG9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d5eddf5-1597044403901_1597044468211_0.03314451064837809","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-4e267c4-1597044440190":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-4e267c4-1597044440190","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-4e267c4-1597044440190","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3d49e0bc849a76bf6904efc531527bb6743bbf10","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-4e267c4-1597044440190.tgz","fileCount":7,"integrity":"sha512-LeYy1dxC473WWgGkgP9xH8uzpqu0J/qrA/m1afS6pVlrAhyC0BjfsoPKM1aKjk2I8kDdOXtmT0qMq2QYpy9NIg==","signatures":[{"sig":"MEQCIHFiB3nnYVLheYf6IemrJWFT3x9t5NuYk/h9s+9vcGwbAiAnmZ8b+JfpiMv8RkvC/XEoUYX97CEBrh3+cM2FfU1a6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPcLCRA9TVsSAnZWagAA6wMP/2RFfAm+uGa+i+aayn3v\n6lsmEVGG4sP8t7BzuxBNeqj47SwF7MThI8Jmw5Vjnk2fmGynaEd25WdUHxns\nHLQWrW/ZrMFNQg7UDrZiUVhnoE7EoCTtCVT+2G/L5tPkon1vOI2oU5YBkPHA\nia66Kz6tPy9xEiqxa/muubcgjmnYrcKy5uWQ9+G1cavF9XUk+aN4MYEtoRFk\nu8yLBYy4lzUc7D7jEh572QHU1DrjK4bXaEcLbjBPS4UoyJYpyrrFCjzdp+hN\nB22/XwEKDg6fDyHyW4PX0Ol9x+LlyM1/BS4GDd2EGSYlyRGvLg1dvcN6BHri\nl6D6u41heGyYNwG1pAxCK6HhwIkMhfeR7x+0c9XKqsWa0qEW1MQQGtjeldA/\nYopyaP7eD9/2xGz5uhLeZ7PPt/DOpI1t42iQIZs5e4s4DcgR+naUGz4ZAuox\n0oRXI7mekZdz6yAlSGzcrPjz9tl2Qc0kYJ1/gdepgsET/PfMn1qdCNt6IEw1\nvBetz8XZZ2jehWWI7if6CBglGUYtUHbhJ+Xs+lXy5q7e2U7wLT7GMX5NrqQr\nvx9Z34AwG8OPPK/Hw7I8kserdo0/IDzVQXOCXHYg75Pf9BN0tkzSpFXC9j/1\nwo5rg5G+EB+rtfPHlBeFmE60p9SPpIisB+BLCOBbgtkFrPnRNiMikyQj7Wqr\nz6JU\r\n=gxRO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-4e267c4-1597044440190_1597044490654_0.8504947033017893","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-0cccbaa-1597044443293":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-0cccbaa-1597044443293","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-0cccbaa-1597044443293","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fb1d04bc4dedebf8ae5d8af6607ed66b39db2bce","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-0cccbaa-1597044443293.tgz","fileCount":7,"integrity":"sha512-Bl3V6nt1adeK4rr+vJqov6nZpAAQhTuBv5VN558MsrSoZVYJ1QgUpjmiOlBcZ2wO54l84A/bGkDnvUkAVowLwA==","signatures":[{"sig":"MEYCIQCCrZxoaZvGtGkiM8Yb9No4z8fXgx4x2HRCYdpYDnGDxQIhALwqYd6USyLUv2BP4PfxRE9X7HQa7VPHWQsRL/JoLVPo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPcYCRA9TVsSAnZWagAAtmMP/2z+BGyqQ6UCGZ22hw1q\nIgLqI1VmnJb2l9w0oW5yLIOTn3w+jJM2Hv5BswlQyAhfvOqIA6tzdRdU7+6J\nGog8t4Sbw2HzibpvjrZVos8b3xsz2VuZKqu38cz/sDu9vUtc0rOFg/elHJEF\nBwh8DHDMoHl2PNna5BWpOAHaXAECio30OwNKJOyTFuRgvie13dirxDq31PB3\nwMyAO1FJsA1oEFEpj1X0/Vkxrb4hNoNHZ8loH8zcs1Op6p551YPpq8IQguuW\nu8EVVCZjK/LZkACJwHMxdnJiDE5Sn1ShxLoF9NN1CR0bK+6Dd1cVIudh97iZ\nzb7ZW84nI6iCDBQPmD17lQM3Sx5b1XNkzEeriqL5w+/2H34A0ob+G0CYYkMm\nf5dY8RrUW2MEtearL/AHUTPhQL+ojsrqib617DyJml5YXOxbYBjdb2qQ7LZ4\nU0o8QLPLiRtBu1Lk99woXqa4xmP/Hs08P6o91DSExzaUG/m/DV8ERHXCkPCl\njNj0k4euZQj/+nC7mmuhJa77lqv0rXw3ZEPez+gGohOR+1A8UjFlR7k00EMX\natk1WETcBZyU8pDy6F0wy6Hd21foWD23w0GCxzLRBD0ViYcqqMJAO+IgvjoM\n5FaxO7ePGznycR0i6k8Z4nDDaiKfrxumdNcqkELFycRqQtj1q3b3f/Kni2m8\ndcPd\r\n=dIko\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-0cccbaa-1597044443293_1597044503991_0.664486063257826","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-39d837b-1597044562123":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-39d837b-1597044562123","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-39d837b-1597044562123","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4574e2cb9e337184a7b6454c4825d8b95bd60cd8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-39d837b-1597044562123.tgz","fileCount":7,"integrity":"sha512-Me9Wdi4vOEJp7f+o9V/7iCCOGIa8HHxcJqtOr1zoSDZuiuQhV4GhhgQ7KbzI1qw/d5daw96zMyehZIq6fKyrNg==","signatures":[{"sig":"MEQCIEzlNr+wvKctik3jSJH2LgFwzdtgvu/7tsOR7/GldeXHAiA+IjUT9HWwWVjQ7jc+k7brJGbLxbH2ox/0JJpfK62drQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPeNCRA9TVsSAnZWagAAIWsP/1Fi2uORaLFkuPotyjkP\niQbgpRPuaCwGwtaEpS03e6FK/AX5haLldZzKPJfuO/IDXmyng+LYx6ryAuyA\noJ0i0+O6yC0TxI2rpyhPOkfDcDnA0uuBWNCbQh0xuC9nDsAfjHUbpqLzvwHs\n3B4WJ5ZqqSsG0GExI45tSnyBPf71l3lJUbHjQaK3wBrs3HONMJV1Niwgu+Nz\n5KyzJJk38WUtBBU3qotWANzCPwGJt3Hy2V2+2Vd9gPwKgLVXMcoTffTxemG4\ny9ULym4O4HCpWoAnzhltEdPJyhsLsmhdmmZSRzaVwjMSu4t6JPNBZoKujDxi\nk4tb5g7WQmXsgWuzilh2HWzPt/0yIX3RX6NI4d+xJv/ti/2z7MfvMzFzSnUT\nMqMw1sqdAWqacKiunRPVNziZ0t15k2+XjSaoGpirZ6auAOLo+6h8Gr/1VftT\nOuW6Q1nWqPjKgSr02qCg7HbRpQTcd9CYypv+ARH3lU4ws7bHCbXOBkTilgbm\nIewX/6xvLi6ndGGcWElw6OA8fUil2z4oNMfISV+Q77xiKENu74eiUTTHPhvV\nCRj+EC6nbkzfdFc58hYVJIMKonYANHFk/a8nUa4x1kzwT5DlfX6GkR7B1CmB\n3YrCm+P0fwMx5YxUw1Se/pD09rXz3/6gAAq3mLYFFg4ZDOtn5/3Q4B4Hcjbd\nMT6O\r\n=DyIX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-39d837b-1597044562123_1597044620680_0.5353707004772454","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-8699630-1597044578217":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-8699630-1597044578217","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-8699630-1597044578217","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"885f2fa8ec66bb94449995bcdf125e630a48f5f9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-8699630-1597044578217.tgz","fileCount":7,"integrity":"sha512-Ia+lOKYHSzirjFFANgLS7PJ2WhSDnI+ylhHs9oYMuohOYBAbggACsfgQyad65KmpcBPzev3fcb1ZDGwz4Gkdrw==","signatures":[{"sig":"MEUCIQCFItCiUJtVGFeae7R5QOIvmo0JGuvci9kCZGoh7GjsjgIgU7WgjF3gOYgK2LnYVMpzQQBjWMZoMUeQ6WAFz/ZAc0E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPeYCRA9TVsSAnZWagAAstIP/iVedtn/scm/1dN/puhf\ng1QFVaMrIjitT0Z7jb/biCzrMYkibTbblPgH36gpogrLH25vLmOjfmp2vJDs\nLU0dq9H4W2lyZTdgHvDatbfZqylkHPA3I+jvH6+5rgcE4QiZG6kor7VSIGBe\nMdv/ri9ozf4h3TBrtDXSXfoIdknJPNuefbfIoHamk3gYR4V+4bQk2zJDW9YF\nlVcnClDYjck/EiZ1Uu3uB1igsWrUdfpOAVVVIEMLoQQSiT8WmcP0O7Bmo/e3\n/2grm2DxYKRr7uXoGfZLIpModIdK5DHf8dK04F1c5Mdc9lX2P7QMSutvLl9k\nM2PFICbWO6NpAfpvrKDpWgCql89tYWb3xQm1kPxoRQnMWG2gDyGmWxNPDHwe\nnM13PHRvuBAXG7a3EKRNoBZmNFXJlsIagmYn8iqrPR6V5uAArh/cZS1bI84w\nbZHjZhlLrRZv5RWA16EdjPA/DpR2CoLVBRh1KHFcBosdbYu/+GFt/CifHHHf\nVod+9/LA+xbE1Dra37tDPclRonusmSbscWv4AXkqHsMtgMrfYqmvaKCZ1+U8\nJd0qFGGAdygUD08EkPA/P9wWt5T+jXcNkbkvNePgcLFPMHULzbtKpW7hR7wQ\nDtYu1R1Dz78owWn3vJXiB21foiICeaIRfkYmMyNxIDjelxojZTR8lddlf/5x\ndUO+\r\n=QrWQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-8699630-1597044578217_1597044632024_0.4210195216858972","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-48ea93c-1597044579585":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-48ea93c-1597044579585","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-48ea93c-1597044579585","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2f667278d905a9c4e2bf3d686a20e812d432261","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-48ea93c-1597044579585.tgz","fileCount":7,"integrity":"sha512-qD5kjOC7TxE01vYRyGIcofVoXSprQaIphhSM8dD/ZK6IF67WSEJprIsgFL8E7R4+OfUz8nEPnR0OTD2FqQW7pw==","signatures":[{"sig":"MEYCIQCj4U2EIh8J0VOgrkeC136FxZe4tuYVAMSezvT7pS1frQIhAPkoW8RGwNXyK9jLONSdu4cHCzVNx95bMkiJTir68wzH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPemCRA9TVsSAnZWagAAmiAP/0tj0oyhs2PSGW2LgMxg\nDvko6kvgLieqMhd3yIn8EvLS7POoYRLR7p7mzaOORm1+aJi9Ufqkrpy/PF1Y\nAALFNF0iUHbT+pz0JqeWK1M7uXweqIKs5Rr25vsGl/ZXt3aoGP6RwvWrHzTi\nHI7IriiL+wg77H0jjE2b572k8QCCpaps/J0jENMdZsl7utVnlZS8OzlHeDyu\nreeCm86z1fHiPfuGP4irySrsGp4HkdQj8qe0nERPtJ+KlN1B22arJ+HsKUQf\nydm5ctBzjmNdMKgmKnWSgq0EhMU+OpKMxty8TqR+EGySNoSplgnb4BkWYhoD\nY8hTUYRjklU8RSc+NTsxVllWBFCVn0CXkhV5RTxALND5K5a0DLEESe5kPl1H\n9NQ6NcHhU5UNLmk/pfwhBy2rQtHHn3EB9MgaPsvy5bRuspYecMM36xksOLTr\n8CQ3OcfEv1jEguQSCtN+2LN/UB4PzVMqV6j3i6yZNTRfgxOiPxbW67yqfjAa\nhwDqUS8OAeByHnsTh/rtkkEJ556fd09H4VhzKGRxcwVNFenyRESYdc7vlQCF\nvzY9WW7yUx2bAT0quafVjr28MRmcMtkfl5YjnHzlp1bbxUW1LbtJf3/vDtQY\nSmJvaqLIFBPvQ29Kg7aKKJ4wLP3Xs3kaMTBH8WtoBZJmFwh0UbtAD7S1xifT\nemoF\r\n=SGEJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.17.8","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-48ea93c-1597044579585_1597044646069_0.4112266944161205","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-c3dd476-1597044773499":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-c3dd476-1597044773499","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-c3dd476-1597044773499","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7ec9a84df5651144b72683289fca6ad9265dbe03","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-c3dd476-1597044773499.tgz","fileCount":7,"integrity":"sha512-Yk7V3jVwLAHEE3FRUcd6kF/RcJe+cwgy8H2ceoJhhka/uIxMgxYqJWhW7HF3l1vT2ZHFVS6/ItrcEJyPRHES6Q==","signatures":[{"sig":"MEUCIQDLS6kXZJd+uulz7wIY+QbWPmyRe3U0HSdR1bWxhR1ryQIgV+A4mIFuy1oT1EEf1c5UqGXAdacD+Aol/mE6pw10jsU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPhqCRA9TVsSAnZWagAA3tAP/1yEKmyLzGmm3p7cm4tm\neemeWY9pYqta4JEczVs+INROpUwvqvIQlhNzDD9yzs+0smcrgYnZsCOPg9+i\n7SW/Xim8nxxE/gUw6xsawEJ8EqAu2tqMBbV4YXIchQCZ8RWOQdh7WzDwCd79\nUQb8Kxoy5ezd2UEA1iBfymvu8topkvbDQH4I1kD3ce8LXIYLxOuPnK8AEMT9\nQPXtzeC7WXUTH9Dide3lUvZN6Zh6n1zvjrUspCJzCftJ1lz21QFoVW1QOabv\nJvqy7c6u9HUNMzfQvV8gbjcWLWEub1XYCJEiiuatJHWl04J/SAm4iZxdE37Z\nF7cWeRbHFHBXmhaLvNbPMfGSU5U0NyyKMNtUPooS3zLx9I/02+Pp5FQqT5q5\nmAs8fPtDxpblUUypsWxLVJwmwEsoPZsKMwaT2XlHNb0mYd5Xo6I/XNyk+A1U\nU31EeJ6Lqi9JzsxJClGf34LP1lud6mXkSyi4Qw+4DokQTgwROWk9w8pQ/jBk\nhGMuLp0LDg3EEvoBwj1FUPXVptZxJPEzAqX6sooAFUe+7paydhY2HO6mtOPr\nl5MK29boghdyHWTcboNGXpRfJx+bpDoAaUXdRuoVrrklquQlvX0YELVWZP9P\nUMZCk3/x5vtOrGubLmju7l0Y1P8uQHWtA0D+hIAqcHg5YJT88jJvcMG5RNuE\nWVBe\r\n=/Pjl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-c3dd476-1597044773499_1597044842019_0.8331860904479622","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-2cd0c51-1597044809515":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-2cd0c51-1597044809515","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-2cd0c51-1597044809515","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5b83d933e51c5a0a2ea8d3fbe16b16e69acb6e62","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-2cd0c51-1597044809515.tgz","fileCount":7,"integrity":"sha512-WmFK033z3mB0lEG5x5rYbb+jB/wdisxJeFmx2sOPIY3DLMwjWHAMh4Qk6/lHiKgDONqXmhFHNKxWt8gfNkbxTw==","signatures":[{"sig":"MEYCIQCfnxfieH1a+QYOJ6zLbQiP++B4HN8IRdnv+qChS1kn/QIhAPYaF4ZXPl9CfrObS0vYxDA2JQbGU+W9BSqftYckQj0R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPh7CRA9TVsSAnZWagAAImsP/25IiGgoGAGrSjKFLfap\nh+rLUsZMB5Oqj+AfJDkG72tHivJKEvLuPX3w1OdNSOUIsElJxzXLahfd/9XP\n8kkZrQT8J1oyqP02YRXuGRA3BCUDgrnGyXDfxnrVc5yj4RUC8eObXcXpLk+a\nJfv4+FbaKPD6RpJS/aLnuvPU9WxLk+gNv6cb2cfD4kue0PqYLd/e0lCPkOQR\nYzDLJOspRemn0rCNZPrEIIAoWADRPZa/boXdh0ibipI+IPUz+7ObhYNyH9LK\nIDSEbt/nWhVg75XnqyJCqNERopsaUnfWjubpkn7lKHx3WziOV2RVkLlcEgWS\n2H8zi/4MHafVdXoVxOJ7UBNE7/1SoancdOtQzW1KeRGSdLkCWclxdPDnmxHl\ndPJPW01TpHX05SD68vhYPx0DSgQ7l2hrlDLJ0a+t1Xo1hibnM4DK0dW8a7E8\nlUvZePSjs0g3IjbJeR9sermGrH/YBN5pr1FVmVLy4VrK81ndi4sofUGaDUGp\n9/XgDfJs+Nlld9E2nVI+vQESkQtG9c+2cDVIV3CQbGHx8wHppJ0oBcT30/7Y\n+Hh8opSVn171qBzM+rgwCIdpa+MvIivvgDBUXGOJCBRu9dJKaQNI8REk8y4N\npAVJtro0E9zRn6IIQwuObA3XQvveoeVnhEG5C4r5d/5oWxcJDnem+dTt3+Pg\n8PiA\r\n=dN9A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-2cd0c51-1597044809515_1597044858947_0.7965419719351248","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-86f0b75-1597044974749":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-86f0b75-1597044974749","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-86f0b75-1597044974749","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1cfcc1d671bf511f8cfe3516ea91da95ebc758d2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-86f0b75-1597044974749.tgz","fileCount":7,"integrity":"sha512-+EsMuM3DqwgHCSG2FZkT5inFwLLzNpJl9xsl6NBZujQHn6LcLummC61dc08ot5YmNthg3qP21mAc8tprrIIQOg==","signatures":[{"sig":"MEUCIEjZJd9WmEfQDppwTmO8mr/GEmI7YAwDetHZa2uTxP4wAiEAtBtEMYYVu6jc4doxdtSlD5gMRAFjeW/0sew05bVh+g8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPkfCRA9TVsSAnZWagAABUMP/14Z6i2p2PMBenzXODmY\ni3DOkSnaMj0lG/sB0FGfnSra0YnPkHaB/IXetv4TNnFeAXWDjrsi66DLrbQ8\nXQkmnokyZz9UoN72qywqZW9nBwc4K9zoxcwOSNyJVtUgD2W8sFbxf8sxZWPv\nmAJDOSLPcIWaBDJLyRRedX6ZqBNXpEi6+hU4T/g6jA7rPACUhBBwouaxqo67\nBJkUNEgKDcSXEsMLBbxSi2uZbmKssw+adiiHqb7Im6lJ4ExnF3l8AxdQiLBk\nZP3T6sXY3FLcj7o96NfzX3/PXmg79IFPJpRNdABYK2SMf9kfEWTS+o1kz5zy\nkxwMNj9OVlnY59Ud3f4aF7COXlgsmcckB+fJjY53gY15kRLXpo9jGkl5DGqd\naISmyd0GcdDD7d9sBmab9VTBX0H23vi8LlCfC3hnfz3DWCX0X36AMhRS81kO\nYjaqAcW8E+l+K5oV79jhW4U52XcG5MUtxvQVRMYuWerVbC2BWxfjanYI65EX\nT2+6+gzfAOphZT4I/OmUaPqJgIboHtrv5nAFUVEGVx4Bkz72WaIyrjZTdfAE\ngOgrQCcjoj1obUtIwNnIXH2Q1uCExdK4CJ/RFx/lSQ2ttsq3A4QOqT+Oeki5\njS4r1XK6yNOFlB06oHCk4WdYJRFuQhDQ6nZFDOY+XTP+KdFQyMWsBJUCi5c5\nNxPV\r\n=6HKW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-86f0b75-1597044974749_1597045022542_0.4723679738286255","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-0005a1b-1597044988055":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-0005a1b-1597044988055","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-0005a1b-1597044988055","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cab7887bf20e9dd137541767bbf3b93310491318","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-0005a1b-1597044988055.tgz","fileCount":7,"integrity":"sha512-r2129goq/HEYT51DvjaVS28/MB4EPIFqEGSHzkHeY/ZnP3m001KlpyklySsa5eBiLqt1GxrYOqdr/rpgqZq6fw==","signatures":[{"sig":"MEYCIQDkC0fShhDMkWqZyD5q4j/L8JRtZq+N27RzObSfpkUCSQIhALxbnhXb54YvBW8AZ5PeP11XCOCJVwVYezMq4/SqfwSi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPk+CRA9TVsSAnZWagAAbwYP/0ymI8QPME7SrTSWGYL3\nbJlOz7+ccYXv7tVfIs7bpQt+A1CMHTZGteO+OvTpFtY+FBMKyw5/Q+1ITWQ7\nU7k5Ec1GALOUCzCTUO22eDGkjxg1XjSoiot2uWcG+7pcqYDMlytDn7TEWdnG\nSy7Njx5ejoitizDAV0JAd9uvlhIr76nt+54etv4c0gSPaD41g23MrnVuaWsZ\ngCo5YG1yTkdCQ+d7mRwKnhw0/103si/7L0Nbbw7sQ8gZ4wiFW+sGH2eN6SY4\ni+F7OBpeilRLA/ZpR2aU2oRSZ9OfWOrjWAOGDrqeALz3Lpzyvy/ZqoOBTrY/\nz71HWgpjflyMcnd0VGU51a0k0VkuRwBUyBJrskAwTjMF6vmy9ZU3u9yhbllz\n0tvFXbQBn9xOdv0sb4daa/S9Gnn+tMN6tgStgkZTgEzuBFDtfTn6oqMLxSjf\n01hpizsZLgS4WEdtRPBHcPXoVfF4U5GjA+nBkUYX1J2hd0Wn67fOK7EWriDg\nLr2SC63CfYlgqO1zqzGKS/URK0e3jffWcI3mToYlXDO1SXaHMMWZBwgexv99\nHb43l4N6G+TkGN5VE7m04fdibsKn/DfQVGR8rD0CnFXlza9v4EXwgNdPbVsA\nL1PXUkjv/B+OXUGAC1BZ8ZTpTc2c0uDxgsXt8dsU44tjq0Wz8OFnQjqx5K+5\nbQrI\r\n=+x8T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-0005a1b-1597044988055_1597045054243_0.527930145776911","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-cd63221-1597045164274":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-cd63221-1597045164274","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-cd63221-1597045164274","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d97079c17463dc75c2e669cbaff70923966611c1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-cd63221-1597045164274.tgz","fileCount":7,"integrity":"sha512-zXcg+j51kBmLTSPkuiLx1wuwuLKEUkFuSRGyDAA39qREcd1a0E24J1LJ1aaypEA9AgDJQZrZJeArUh+uqELtkA==","signatures":[{"sig":"MEUCIBYuAPkyRE6LNXyNX/Rgw1CUxWsRjt+pIW/4TuSWoJR9AiEA7okP1AMstUp7gYgihrYfo3DkNmKLUJeoW60L9c4p+eQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPnYCRA9TVsSAnZWagAAfkUP/ArN8MiLSh8uDKVPshgW\nG69ZPSgICqcaEWFoHgn8hnTdJFlYTArSeYeXxLbiUGTQEyMH2ErlytnEXchD\nmbz7je9LREw50M3yTrFS3TDjZl7Op6uBjwgXMGrIZnEaDpDf4OMvNvpQ8hdp\nfcqzH2rwjPjpX2DTCDK75xwqWAJ8vk0JSS52djYt9ZAGThh5Q56DiY2IGQM+\nN7NukhQgxUWpp4BlGbIezU7W9NcL+T8uBMHGJCEYFsMrt8ka03CPljUk75HJ\nc3yqkFceLL/RX2pEgMv15gTL3aYr5NtlihQRk2KsvfyCf0UvQWFG/++/ldZv\nw4aJSTfPGe7G3ztfcCaa1RsIEtp0V2EwMX6NlJzw965MTHv1tNqjAfEjXkmC\nQUmB6pdNKRVqhZoeroTOdsIkY1Ng8mBfOWaJNEd8ZLVdHKlIiqcxL5U6fnQl\nUB5o81wV1BQScvd96sOMAlnMuzPw2TpU56HiFh1kPOqZHAQDWoFq3QOzm0wp\nTbTsAj7YMbs2Ts6SmMtOdcoHdW2aIp+zGSNozx063XgEFQm03dnxUZ7wkEVv\nBFVy+bN164bmjykx2bYSonNaPzTfsRYOwrRFP4KdOHMqygTXH1azkGIjbTdW\ncqwhIOxgt4fClEjFJpF0b1ZGoZH4UpCS73hWgPrGxptyQpWR4z4QErSz9aF9\nJNJn\r\n=naP3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^6.1.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-cd63221-1597045164274_1597045207754_0.24316848253322076","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-65bd2a2-1597045171786":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-65bd2a2-1597045171786","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-65bd2a2-1597045171786","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"503c01f41fb2f3a7de08a77f52c3ce2a2bb5db1b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-65bd2a2-1597045171786.tgz","fileCount":7,"integrity":"sha512-uOYrhYM/6wXz8e6ErTDNyEwpvSOYx5//UXNaAsbLBiXJSgIGUs0K0v4KQ0NZmXfJRSeg/xTAkUvhNV8OOfyyOw==","signatures":[{"sig":"MEQCIBiaKYglb+78rHUdZDR7JUSNm5wfv0erfGcWgMzuKAlhAiAjhrrTs7jSWeK1GdmGxCxgCo2NpKhJxjBG3sD2+rlOIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPn7CRA9TVsSAnZWagAAECcQAIR7z13CxURlRVSuScNp\nowKwHsQxgbaoAM0qw8RJ0Ug2ZPzSAJ7oI+CeEpxui1BUHBGCslCWgGBi+uXF\nbNVnWXsiY9TCqTtmPAit+t99fdPjarJUOCmk9xE9FfKnnS08zoMMV1Z1TxpB\nol2KZT7xZMFc3oY3TZcWtCuf8vyJI9KiS90JsO6m76F0SVad0Ol4r6YV20TS\n1yIq6ODp51dDXtcakxgeShuVf2Ymg5C4CftfjTTJ3iH+r7RYGn8Diudk+8kS\ng8LvUdaTMTb1M98sEUdthL49ZeSEuUmHzUu/221XyXIKDmguEXwzqtV/Zf/1\nHk/MEppQRc98NJ1UhRay6PaDDNwkvsQuv00a5ygBZMnW8gGnrjJrGsDI0FdD\n+iyA1xmeqcZ6PRMUjCrN4VLcsxDDSXLDZGcgusE1Emq05oDv7BTBOInTFtQl\nhzhVON19US3Zdd99HHlBz+8+XXxc92NpYSC3WE67I5RyskCKD1uZYIlr+G7x\nkrlE7QgyUjXDMH7TVUpdeuUXsPCw9bFdc6j30fdYS0/iDLykjZ+DkG5CpCAz\nYJeEY/IUZwh2/E9Jfyl4s6fQYGSpapL/1PxU6drv9sjOkRj4RdMX1A1MZSHL\nwb/ToAGVSdaGBBXqdTNnVm99z7wUxXjauxAum3DD/FkRiEZhQNK2J2LhlakE\nLWp5\r\n=wlKR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-65bd2a2-1597045171786_1597045242673_0.01638445880812256","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-abc2b41-1597045386761":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-abc2b41-1597045386761","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-abc2b41-1597045386761","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2bb9f2741b31e702fe0fa99922db02eeab7b7c0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-abc2b41-1597045386761.tgz","fileCount":7,"integrity":"sha512-bXipZ5kx5Z0QrbcBQsmiXt7JWOb/Mduah0Vn9nMvCFNkDR0ipP4LGHnfD0rgBT3hvVyJi/Wa0iYc5GDo2ZVYFw==","signatures":[{"sig":"MEYCIQDBFTd8Moywnjq/Iw5UbJXs+GeScWUyaF159Hb6cw9ZvAIhAIlkrd4dVPJNnXN8oD3QsxkiDLc4LYf3mQjZZn8jEVoQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMPq8CRA9TVsSAnZWagAA0S8P/i0Bd4m8wG5TABK3uU4Q\nH0T1kJgxDXJYpDKIPqlWZVkNOQLwdKZRdf01+MxRWzkAyPtaEmfwo3WVfz/M\nw/8w+MAWUrjDmo4nrrZpY3Gv6JHaeCqfRHiWwcZ4kybXG9gLoGviUggkAc5R\ngifUpoH6i0v0bLRwBxoOGvmddabdxc3On/L/qD5hjswy6oMxhDkIFTR2JufH\niH5vCu6YXCZtw/OSuFfOOGQEkfwa4ZpmYoDySxa9kmDDezd3uu3xTD0+YXhH\nLfNNyMaH/NTgckaMJsJ8FaMePDfA3dyuD5mjYe49fY6Caj/8BfGZEJTkoomV\navU1Fzu5MMhckZo/M+kffjc2oAgMbyivE1gdr1obSbhdImR9uN3eDxh0Ydaj\nwJdQoCUt1qyQuLS+lKhmnUPdL3YsNaNX8wj0B/dtw22RjSLkgjs9JB3xc7aY\nD7iSMdhYDmRdu6ypIh3KJqYGSwTSCd5Ezm91iMOyY56NwLJmMbjfgdXLT3el\nXC7txSNrv+UE4DuYDQ9SlfugPIEgEWsu/IDR+G4IHt4EVaiEU29goe42zp3F\nrqQINqz/LHlLWHetE1n2Md/OOGgixDenCfIeNCmYzMxBxcZbMShuc90OuiaX\nlCF86H2bjmwUhYyIc28ejJIpodigD+waUJ10CQ93eZVMFesV9KS/bK4WyVzZ\nl0OL\r\n=fmhN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.2.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-abc2b41-1597045386761_1597045435907_0.44265855880391847","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-061de1e-1597095764112":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-061de1e-1597095764112","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-061de1e-1597095764112","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"67b03d2df389e8f8826d06d53bd0d21ccc1b5ed1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-061de1e-1597095764112.tgz","fileCount":7,"integrity":"sha512-CEl2Iix/cjZRLhT9Pqt55hPmrkf4g8uuVZj6yx/BgU1Ql6bto/Ze11vdaSTEiT55iwNQnyOc17OvHEcscDHQNA==","signatures":[{"sig":"MEQCIG8DSYL/DM/iDN1RYKXGlOxau77MHzTI3UFO7CB8nrlEAiB7k3yqgX3XCO1D+UjXUNoF+nGEbia9fY6Cxplqhnqbkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMb+PCRA9TVsSAnZWagAAXuwP/3g3Lxhdff1PlBD2uhuz\nAV0PeLOv8sx3YT+KwpVFO+/CymgOd9W+G8KQWj4PhECulNfMGgfwE8bB/jjj\nN1RD4djVyYJsS+hje8goLRjG/6MvoxBGr23UtfODue47paYhF7JsltNS2UHT\n/h8AAFRQF0hqEDmhWrS8Z7M8MpgcIt68L+HQ73aDJjmvHtRJG147SJ4tMbjs\nqf1JbW1EpHbNh3Aam18Et8fGikR0nl+noCWpSEILAjLD7iUCJLb95I4STsQD\nqFIhhBuViRYv/hImTNXFNCxMXE0bYBaFQT8uvgjLX6ZuL73+l9CILoEdikVj\nqCrPc1zrGILfQSqgHl82sspJ1uJMv3/uG1RcqO/bimLNX0w0xiaD2RhxXsPa\n/kS47eEK3ejFJ6fKHzD95rSgZe8B+O14P6Os6gM/UlRn21JoPv9/cFA5Ulun\ndfb2Qyr3bi1vX7HA8JDdhAIVx1iOIcfZehSb8J6ytao/6cPWzqftcKyKNUOV\nRBdMgG/o0nNP11VdUbTOjqGQNVeFadIbqy09VmJUx4fPhQwfchAHDiG3ynI5\nMc1ZXyOcOiP4v5m2sksTIbzdlKT9Qvc/JaRpXJZ1qDoWMEF9OrbyKrmKFjNV\n/t6kIlkXA6biB+f411wvDg0Mps8vQrQc59t5nBaOORRjvY8EXiEzYh9MjhWk\nqk+n\r\n=Gg6n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.3.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-061de1e-1597095764112_1597095816016_0.08076988321146894","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-061de1e-1597095763946":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-061de1e-1597095763946","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-061de1e-1597095763946","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb60ab364908ad3e871c2566823bad9ab092fbfc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-061de1e-1597095763946.tgz","fileCount":7,"integrity":"sha512-5yZJORXDTdv5DH+cKsTUOp4rbl6IBV/Ira0G2xa15QrZAZK2VDWvyBCt39GUoGOcn6uUnGrozZ4c5m4AQ6CRRA==","signatures":[{"sig":"MEUCIQD/hA2DECOcgqkdAYBWluHfngfJsknmoZ6ar31OsGmALgIgASzB+Q6nFCnJrbWsMjiATqqqkiTW9d4w/zsY+JnKCiU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMb+lCRA9TVsSAnZWagAAC6UQAJkSfFfAIwV62UXqYYTv\n/zqgqWAXXt13CTBtbKtTk2I4ZK00dS1dQum5r8b6zpPymZ/98qBkUnqFkcn8\nimM9VkgLua2NxsNXBDUQIYGzFDIf9lo9MOMFE9wlAwdEC0rlNnTxh4ajN6lO\n390IuQJ42afhIH/bdf5Eit4PcVh0lWsDcgR2s54gMosstsPvCtimlpg50S4u\nUGFhPudMLbp3Ea7slI1znksMxafKVVjmxgWIgJrRLFgeFAbmt30gsc5Sdbjf\nCgM8Zq+I9QCph7JPJI5Rm0zilGRf4KLemBcT2XFTo+InpedIvgLHauPMfV1v\nBmnikFPKf+acGd+3vQ77OcrtOCojd5cd0Z6Xtj00D2ECXVNcjwIhG8J8I5gT\nsTlASzC0/3Tzt44k9SpY1+IMcSKCNMIBCmuOLir6cHG69DFFhIXbYbrx9Veh\ntumcqfMzfn8Bscpk5F07NRycwXxSfcCD9aPXcxkOshwzzBWg9aklBS/Oa/tg\nENOA0FomfjffqMRO2l3FakRZ5E9pHQhGqLsKPRiT4eLKtD2+4NVx07WZpTGF\nOaKjltqY8OaUiNsLzVJL1GbiqXZHr8u/weM7+9w49r3reROLJd/OpHgjXPbd\nCpgc+292lxhdRnM6THKfRnLyIJWuZg8ifmWBlYTjSQwUtLYLRPIx1KDW4Lqs\nG87l\r\n=Ok/M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.3.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.1.4","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-061de1e-1597095763946_1597095845225_0.7381593187216435","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-0b8a3cf-1597181239052":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-0b8a3cf-1597181239052","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-0b8a3cf-1597181239052","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3cd933af978f1685b40f345b83ebfbbe9ace1621","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-0b8a3cf-1597181239052.tgz","fileCount":7,"integrity":"sha512-yGr8Dx34bqBa58+i3K2mh0BQJ7ROj9Hv06OOtrp38KBMlFpAEaeu4QZjSExY+Y4GQzBwZUe+5pReXv/rPB+szQ==","signatures":[{"sig":"MEQCIBYhxym7u7gcWGi06frq3p2x1C85blBcfbF/+l1zBh+CAiATiRKfOGGSmC/C/Ikb2eJA40X3CsKBh9H9MYi6fm81Lw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMw1lCRA9TVsSAnZWagAAGeEP/iXNk2eIsTdHRA20H5pk\n13MlRe5rbsyjQl985B2OVtUEYgo8Qpn3AO7NM2z+W9mtdWVdaAl3pW28H11c\nCxht++syGXus013SgyWSca8lRZNMuqvmIyjvee5XuPjC6jrSDFcjFEnsf/yE\nWmUKZ9wQauRhQ753usWZA3M3YeNAgaRuXskjWboXwHm+Hd1W2uLs75H5pUMN\njHNodQ06x0naHZAEdrLffq8e0izrDPqKqiArpbintj4MMVmkFnnYTqjnj9wr\n3C6sJAZreiWlLRAEjAHP95Jj9F5iIUWasu3QithHcwAU0m9K8sy97rNVRblx\nKea5lgtqhLoEknnnbPlvwcPhsuCk3w8LJPBLZXaA9o7etGlf6IKSqnnDYe/t\nbX8crVn+/jkUGxsJLf4SWr0J+2M00M04qATAourFSLyg31DUzBtwXLMWDSos\nuYasKX1VOEFIeEmrHbEcW1ieMWbzz8+mJAOLmCVbDd8KzN5WQDj/iu5Eq5Jj\nrt9YnwCyUHEu/lc6j0XIeYfgn+WElU55Rcl4gCuFZFc5CTFmskWMQQEkPPUD\n18M9pjHHqIVsXEJ/pM5N3mGCVj+yAwmtA89TMyIaBfk+FsROzrwSfaN2hZnx\njayh/PANVHitXFmDf72lVeDlh80THXa5VXpyJCt9qwAhOTn47P5HN/S2fDii\nM8NQ\r\n=ug4l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.3.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-0b8a3cf-1597181239052_1597181285306_0.8012647007650895","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-0b8a3cf-1597181240320":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-0b8a3cf-1597181240320","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-0b8a3cf-1597181240320","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"12b5a06d5f3e36497f1ece2f7f9ce7fbd95f5f9b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-0b8a3cf-1597181240320.tgz","fileCount":7,"integrity":"sha512-zNSDwNDuTb4SJpi+6+vnCR5z4j8/4w5sx5CQGLAV/f5vhpBm15Ls/c4TR6ykyzpuIlzkb5iXzRAa5yQOBVLmTQ==","signatures":[{"sig":"MEUCIAecp3IJoIMObHaIM65lDniYOU0SPS6IrMp8vOtzm58GAiEA+cw3dicfSpZC5nNYtIKOW92L84+5pilsk8Wd4qOSSgY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMw10CRA9TVsSAnZWagAA/2QP/0lttJynFuO2+ZeWaQgy\nC5HKXhBWuZ0LJvV81cmYu9X5BOOv8nTZ1OSGBOAA7oaajdlw9HQgC93D8tiW\ninXr+S6x1lcF/y2TOZtuXUDN0z4w3RNawJRqF5sbI35haL3t+DcEEC2IPcAv\nQinrKq17dwIdNrMMZOOy/AUFrseflxRdo2wHRL5XtGdiif6HMSahtKbfxKrF\nxDLqbEwsfoU7gtiRsFWrafCMGhTRYro7TH56Q/N1x8UA7qUdctHI8tZLB3Vi\nl6CDXNV+tsXoS6wsVc0AUXQnQ2FlFmkfI/NJux8PLtfy4EWCbT4Umi36ekNS\nPLb5raxB3ikJvTRiMXP22d6Q5Ydv/CrrVXeH7U+9RC3e7TCHBFm4BfIxe5az\nGgoiKpFLoF7S+G5C6lPlltZuenRDNmXr0H/RA3mMNvgalg14NPdYCnOyjcc3\n2L1xnV/VkHTkmyt9Cr9k3tS8fyuKKCBxmYt/HIoJWA8bkkHLTAR7Or7WWPQy\nax61Qxor12ThxKYvJHerNbKp7Y2kcCfBb+U729jX8cfl49abd/q9o7/bBpRI\nDAmDjuz8fXyLLrPM6vlMb0yFBhPqIf9V4DUpz3LiV5Q7F+7YVCg4jWzFIB1R\ntDdg5CIO/woRSEKLz0EJaorMQufxvQ1WRb4DNV99xIfLLBaOFMpZFTaXVMpo\nd+Xp\r\n=oxRm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.3.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-0b8a3cf-1597181240320_1597181300319_0.8255408783919882","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-bacc685-1597288656522":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-bacc685-1597288656522","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-bacc685-1597288656522","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"752b0e862ff4574d659d4abcbe96bdfe7da9394b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-bacc685-1597288656522.tgz","fileCount":7,"integrity":"sha512-TicXIusfOyKJ4Y3Z7/YXLnbUlgzRhA9UtXwa18PmItKzlIcG4/xZrstByHGubb1VNVxeGlvnAEAVuRwz6VEDiQ==","signatures":[{"sig":"MEYCIQCRDWjOnylgSED8DomMOE0H0tHrTUQ4UDLV8KuS7qh76AIhAPS5JBx76apVM4CQxO0l6fEbtVHEM8T8nDqkjqJbhyRC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNLD/CRA9TVsSAnZWagAAdFIP/RKUH9TUXMuOXbnuTN2q\nNXc3j7dEDvQfapy/NuozOp0E9ffi+gPFkJiTk8U6k9/DqLG3LMsHuGKMXPHW\nLfbpN8MXPYcK9xUeNP8CZDbKO2M49erx80UZbkindlBrEHbg8wYq0fQTc6Mk\ndr+Jl4YI4UHSuKo1+dh73zVrfwwYLoqrHIe75OvUY7O1/7lJeBe8LxJytwxR\nUe1jfPjQEIicBcEv8x/3SUfNWstqfkZ5NZZwCY3ew9RxfNgnu5Ax6XQiTHOL\nPdzh2O5WiPfBFaRXdyN+qNMtaPTqon2u4rmBDWATONDjWYwqCGQZY/BF8d45\nPw/98zdkm/EcwoZBQrZ+H8ekZ5vZcUk9Fm4K04f9RnuceEiPiUzQEOhk0KRb\n1bBo3bvRcYsY8oHE6JhPYw/kyHCo20FntVCkVedeY8PlYxVs2mGnxzYJ4juo\n5WQ3/UDU7zLyzWQDv3Mduk75IHZ72p8jtuG3SjUNiOi2azTxV42kCFgzLQQq\nBuBo9kowq7KElRLbbyexTI0TGlBKtkUeOp49aG1qSJ79IhcgMdR4pRbbQ7NG\nFHShChx3folc6clqSikyDwm6L4/AtM28xjK31BaeYgI7/O8XnXG65ukF9Yps\nJ6r16TJwRgvMDY9ThnGaG1n3oi3RDmVnCwO+4HilKhPfJ9aA38ajL4sdWdhf\nKckP\r\n=SgC2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-bacc685-1597288656522_1597288702933_0.195953455174823","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-bacc685-1597288656453":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-bacc685-1597288656453","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-bacc685-1597288656453","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bfce9ec2ec7be2b80dd7fe42fc927def0b6b53c2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-bacc685-1597288656453.tgz","fileCount":7,"integrity":"sha512-7e0CuZicxb/8PcLSJVMJY5juR60CaGXm/+NwrtLhZfoqWiedZAgka6V/jiE34+8Q+etVjJM7AWpVxipvKkz1sQ==","signatures":[{"sig":"MEQCICJd1joQsZbhbh1hIEkmRD7TCABtc2U+63uKa7jkZZd+AiAUc+oCZHBmx7CNkjELXzj22GuZBlRbjI9q2sRcA+i+XA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNLESCRA9TVsSAnZWagAA/M4P/09K8dXaU+6HjnwFykpg\nVJQSADDi4YSeh5rfH3L1MP//9ajrMqnkj6w+sc3FDXd8CaPOFEDYaP6xWVIN\n4f8zcamZ63Un7a1UdK13YI5yzUAP0KldUoNcY2JxxP+2lJHYE5qIZu3ZrelE\nwS8299ys+hyPTzgpdJpUM7JLrmdQn3YAkJ5BJSBzwzsmquJFaCMopBUKWZdy\n0Vq0eDc6+puJ67Ms/nRSi3BC2gNDtrn+A0iu9JTL4g1mojiKpM83Xf1YReOa\nDkjUCtVsK26YVP5ZC0Bmk+C3wAM/uLTGbl8rBQpIQWOsn1LA83nR4hPsaLaB\nsNrq0TxTMbn9cZRNwRCRWv1d6/Sx1f1ATYNPb4NYJaAhzXUGhOXtZnPrKD3l\nKGRPEy0EY4xKThxhRmmykVEGYf00UjaybCoelHWxJABgCTivbqZA8U3zMbEU\nUJ155SdHSTrS8Yntfbdflv/EfUnl+R1HGcgqWCluv6haZn4jsvAxguEa0FWA\nFho2spSL6WG8F8OAdzSORPYGe2YATd9EjLtwN0U4KWsaEUiLg3tIQ5wpdlpq\nZszoQkun26JVcR0TWqFJuWJld9aK8UweZn/D9gPlpBefMNXaeXoV2EYwVDnJ\na4X4FTX97LQ/9POO9K5BxW+Q8tVsNJKU6ULLpZ801dbXMtRtoUFq7RVPjGiQ\n1O3a\r\n=zV1/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-bacc685-1597288656453_1597288721720_0.1847489436542591","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-5084a75-1597361127931":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-5084a75-1597361127931","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-5084a75-1597361127931","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ce9ce53cbacfc150cf586becb62bb19338c176f5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-5084a75-1597361127931.tgz","fileCount":7,"integrity":"sha512-FsKlUO3IUmzMuunqel8fwzArqUhlfxOSOBF8m/OX622CVy6tbDcfslZFC81x1nu2x6A10TAr5beQ49YtkVIxzw==","signatures":[{"sig":"MEUCIHD6aeLi/7nBA9BJIGQ2/YMWS6NzsglptyBlMKCI2sy0AiEAiUT6jBNum0pnVDYYeNotPEuzDM4JYme8we16ckNLR74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNcwUCRA9TVsSAnZWagAAtS4P/jM3jgGhJN5Xk94DdQHn\ndW/77KcNa+WhC6ALV1sfMTnGrQgzAQX/ixHV7SnHSLGT3ZtLNQEYHa3HUlfK\nicNO3sSpJC3hwPef+d6IwF3b2GUbgCz53crqU956rCRLXwOXvczPZCggpJwL\nUuXH0Lgbjk8wrvUb2LsgtXUbjxbP7SoHdFYKHhe25SxwHkle9vP3zvxG8pWe\nvhimeQRL2TxCitz6KqBy5h8srF6yxQIId1rvWbviyeFIvPqGLJEH+fObJmRZ\n4c0kzZAV3wd6sYUSCx49BD4j0dG8aWIiUDlZb+LsigFYRDa5RxDJ7mP9eD1B\ngc3uLYE0Uivk2wtzEb1XAKaywfwjT9/i14kscYuBaSavhqboH+erJZkbNOdS\nlBkvzYFb6TomXqGG1KqBetfKRJ+Q2yc4xlTemd+dfSAGBV/5vA9ergxUbsBD\nnk+uZ4Jy1n4YGgSn1BfjmhnVItTF1jdVaPNuJ6HZNJr5zEe6A7WOflJfddoY\nTIl4cYjbsP9YwHh1FbMAZ57oLG3EjbU0nh8xS5jcnILKI4LKL3iL4R9CR/oA\n8tjk9KkToKQE2RfXG2Ta9iB1NsXAG9ciemDWnkZbgyjGR3Z6MoElrw8Uw1Vq\nz0DHcHH9yK9FoNgHuelPmhoq9VyrE6sCZVbNmouUdYDh4TBhBq+Kj67H49aX\n4Oum\r\n=he6z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-5084a75-1597361127931_1597361171717_0.9358062282326338","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-5084a75-1597361125762":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-5084a75-1597361125762","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-5084a75-1597361125762","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5b2e51ff2e2bc2b8d1b4041d14d25c0216753514","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-5084a75-1597361125762.tgz","fileCount":7,"integrity":"sha512-I5hvx4iL+jPxH0jZUCMFOwhpiDdnBdV5ZDC1IC56VuKL/Kqac6pntDqIsMc+k/A6OUhWEUpInH4Q1jqZc/ZFfA==","signatures":[{"sig":"MEYCIQDRPR0ywPS2E/NDB52pi3/W6vFLYP/dg+mWJCsuHRMNywIhALtRyjX/H7m6T8FtYsBlZl6Vfoage5tv8jX+2GCXgqjz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNcwjCRA9TVsSAnZWagAAcYwP/2wKUoxeQTDhyX5tSGd5\nzG3HfeXOana3dkFCErbP7J5IUjkpHAAKx5LmA6aYXvCb9Y/zm1DKiSDg9Ap6\n5S6eNleJNbmAgzzC5TApY41jkaRb4UwTVv11aPzrc7+1tkSwJhLbJ8fQ8Z3s\nNXqkJDrM5AnJtx1kh+HcLBPsZs5FBin4tp/J6yomjRk1MXuPY8rbDjWfEEY8\n6zVOz31sESOgm1vei5hwqzN/iqUokacls6crfnfq/cOqDTkXOxaIzEWrNMVV\nd3V0T0an/ScgnpFBpK2IsQqLxIrrhQe157yW1DfPClaN72Hcu1qIw3ivSIJJ\nFIXfX7UeOo7jjR7BKmWfk4u4UE66vvmlZjYNmElPwndS/u51wKZNwuRrDPEL\nUyFX6E9hbm1B3QydSq1x1VZe9J2O1eL2vxyFlhiGL/PEGj1T2ASU4eo8LObl\nX8v2Gyl8L9THN99dYHgfijml7YixSDhgSlmo25PPiuokO6xoPqeOmMr61wyN\nK+0jJYvtfoM8WZyr4XFEBnKPq0uBe3hBnhAUYMXtABLw5wXrReME9A4wkQ0y\nNSAipkpE84ArQhGFDxsGXA6wtipvVmGLWaR+Rsuw+0Ja9cF0mHB/151PYmXW\nBodp/Xit8FtSLQ2klMg1HnRizZL094vjJ7MYtr/zj50VU5d11X0HS8JQU18n\nmyc+\r\n=ctrH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.23.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-5084a75-1597361125762_1597361187104_0.8200390622556681","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-4af82d8-1597369491859":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-4af82d8-1597369491859","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-4af82d8-1597369491859","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"677e0a45831bdf6ffc5c32adb5d36b132bd567c9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-4af82d8-1597369491859.tgz","fileCount":7,"integrity":"sha512-O9DSZlN7j7z+CB3LYfz5JrtUSpW36B8WTlSlPlVgaFMZ9jVwlXqxvl+J4ML5IJ+rMFSHeEDm8RSoLC6u/eigLA==","signatures":[{"sig":"MEYCIQCFuti2hrc7iviGx6Kz6pkcXmO8JPCLtP4upoBt1NvNwwIhAJOS2KwEFlRTyHsh+2R4+kRtPFN2p0BHsgw/eez8W2BS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNezLCRA9TVsSAnZWagAAxVIP/0y8jp60OJVEftaJVhsM\nbkgpjcteJUBTFpq1bytMRtNQdhwXjME6nwsAOa5msNW38d5LaBrWhymF72NI\nKzbDLVR2mb5SjaANOxQIVhS5rbh4Ln6mYngqwr6OJ1uCt8s8Nsaf+uUoEWdC\nwavatBkVhkpmix6mBmkOBPlgwRviqD/DDOnJ0gh1jGFCMm1qIvZHdJbvbOOi\njq5ugelnkwV8RdqjbFQ1zVHXTuelG7Km2r4Hpq7FNdjumhjN/fN9bxueEcmT\nvTpebBOy6redofPzb/UEfzjTXmQOT8PUrHyvmnI3SKdNxXUwZV9RLMUTOphL\nUsuE+ILP9LSziNoUJZqGvM3+IDhBTxXgQTg5Qq2LFVqgX/5RMEIs75dKWWI5\nZCF/YDoZ88QP4l4cq9IQF+xv/I4yn/2zf5zMmHyWfUfjyFxob84TBa2mEO74\nl349y0nwGMRBD62lOzUgAJehEsMaePFJ0u3HNg3+ODGlti/ALKBb5pKJi351\nirIgJX1m7NoU8kYRBt8p80NUir/G9cx226oAoyYDhCBiV/bVsf4eYUW6Ch9C\n7PvVkccsTDj57cS0CtaQr9tKpUzDnw5guq0QROe0k7ciR/k0ITu9k3lvxiR3\nY9pfIpdFit3Zz72gZrkSDGgEWyCjLV4Rne3BHQbttuIDdpm8NQayfP3wwjkp\nVH4L\r\n=jcm6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.24.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-4af82d8-1597369491859_1597369546472_0.18131586293093327","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-4af82d8-1597369493904":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-4af82d8-1597369493904","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-4af82d8-1597369493904","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6fc7ccdfad4082dfdc799d6268c68a75d48b8422","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-4af82d8-1597369493904.tgz","fileCount":7,"integrity":"sha512-7y5cKZgAxEXXAKEPHTlTzJC1n0DBFL1d1D1/iiAWNakVZtGmvecJI0yMgVMj32MIk8S8zqfrRCiJpAvRujRNcQ==","signatures":[{"sig":"MEYCIQDX427L5PkQrnyoMkFgOtljgEKIexYqcDSCsi6ExXRQDAIhAJZpXVAgaSIXxXvJbAOzbxb5PIoRUurrv55NBXeqjt8E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNezcCRA9TVsSAnZWagAA9Q8P/R5kqrw7aDV7MkaP8tJN\n33NrrwGHMKKZYOUgMX7AkSMvkiBmH8PIJGwFbAW4moSxmrbVvfDCgZ3zzB4u\n78y4CQ/5QEeaK8DWlIowUNQT4bgIvShFVAate7xgIFU5Gck3gPBt0dZBNq1e\nub2fdPaP+BPivwkfhR0j368W2u141BHWepo4SPgY5M2/dyO0Q8zlPYv+4M6s\nZKL+MYcUQIQP9yDnJyzu/r7RnNS94C2WSlYS/FBQP2mKkuCOFXZx1bYkLQSO\n3HDPp71ZrtN/Hz5WhQGI2crDvshebLycqc9/qUJb5keduiv+Cz2Wvf6DXhuC\nXfHy4RUfZzB9Uw99dmOlQ3TBJy0uDvgogzWswGWyDjkR3xFANECV4qJ2lGUs\nO0129sYVIyqw+fq6qYl6YTonhvozH2wVt12JPlgkMZhmORB87XgfLaIRDy3n\n/EsJ4hVX4Tb0angyW+ZF088C54oknZoG9scSSnrqg8G3Wo/Li9n6FKLwiGX1\nfjiYLLQRHxwvC1id0Xc72sCf+3P0pHsnHL2UZqW9Q+r9atwCvuQccGmbStN2\nhx7ZHFZx/i9nHbSw8hJQaKjLu0KDNI8PgmnIWl7Ni6dyOeRlCz3yY5s/h4O2\ne4K8CeE28KKPXzDenqZFpuvlKCUsRdbFgfUX9qUL3jxEZnJC9n0pboOuLJTi\no3wR\r\n=ULep\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.24.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^14.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-4af82d8-1597369493904_1597369564232_0.6767093297893476","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-dfb04cf-1597388968821":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-dfb04cf-1597388968821","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-dfb04cf-1597388968821","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4fd20b11e215adc2ca70333e048642dd5f681fe0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-dfb04cf-1597388968821.tgz","fileCount":7,"integrity":"sha512-iw5iUMG8jnCrAYo/AFWzZUc9uB1xcoFUwH+FMwfS1jblQJEwfrMSpq99oo294MjwtJQAFXDSaxwt5CMNmX0A4w==","signatures":[{"sig":"MEYCIQCh9SEgB1H7g2NVJXZdMYwrSNrB7WEn+g+WgDHjyOHjKgIhANyb0pVRBLPk8ecrMU3Gc44ng7PskjpS5sxpdxKULgGz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNjjZCRA9TVsSAnZWagAACaIP/0zfbDYPa5a9AXuPNEU+\ng8pB+XAuRBzq0/Pucf2vZfZlJGWotYdb7J/S6O0SnT/3v2BJBRfLhU4W42he\nFS5Ok5Kj9KYNzeUFCwyR+oQ4ie/3jaQayk8LozV4+oxTaqx2H1buOO0FjC6+\nxvZQIzCmhO8Ladh5/8lC/mlCIfe6JxG3fUWtvMHh63RQcKTa3Z7Q3GogtASX\n+/hhN8cTdw2fa5JBXEjtVWd+zcRsfxhkRPIHQFHwSFLisKdesL9/0BV0z6PV\n6OWuQ7In1mHV4FW1xCxKUU4sZZKiy0Tdnu4vgALBXO8AgR3zaahQxUrHjZCx\nBx8t9lVbfbumBBLZEnq9WuVkWseOeU2bv9GV+E2q0OeAAo7/mxH+HCfbZCeU\n5FxOTUcj04AF5wcKMp2NoCicgWo3Iu7gtgNsYbfFerl+7KqMpQmPceJEHZql\nJ+2BwQMIRipwpIq9PR/N6AgppGpAuhS4iomn/8+pu/KsyGrglGdfhl6JWFyx\nsDJFhvMc2skKQNLeWbNrmxVU5DANMT0oqoTPnlIOrM1ibBoSvFrTRhQVKXEf\nezwKGwFRnhZQmPx+yraJq69+1oZOiR5hyYuAsPlDlzKZzMezA7nL/lcAXwPD\n0H+tBWxIuBQnsYgMPYfnsdNd3KZeSUL9/q07yrgO772N0eYmCZMsrGaicRux\ngFkl\r\n=frEh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.24.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-dfb04cf-1597388968821_1597389017113_0.8566751916728468","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-e40839f-1597389143397":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-e40839f-1597389143397","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-e40839f-1597389143397","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"05b6f1491b0fac86b1dcf4d9d7f45aede82211d8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-e40839f-1597389143397.tgz","fileCount":7,"integrity":"sha512-7hCFcBNJ71eNOMS/Zo1jSRNcEIbcj4p5C+YfgYpenkpxs10gqLxbiY9RXbr3IHAvwo2NP4l/xqSyWBNEXVMRjQ==","signatures":[{"sig":"MEQCIBWFZ2n0ei5n39z7Wbcd03c1BGncep7fgJj/tnt640giAiBIDCzL9+YmF1f72zu1b+yRCawLl+OOF/03P2YBlynQ2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNjmKCRA9TVsSAnZWagAAX/UP/iMXsB3dfjcwD7mskLcO\n7xQeuWiufHfZrcTfRh2ABG3mPhc7LFDD8mlmgbbMpjVSnG8TPeEU3UeWZrkr\n631oX1w8rkgIMUffwOH5EVwJMKlwphR6uHwqoMent2X4C0JBxxvwVvAdIZQu\nWFn1YSlv5nyrwq+3xwnVNpkcmizQ8jTSqmw1Ms2W/hO9OtBV06xW/+jK1gUA\nwZMCSnbm9T3Dq3BZv33jg4gmlnd/nOP0lV446El3COluDbDUL1VB1nu5Uzsg\niJHxCsvta7Hs1bKCffrs79g1mFMuNDgMr2dtTotk+O7gltmbWIe3fmF3SSK+\nTCmbDiZs32/eHUmaYQuMcI8PX3hTudy4l2fY8YaqENHhMNFbT3Re+EJGc3rU\nSSrcZlhcd3F9WTvz/9YHtKYWIBamT0drspLyR1MKG+bkRH1d64eYGFTPgprC\nOWNdKLf4p7uX5Wb4SXOaPHokcEhlRSS3LrnF3BXatNERM8eKK0lxYJ5m85gu\n85k6jCHBVZ5etkvj7NFax6Wr3UP2BHu+v24TESt5ZnE90d1sknyf4Bol5EfL\niMuKxS5al6wr8tcVBBXzojt6tssz/Y2nIqXO6rIt8bJ0FYGk8SB1XrNt2ONC\nwewz9Oc0E1M0e5KJO/MFNQBdlQjrSU07W01zWlPlZRW/XnASbkpldok+w3Fz\nejKZ\r\n=ZyjJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.24.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-e40839f-1597389143397_1597389193601_0.8047916705247371","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-aed1a3c-1597400312928":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-aed1a3c-1597400312928","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-aed1a3c-1597400312928","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"32527c7481f32a65152165813145e818947c9611","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-aed1a3c-1597400312928.tgz","fileCount":7,"integrity":"sha512-EKuGZ7lCawNNwEmnHYmshZUigGn3qvom0RFnJ+llBkDllWneRUMK8vUcP9Cc9fX4EOuPlo4eEXsWiLptwvLYuw==","signatures":[{"sig":"MEQCICmo4nl5I/04I65L4ny+BaQTV2uogxfWm0aIe5pAr8aPAiBLucjP29zknbz+gIsmY2+b09Mj2Pbv9wmtWFV5agRLyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNmVHCRA9TVsSAnZWagAAdrwP/jgx5PB9U1Bok2hD26ng\nljjKDkv8Np+En16zFVmPaFlUiYWaGpnb+PEyY0OdNeCDJZ5iEp1K+SkLiDvQ\nbsL1qBAgHStd5CR6AHndNIwFiW+hwG/CkbIKBlQbK+NWuXGgIb/VFyLtNbmc\nXOlI2g0HIbeQr9s0SqqX4tM+tD3/Eil8bNCJtGJcw1vMMVnDV4roitS9aHZc\n1cbJSCR1sx+MYDxHP98rCRRHEuUkh20gq2xcTkPhQFWremZ9rMsxbVNhi1iE\n4EOWMNBqla7tXiKf+f9DvUU305iFEInUiWcobH3yju+03y+K8QDqcHYWnBAU\njXko++/9nnCPNU3No0xFkOvgxNuKqeDXphavoW8jusI6Mt5XnU4v02kvzKQb\nOEzb0FAkJp31L9JwxJ59eOecTU4PCRU/BjrEJMr/RZMwXVnHzAya4UDFzQBR\nw3c4yP6rq+kA6Y3+zhFeEngziWxclvIyk4K7wwL3jJBoJ51r4gxB7WbVo3gg\nuzkgt9s6ttUdxtYPzkh3R2DiT9F+VxtYghkH+2Rin2PMGdiDSXni01pEnjTN\nQxSAdcX3syddOCT9gVazJ39VR1aE2JMSR8QkRQCg6e2MB91VEIKaAPppW6PX\noWyJ6zsX978x07Xnzdqh3XCea5bEKlOjC5CSfA+Gn7TCFsyXBhPNhINi7Knn\nofgd\r\n=FfSV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.25.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-aed1a3c-1597400312928_1597400390488_0.3232938365973428","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-aed1a3c-1597400310359":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-aed1a3c-1597400310359","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-aed1a3c-1597400310359","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dcc34fbda549c49eae4eaf51410bc1e037857c59","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-aed1a3c-1597400310359.tgz","fileCount":7,"integrity":"sha512-LU7IqDZ3q4uCeyxsSRDrmF3FmfgjrOMrh4RP81mPl4DBBRQhVx5qHZ3ye+gsLKPGn650lwMcv7tFKBJmw5Keaw==","signatures":[{"sig":"MEQCIETY3XOYN2dHwawRMTbwBXDSDtYP10UgLCqd0ogLrRY5AiA/JLbixi5x+2ImkrP2ZslUmoVRgubexgiAIcC3wAutJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNmVvCRA9TVsSAnZWagAA8+cP/3QofNuI/S/cQZ394xMi\nAIXghWrg1wqSWfAnKH/FTyDwfyXiCu9pMXefe8glEIkl3wxKQLbaBzUGQIHQ\n8qODED5zbT+2DR0NpDUcvtFGY++wo9IpP1ARt5yq6ZLdHJ+aJUpyMgOo75tZ\nBU0JqMTZuh26Hj7TQ6lQ4BNg34l79ASNYEhprKiInGpp4VUwvd6j+VjFD1pe\naMFK219fUschQFdst+USg8rfC8xOiEVs+JXTuWz85fwFBoH8FTOF6niRl80g\niTN09iBJLgPbfsLKeuHDXsgQqvRzNMP9wnS9K7+5n0ztGAQX/WWFdUig5Tbe\nRaxr8LhGh+1+omsj03WRP5xO4YlntzpoTxzpsox2yon8dFxNRxOLUg1it5jm\nsa6alPsyaW27qu0qyzpHjr4x2zPVZBi9MXzNX1/aPyLr+sCzweNPdx1xetr5\nCWfRaQde9LGFBQJMsgGVoDbnPDZlXFIoAk//KzoijvyJFVmwjcOAdzT0TEoS\n/yAe9IUMdCMw0kwsUgdWhAhb0sqsdyU2Hd1hps9P9pTngefuhk+VerkcBl/G\n/leFpvk8jvJhn9nqs2zmh9aAJjq336wWmjhchJ1F6woLPFEWq1nx8PZq+ex/\nLDs0C5DkK1rfrRCMItl4tagNtMDZ2YNbrDDaRx/a5WY7evkQw/cRdahJ2Wk5\nIBGl\r\n=Bj8n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.6.0","rollup":"^2.25.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-aed1a3c-1597400310359_1597400430571_0.4396884296700807","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-732d4e4-1597449686868":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-732d4e4-1597449686868","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-732d4e4-1597449686868","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b2c10cfa6e88b7561dcd2da0fd4510f207691088","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-732d4e4-1597449686868.tgz","fileCount":7,"integrity":"sha512-Zu6dj3VGdIYkRnzTFqYa+Aq49krL5dP8aNNicxMhRfNKUqq0brAm4iXAC/GzQcq+aQcHvxcZrENLDlTkxu2Oww==","signatures":[{"sig":"MEQCIDp0GKtUOC7Sm7LSPCgBZLgA/22kzbEJX7plH7pcBJqOAiA7ZJxWVgchkZ5XbKtBO2vwyzPszkCa1Owx8Qmpxm6T8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNyYFCRA9TVsSAnZWagAA5XAP/j+QaXei8qdZJACaUOl7\ne62QL2426+PHoVMd9nhntDMljK/zWyars6cGJeSdtU6mKIoNkNPuW22IG2M6\neADlURrtC8ZryfMdCovs5Su3y+zLDVxrR4RwJInm+TbcN76MXZEwX2yg/M/r\nrcqCmZFzbxagIgjb6fYDaSLZNGuxi+6imqstMEp9eVXF41/uS0OWlRPpAVMz\nfIB7smbngth3giaO0rzGgOcX7eYc7VhTiBBC7LynFMZK2lf91grS759W35M5\nBTvPvLM/xbYdbSEWSj/VXZ6zcgpOBnHaYhjy6VZWuvxNB1SURuY+oEnln3wy\n3ImUACLxAqqMiOcGH+BX6AdFYb+nPg+fM/i3S+t/MlJnPxcIx81E0M1H3Uy/\nMWKI+bJDjJIiAbAU6bBxBDvrHm2LdhHSEhKYDzo6SpEVVWumQm+4VoK9j/Cw\nn9S5JKGFzike6nbHRpT5T9FWEvFpalb3xzPRhK97KZRzTprC1CGEAC8MveUz\nnbahgSeaAE9VELd6OGzlN3HKzKyXcIZzIPJ8+knamO3tWFfUH0S0LoRnd99I\n1PXjCBRjiNVv/9y4E3UDNZ+w9UeTB0qEZ2Sl/C1r1hMEHzv8LeSQtjl3O0EZ\nuDe8cA70GgdqJjUdbvegNZdPq30Huqas5X6TpOPG64ji4/yZw6PO9gWwMwOn\nNwgr\r\n=3CgW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.25.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-732d4e4-1597449686868_1597449732946_0.7445097993560432","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-732d4e4-1597449692034":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-732d4e4-1597449692034","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-732d4e4-1597449692034","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5b453fa2778856788be1542f5f234a07d7da3210","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-732d4e4-1597449692034.tgz","fileCount":7,"integrity":"sha512-LE1/P+B7F6Jq+ckeOF4fswGHWiJ0rrDYoYVYQZrdu1UbXD7PrEk+nSfqckIfuQNg7cyNIxbtejtCQP7BkF/4kA==","signatures":[{"sig":"MEQCICv0w6QbAa5Xyg+l4bWP+E/BWWS98/splsPyp++r9C5kAiBT3DQgQx1XQQtiQhUD390nGi+tdV8QbMPcx0/dBDSZwQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNyYQCRA9TVsSAnZWagAAK9gP/ibjOJiB28X3GmBC1jYw\n4HcrRspxWiiLlGZXTbwBPUEV63tFOnLsU70K4WIM/XE4v0MJ49nZqON1oLUV\nNrKKONgH7zJGEdNup0GGfOMgkyiAumVlLi7i1XGFAhPpjJgTetvHLOxXLOUL\n9dciaxQiXWppPMSIdQBmM8J5H9ioDAKWHOpnKGwwy8UsHQZ8poTfQheec9/R\nt30EouK9oJsZNlkN9OIIQfLFwPIhRfo3V5lI/dH8tOg0z5Z7Lf60OrEi7to+\nDBVDr+9bARv5pMNV2bceIwxwX2sc/g9vGxch/RzlqA/kS/zMoI26c1qUV5TP\n6ftUc79kDy5Aw1kl5nTyiWREBGkhPemaOPbKTX3DGEFVOO9oSM5Px8EPI1je\nfbc+iKBRD9pmUgiUQFabFr3igZNLSuB1HVKaMPfzFUdm8XgJFVQAxTAW+2dF\n8OHTjVAFq1m6CyfhdkgjFPOuSHPo4noYWuLn07eLp9Hz59IK9KG+ZI6pPW69\nFTGY7xnZpcKI7d83TaHdGVM9+xATFymt+16PfD9bj0VT3VGw6MS6dBWmzkTZ\ngzaSUVnVDcvCRXrjVycIFZ//YaU+g/0J0S0kKzMQshLGE6yIUCauqFPVCmJK\n6KEDjPn7QAgkw/p3iW/x9nXDA25hbrzhZoPARc+NDSA48jsabg4tkqngmlc1\ndNeJ\r\n=BLnb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.25.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.9","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-732d4e4-1597449692034_1597449743648_0.7768054784189165","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-38da98f-1597457626327":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-38da98f-1597457626327","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-38da98f-1597457626327","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"24d37bf93d1f25c9adf8b62c2f3d0a13899c1423","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-38da98f-1597457626327.tgz","fileCount":7,"integrity":"sha512-gg7VFdoEztHKl6hSPeDcRZr8s/SaemNyLtWu8wOpXMJBxIIxWBhHUUmuviVue+Oli+vOCcoi6x73c6YHZEtbXQ==","signatures":[{"sig":"MEQCIAIrv+jehi9I36QhO/WnzVH/OQfRioyaC09UlpTBsCWeAiBZO6WBpETXG+JBGxpEk24xQdpBEFyjd8/InhDqeINRhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN0UJCRA9TVsSAnZWagAA6ocP/RUmzdYqg/iZs743gfpm\n17F30aae2UF+zWzz1uT9yr1i5t2VmrQoT33Y67orgDb3xG3tZeY39uhtLMXi\nW8oyt7hqej9GOYLn/CyTRPCZSZFQLgRbnHYlGg8eKLRj5bgGsH3Ok37jYeVE\ncUp/gq0nAP0DrWR63Apq4GU8obcPLLTUkXMlGTkQk+DLdj+Wssi71s095Mnk\nXm9Hkf6w8/rlhgy/C/Yd7Bgb855RfCqs4fU9sQRlRRyt0pBaEyIXxQs7w0vM\nJla0T1dg786AAnaC9CcHr++KCAcRF0Q5nxF4LxXDi98jZ/osfTC+jECTgF4g\nn8RtClVNlErgPm9x1pIuqZ+dXJhsWqsIwdcGP55+8NB90sNwQofW8sSzFLOn\nxw/skaHvU5zOzZIko7VMeRY5eUFxb8bJaigKg/P+EG+XVYB1p/YeUsr6xtQX\nDrMMdj123QNV1W3QCGRdoJeH6EvxwAL0be8kI/RKHAapfhWqEdwoHGQ3CENq\nHeOJsx2rEXq0sRgeF/cA8P0RDs4TFm3uPjnqv1UcyyOTouN9gIdWwV1jYBbd\n2Oi4/0D+5M10z6t1/rmlTIiYIGrQjFkz7X6XmzTbavDhWdsKuNJLT0wNRKHZ\n4mzVv9XiJzHI0347sW3GldpBXbPbcK/Y1b17BBCSBwMUCpEgxIe5KcoBXApr\nnBQe\r\n=wTkr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.25.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-38da98f-1597457626327_1597457673046_0.3004303388330889","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-38da98f-1597457773395":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-38da98f-1597457773395","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-38da98f-1597457773395","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e211b3f417899966dab80ec64452daea0284ba38","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-38da98f-1597457773395.tgz","fileCount":7,"integrity":"sha512-zggLtJskaVyjAZ8Dzpg2Wd4fhRFVFJKEkZkngVMQkD/QgDRu+NcD0+yqPkU0RndJZqaTezhWhIds/HPpXRDPRw==","signatures":[{"sig":"MEQCIDBLSd0iJPed6HA6KjQZotisNnqjRV2Z1tFPrm+6P9axAiBCKYEZq+wTBSOBjiPLufw5KKkxNvYnhZbIidRk0Op2fQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN0WuCRA9TVsSAnZWagAA8wUP/R1YeAetMQ3fFqYprpt5\nenMpftUeTihfgKJrvFFmbS/OveVk2S4umM/qC8MJsDcH5oqfV1FJD6uc9lky\nedR3s/CZRJRcoXU7QWJy+rwHFdbKN8sfICfOi/Eqe4Y8sbxGPkyi5v3HHj2M\nFsSPB39rIVJTjn1ebiT8O4xTVXiXJnbBdyVTClwP4d+0v+cvdDf/qk865Fwn\nWmXTkg+vwT8/7Cp7guagioxOMuzyioD/4kZmK55yWUqVXRy0XEEN1n1YJgED\nTGTY3uLylaoFA0rVl6hJTHPSyKAHfePxKMqlae4ok+BBcYnbCT3e8qKRyrF9\ngHo6VlP3LLj4ggS04t/G1BFQMNmcJAaxOe8XZ34m+ARxvkjp+cuK/20FISLg\n/Quxsu2gKvrkCcUEQ1Bx0K1YLo7lbjOoKbDPzOdnvzndvRPK/otWCjceeHNt\nN4l3wT9SerJ67wm+v4lWTAs5epCXs+49PRxF8Tw/dR2QtJ8sP61oV+4P6lks\nbr0OJ/5ZSBWIRN8vVO8HGzNa4cod/btCM44/wnowHRUaa2KtcONPzJNt8Blg\nWRBaSJ2YH4F9dx98pXpoA9YxFi1XQDgIttlkKeguklB9ccUtXRxn6sKak8dI\nWBjcKgCC+zAUAW6kEnOEqSfe9uahCqbZpOQrtnDD4E9Z1Dqf3FdPco96+d/k\ntV16\r\n=eVpY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.25.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-38da98f-1597457773395_1597457837788_0.05638934095311954","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d158b76-1597467256217":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d158b76-1597467256217","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d158b76-1597467256217","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2de4f5bdadd27d4aeebe404419ee27ed2e9fb68","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d158b76-1597467256217.tgz","fileCount":7,"integrity":"sha512-xGs0x6nOE1mttiFpBvG59NSyEbkoCNClBZnloBb+tRp2r+qvKa4CTa/OCSLUnhE8aKLb+6Bt9uGWvQeVSDsIMg==","signatures":[{"sig":"MEQCIAEloQZIKQCu6Zq+fnslrqZP4j63Y7KMxJP5wVLavD8fAiAPAJG0BKFkI3KuCy4iLP/G9iZin60e1+DptzzUnCt1XQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN2qmCRA9TVsSAnZWagAANyEP/RlB1Ag16O47/RoQyzRH\npFGz3xMdpLudX6yMi9Z9TUyJjb4+GBLSuyo9nLlvA+nh9zZTRjS+7lIQHflz\no9SkNpxV6/YZoMSnebEbi+3Opc1dRCra2eimRr8BLfrouy5APjQYnvHtLjf+\nuHjxbgKdsSksB1CuAaM4bBhY14adIUwANo7H/965FBlefFeyx62wkIL7xCuf\ns7oFUib8m3vNHiUA18LGaFt1NejU4ZWf2oW9kqHDDVgs2SK6VCFz333dC7VZ\nkumyDMKcnci4V7Ho9sEl//wrt8IZ3DkKe+LIBidNuDUYoNeXCQz0dduIjfwj\nz92CxAD5rkTbF4P/nSp4wQqaDUoZ8Iw6xka6CzL/CQcxAc3yLnkVYRIfOaqe\n2Q3RRlvb1bt9kXkgQSYMAHykH/bsFpxLYBLeGNCHyUAgo9YLLtghfebVRlv8\nmTQlTMbDZeo7HmlbSdNEnxkNj+iLDV46fZMycSp6TWjUZYx8MZLStaR6BJRu\nqW7TBhN9S7VWDijPN0DHeipbDCX+59hlj8RvVOWHQ1vj6rD4EUfDIYlr1XfG\nvYxzqgpHs8TwJ6PYgAlLp1tLpVEZ/l++KGpq5VD+3hX504G+R5Nwh9cSBYo1\n8WoBBkdnxtrw6zYD83BmTrmFD2ikWe/SeESIrKvU3BKjIdsbgn39HYSP8ln0\nH3nx\r\n=/n56\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d158b76-1597467256217_1597467302107_0.8670059440252516","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d158b76-1597467256157":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d158b76-1597467256157","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d158b76-1597467256157","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0912b639757766bff54234d231de9124b5db8ef6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d158b76-1597467256157.tgz","fileCount":7,"integrity":"sha512-g8p7o3Fq1/66USR9YBU/wInjUN6j+GkaH+N8D0RALIaEQUFG4fx0lCiYqj9aNLUC9lbQlmj2qKOHT+lTpJh/Mw==","signatures":[{"sig":"MEUCIQDvASkBR9AaPtT3+A1f49G8onnoif8Fgb+xguU7l9L7mAIgKZGr4ruVj3/xoqIjWJygy4EDLzGXr7TJz4tSd2Mml+U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfN2quCRA9TVsSAnZWagAAaMMP/39uFI0i3BC8N95McJYV\n+7DMLdfuJ/uaI8HHX02ggtc+eU9RdC4JCdTcI5FAde+QynKY1tFfz0ov+T3r\nmjKhhAz/FptemtK5PDanYTFQ23emam39nWfGux3QLUz8M+7+5Qv5ezglwVwl\n6sLKcw4GOJXmpe6JU3uPdffxuV7h8Gx75k/GJVnzSGzEp66zYhlmsa+RIwXk\n8j60+zv/yv+RZSkW69XPbFfG2RyqxjqIosysDil7rPJRincBdW4UBTsx91VH\n+6F6nRFvecWKBxVOLPTvFBHGKLxUsRXfbFKL8lFJka+32LevNlJEsC17F+PL\nmK2vd2oV/XLpejDKer99eBl1sjngadAIqG1MLlkIOGDfYCe1qjPUEqqTSVLU\ns7DJQxmvSetcWeHd52cgLFq1wljpWIk4zlGJTavDMPNGGS97BKFITzyGG1sG\nEhy94xB/yI2DOyvmwD22tUJk2bqJBZePx5LNH3Py3THty37ncHgHB9LAWrFU\n7jwmRO0EK67oGGkoYOGafzSTPMIva6IoiRuxDTyHuMWkwwaMz02DlPZRQPG5\n1HsRFeRA7qGui0FS15eQPtge46UA8WG0v6apylurq3qcySyeTmOdRlH0yzX+\naIT2Ckp1vkqprT87PM1bJUTumPD6qpubmKMoiJNNbhRai1iP2+mVhJ3t8mtT\ns92s\r\n=isf5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.0","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d158b76-1597467256157_1597467310241_0.024681316287014976","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1427c1f-1597553668258":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1427c1f-1597553668258","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1427c1f-1597553668258","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"81d0ecf3ee2f715e83ed9c7091577eace7955619","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1427c1f-1597553668258.tgz","fileCount":7,"integrity":"sha512-Ts8t48OKTnsVRlY/mGjghaENWYMUoyvNzqOXdrpPHbnPSHsUgc95HPO5/HQ+brUK4KH1p86bghZZxzttZ4cPTA==","signatures":[{"sig":"MEUCIQCkplQqngteE5mUsAwTSDNCWCcOiKR/Etbot1SzxAyqfgIgbdZJwKHhjojviYTozDnJ1IZKfAzdmeoa6hTGEOog0oY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOLwvCRA9TVsSAnZWagAA5s4P/je2Y3HZXSEA+hceEBde\ntFHzGohICD8hipRr97D0yO32tlJAIf73hv7Aa9g+bjqYcc91BCFytWYsdKrG\nNDnOr5cu6J3LPLiwlcFTFCXBR2XpTcb+Z3Gbi17ysllDRe/DNhNYuB/akf4/\nwP4NoIMOLWW+9EMDnQ0Ljw+ZJkCtsomI2SE+c4irfHuYg0Zu4QLnjX/ijFYl\nxPPyjhPjwZWVHeXW18KmlQ4Pkbnip2fhVgn7uoZszdS7osfv9AHgBJSca/+9\nzKbRNgdeXj0GzMQjZ7DP9qCvya+PKKFkDdLrC+1mhi3B8DRKvr9SrPpeKYXu\nSsd72hmpZ1tMY42EYEECFz/zvNeXiwkbeQDyYriFdP14BcLY1OcHmZJ5cQ2G\noE2qke8M+U1lj1mBNkbixksvkGTl9aye6cN0P1D2QpPf0XYt8Q952ndOQbG7\n+1x6AvMfZNCsWZINfEC3WzCxAZ8NTGjep1p9DFQgFD14I4cVYuJ9mWv0PuF3\nFIAVQssHgE1BKCBxU2lSwwmMCG+DSUURqNFXGsvvFZmIJHAP7nYDQa4t8E9Y\nFGLw4OxMZu9KI9qUQuYpUzRFeG60rbJKjZJkHv0/OzpFZg4kffQUWktVH5cq\n4cA1OcWv5gcDXbxjOtBmIeD+n/CzEbgogGLypZtYXttypoJsjHCXxBBX8s4a\nSIJj\r\n=7W05\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1427c1f-1597553668258_1597553711181_0.20299328556484908","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1427c1f-1597553666776":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1427c1f-1597553666776","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1427c1f-1597553666776","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bca0678976c37ee64d22420393938e0af0054bdd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1427c1f-1597553666776.tgz","fileCount":7,"integrity":"sha512-r6r1+5DFr9dqQG4XgCqSSp06Enrd8xwBKrLnT2QXgpfMkBmBYmS1tRVPaUWsBC3NAx1M8zEnsrk1J/CsXZIAjw==","signatures":[{"sig":"MEUCIQD3TvBGn/AoBZoQ2C8amvTsK1rZqcDpRWK/Bqjfy3M+SwIgKcs2TdXWADq4JZrmNvbisfIFM0PMO59kYtQI+SUwas8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOLxACRA9TVsSAnZWagAAdoIP/3qRCjaLL8s//nBwfwq0\n/Lys1ufKpy4YnEle1kRiK5He29Q5sI/wcU8rwl+VGU1WjS+VLYJy4U8MR7eL\nG69rWTRxL9AfFbsifDaBsoQE3bF1WHVCWG8t1vQVVgjLq9fdTG0zN9YKWXtR\n2RG8Lf8miORh0k7R+k6ve2OO1TyCkPolUSNLRnpxC1V/iYxCmA142gXlzTC3\nUmnKJroxUGi6ZJA/V+K0rkDiiou1rNaxotSxbTX+SF19bkTqdrinSOFp3Ggz\nVXurz9zXmzVT1abTVaQxgBQh48Pf0Rof1ZN5Rn/xTjy60h3qtx2jxw5ZaeZZ\nkI/NQXZcg8Y08cyZNzu8/Wshj0I73q2LnQl8gnDKRKyLqB9OztXLCoh0BXbq\nWZ7U2w3PpAkv1yp0/4INiWnOoKNslVUUd4IF/wum0bglCqA6YciOsgKofZin\n1N5ylNoa9c8hZtIMU8ckQ3od9zHjnQXkR8yyf2FP80RrLBY09bMQVwlz67Jn\nK1VvHjN1GGHMgSTr2RRER1b9enZO3mgn4UXG+mEVCbB1EXjQRUW3wrufcbm9\nXe7I6q1PC5Q7URw2Jm0EkvWr99jbAzI+ngvn2C4AgbmP82sr0/GsM+58/R1a\niw3/xGzmjoE4ZvLIxDVbz2e/v5UE5JWiL/7G4X4tOS3bZFeFM1w2fpcfFGMf\nT3Bd\r\n=rgTa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.1","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1427c1f-1597553666776_1597553728200_0.24710767976272363","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-f9d50eb-1597557860138":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-f9d50eb-1597557860138","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-f9d50eb-1597557860138","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4be7ec8aff21ad4887d58ecdf5378db47ed7625d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-f9d50eb-1597557860138.tgz","fileCount":7,"integrity":"sha512-gzLYoO8Ux7kvLYdtUlLYGwY/EZe/BYeBntwrBgp5uxYzPPvbTS6mq9GuKX/xOLoArtfOTInJm/bHyGhktIEhEg==","signatures":[{"sig":"MEQCIF3xWRF4DuIZ4DOm7LwuPjAGFw/xRWGs3uXWI/1COIViAiBi27HqbwPN8zO2UTLFTmFmv1pbG0nkiCMOrbKw2rb8/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOMyhCRA9TVsSAnZWagAAX9oP/R75D4TkeSYEqjNExWAF\nG6dVLUdeDwfTvgYI0/f7TVsu8BtOJJvcVDQroIS4sxvFK8Eh8XuHspaWtcWY\nOBzR+qs1hK+2ypDcHUz1JzbAmUaSOr+CDxJ1oKkr8+AY++h/P7yEC3NUuAzR\nLCffxvZiZumMyvbAL8+0W7DX+SzRT+a5FJC2/IQlzn0er0nfTL6BH+5xzUpn\nWyK5JJg7y0vLWxv3YdRFD8tEkzD6+dZr0lnkDyI57Ao9+AtAbWlku7KigoY1\nOsci6tJnAoX+BK7qsCefhwUfoOdYdqcWYfNOKHP5zDNSpAOTK8SSNIM5gCdh\nVBbAVHPwvAd7PQk54qad5uesVYul/knFwPLiwe8JOV82QeqP2nWiUcAbHL0X\n1lIwpZXj0Fls4meduf2kB38fMjpEmNIjRIXqA4ryGmlh8PSFS4PqD4a28/cr\nVnaAisCBq+f+m7phw5DFD29UjA4WjQOwboJG55Qly+HlqTPWcmZCnDQAK4gf\nfGKRCy27FVnn2PDj0XCfZ2uKgVKJ34MFrmhXBVzjr2aAduBn19XbX3O+p50b\nK+0CINOaxPXV8hvK7svGybiWIZc4XlmRbeZdZ+6LpxF/LHUfj1DHlKhST+Ij\nEO26YTir26hcoYHey5Phr+4+VIkXbE+DweRiBmnv3PhoTP35o2guwkOQFsRn\nHDQi\r\n=itka\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.2","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-f9d50eb-1597557860138_1597557920717_0.47494944686800533","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-f9d50eb-1597557955744":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-f9d50eb-1597557955744","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-f9d50eb-1597557955744","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"57893e38cc01bad36035aa1c21c0ac77998530cd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-f9d50eb-1597557955744.tgz","fileCount":7,"integrity":"sha512-+PuQdvdKkZnWoNZL1+tMzJCKXdSKcsUrafSaOiNRL2cu86uv7GtL+FfrPhMSB/grV1YiuVgP+/Cl1nd5l6qdzw==","signatures":[{"sig":"MEUCIQCZlVUeVl9LCPFYx1qU0bsI9xxYM+EWXc0482q0xEoXBgIga5hc1EuPPDxcaOAYC2+yQL2CZvWhV4xp1lnCHWe+VBk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOMz+CRA9TVsSAnZWagAASSkQAJdLKwRFlQHtqtgyNElJ\nhHGRaeyCEfahMPHvdnWiuJzyYaH7ebCzVqxHTXsVJiVXFtdv3dM4N/ASI3P0\nz1zY1Cd6ei1Fqa4jGjlayfwJm1Fil+qcd289FfgMbQwsg+24Uf/7MwWiFh7p\nedVimUS7UJwoDp+4O++28WArVXhhFCHogF7BtVgXe+aHAtoMG+mQpNoffJmE\n8w9ULXqCxdODo2YDY2FDhM0aoSXa/KU3rcYrMI8Oc75q5OMdzS0PJKG38r4S\n2uCV9JIe1k8fejo7+qy6Kp4Ho5YemOet6NvXCAB79aa/KMva4MGHuJNUMdq6\nHQPpU6hSDc+H8sWgu7aiiddbMeHtG5MbaJcxcWQzuGVLZSCCTnlPaBJ7dtdR\nl0J7PZybh3K2go/AquYKqHJuQA5pMh0h4KHc4Es8fKm2LitYtnhBZ2gUO+vu\nUnYMoiDjmlOU0BuaMyTejVcZnh8YxXC0xAu6U5sKhyDu23ubPBT0Fj/oWQNO\nadyjnMjX8/WoVf2ONGIcZSGTEm71seyiRdyNUezZs57i0GOCPeKysrFD0BvL\n+fjsjjyF1DOBoHJBcFLqVaELm+Q6Fn5iunC1yrnE2CUVV4pvSvy+skulMWSB\nG+9KdXPZKNQINLJ5ES/yqjOgf2iFFZgq7pQKaW10ruJlKX3nM5rA/nSCj2YZ\nJIR2\r\n=L40E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.2","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-f9d50eb-1597557955744_1597558014313_0.9744861371593088","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-c50c149-1597607686255":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-c50c149-1597607686255","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-c50c149-1597607686255","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"19624dfdd49806613c5ac0e6f1e359552666b22c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-c50c149-1597607686255.tgz","fileCount":7,"integrity":"sha512-TxCa153MsEc06Aw6R2KcA2qNF7GvtGnInlDZ5ig07iMRanCqplDN4nSaos5xaXp9Q3awheMG5GB6kzQ86CxvJw==","signatures":[{"sig":"MEUCIGa6s7YCw9ySD9hZijmZUhGa44qBj0qP89zlQvGweAMjAiEAkHu90oPfDaHtTA1XmBfXRT6HICDZzZzNdnlDQppdiHw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOY85CRA9TVsSAnZWagAA+3wQAJEvozTDFk/8JziLNfkt\nIAuP849HKmgIjMlnKhUrR7Z31nWCF0lCYIIpE71f/4eJ+qQJv5Vl/1YXnNPh\nAGyXr1TI09C2Yt/w/Gn2LkHLyMRUsqJtTl8nB4SW89FXpg4q/lu2158Bo+Qc\nwyXihZKbm0cSkg45dAKZSP5AfPtYSnObLryBMj1/aYtVCIhFnEbXtcKz5cow\nPkbV8Spe3jHY7apHCVs5NZu1AUxToBNLO3uGOMu6Z7NyatzuzpnNPLSEJWsZ\nBpewMvG9g0rjnwo1zvaIdT+lvP1es4e9CZM5oHRCtjvUED+LJ++OWg0qymBx\nq6oMCico23G/Db4bbG8NjYR4LHmHYCIZSLLLHhw2PXLiAUrPFdH1YeEIMAUM\n8GYwoCQZiBSrglW0+0LQtCz6j7DuuDlPmmZcnSLC1V5EL9Qsc+QgHqzXuHZu\n2TYBWXgo9EvqF268dL7SoEeu7jI2XTguaKqeXbb9vA61zsL/5LWwKVnu9HYC\ntbgPuI1LWpTSoeeAt4b8xyTkSdOnvBvOpwkyTLhp91uYiBt3J2qN7EY97mIZ\niYU1u5XXhdztvIcTFKFL8fI9y0qnjCfqp+0yePQE8sW3y3sJlfEMaEYODOxL\nmk++RSxq6vsXEGJcQiAhI/UKlgW8jntkFrpZMWsMJM3NaZ9n7EpoPYK4C+T4\n4zCf\r\n=i8ij\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.3","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-c50c149-1597607686255_1597607737360_0.7674436121499557","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-c50c149-1597607688237":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-c50c149-1597607688237","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-c50c149-1597607688237","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cbde1ce1f296f14899a6488c3881cb114d2f3dfd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-c50c149-1597607688237.tgz","fileCount":7,"integrity":"sha512-wGMi+RfDGLX5/R3aQRbESWZZGlGiyUhXy/tgkNVJkyJdziLDRMH4rGLHQAV99rwkOOMPTd4paLqPljLAef3z/w==","signatures":[{"sig":"MEQCIEYioxFdk3w6oJU8s7IaRS8vNaL7vKMhyffr8wkWu7iYAiAUZ0fXcYWoIh+Mr6O2ZO5stBL0dNFUs90alyRUcq9ddw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOY9DCRA9TVsSAnZWagAAwx0P/iHYvHxHTQ1dk18ArSkr\nVp41ZRRyGxzRfJxsYfHIazktqIQsNz+ZKS0mTXNHmaO9zi02aJ+ZdQgJXHQ9\nZEPn6hw3mki1dX9oCEaZixiZfbTZLCAyY/FELMjZ3wRk01gioEsySexp3i4A\nZlsep121uvDuaM5ml5CJkYnedNrEHlKyjdc6xzRoXhkYFkdRik6Yqr95bRy3\nw9O1DxFJBN/hCzihXlBjZmCYvUNdYEb7bI6U8VIKs74vlTj+y/KXsr9N98Ap\nyGB8xeKnnia1/1Ef9Ln3SZkcIMDS2/UISgMp64PMEhsrl2W4EBefQClkiNI7\nbhRDOpOE2RsALhyIBHt8BL+pSA/YvqomYUMAvanmhTiO08TKaiYc+l6ZCjtT\n2RNTMWfedbDKh63RSLlqoa/kwKkS9B3FVwk6tnwfLZTiFU2Q07X1eFvxhI1n\nb4u39ufSYia7tj1nqMOXBs1sTKsDbeove787pDpYOZTRhV/9r7F92Dmz7l8N\nXP/IzePTYKSqMKve77QEFgsh/y/MBiq+r1JJIHl7Y6RCDWpYkHiRS8PDngkG\nsxqvC+cG4oewHyX2lM/7+c0+kMZ5eMHuXYg8e93w1C9qdlgletVftLVkvCi+\nVZf6ftwNW+zBh/9u1rT3UPVCkziSqCg587zjPN3+opABG7o1EL8rZv4jhi1L\n2dXP\r\n=XHH5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.3","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-c50c149-1597607688237_1597607747259_0.6788628479159304","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b9d2578-1598079215202":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b9d2578-1598079215202","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b9d2578-1598079215202","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a20604f26a06ee16508694f2ae3f6b0dfafd0468","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b9d2578-1598079215202.tgz","fileCount":7,"integrity":"sha512-U3UJn1ctTpASxMRtDbXbI+fJ2zbxrpXWqe8xUBCbro/f9CkqpLBQlZeZL3mthXXADdZr/BhgtbtYKdZFqJ5wdw==","signatures":[{"sig":"MEQCIDRtI8zL9B8yh+1J4/e4VM0u59gRfgA9KmjUEjHy+WKeAiB+0MNyAJqxEJh73u8lQDAuAssGseMcBq5Dss9/CrSV/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQMEcCRA9TVsSAnZWagAA0MIP/0hzOYfLPg1yOjJE10xM\nq68YQVDyy2A/nj94ZikayKh0MzzrxcMm/31n8uxY+vdwq0+hiFtqJkTsE2h6\nakDoeG0ykL41HeOD60j7IsVkQR+TsEbAeitqb/KhljPTGs0PPMt0dKKhuaVE\noGYI6ckvVLctwxtiP8S7KZRtiVE6M23ruFj+NWpusg0W65L56vMA63Zw1e2a\nhANZCWoHlJkBP22NGmzrQAc/5IBe7xg4OsiWj2beQkEJXtWoLldZ02VjU343\nomekMpp1yhRgrDr3JSBim9y+h00llg0glCFEpI5JTMfvZmZaIKUPk5vOEXt8\nDL3sboTfuZTTjl9pk16OiG1NndQd5sWjq4yrKSv2L74AFcf6Wam982FcEA8B\nh/6YSy7ShuwMIp+TCEwmlgrIqmA9r2OhG5p9RjGggNtiZn0QVyoe/DmHVJgY\nJs09DBNOEiQBe77DgHZYFotA86NLpCZP8Dr7kHeHQquZGFOIeDyAc4i/oFeu\nsPUROUuZOXIKDJysGS4zGFaD2yFEWLGsiMKhY+1IMfbPqOE+m+4DVaFEYHAv\nB0ZybuiGGDP9FJ06BtgOukBF4gM80e2Thr4ggDOHOZGWsorSxgRjQwB4W9no\nLoTIDfNrKvOkY12itN4AZ/bUlINCiziNwt16usz8srG7eEOk6s1B43j7AHtp\neV0l\r\n=Nhef\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b9d2578-1598079215202_1598079259658_0.8002803890503645","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b9d2578-1598079215488":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b9d2578-1598079215488","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b9d2578-1598079215488","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"02f18c5461e5de01df7d57d6e49f10f1b165a46b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b9d2578-1598079215488.tgz","fileCount":7,"integrity":"sha512-sqF4nsakdnWZCWqW8AJJDjFw3GCpPxSpHZWZD0Kb9K69VZTB9Ov5gjmFuNWZaiZf4ntnJk+wjYKUq9BTZh+BOw==","signatures":[{"sig":"MEUCIFpWKA+JIvugnDi4/cEFO2+uK0K5uXUqtw0xq7d11wnsAiEAu/OiL2rjJzu4GkjP89vtow1gZPutG0yVGz3GZOotY+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQMEqCRA9TVsSAnZWagAAr40P/jtaSNjkeZM+8vb904Up\nY+qq7OpsAwog/EZfF449XSZk3emDcPc7kUJ2iASMUCLZoJ7awuG7ry1I6jSR\nmM8OjS6wgyEZZv7nn19zioJ9M0D1Jdj5LydvFnZYUIEKUpfuiTw5zABClnuL\nz/nEohgx068nAaOD2HiVVs1AAeSrprv2iRJ4BKjmKvccVDewXdUPKmbe62dw\nAjc3DxAUX2XANbEj/CrpCXpElsxxIidNGe22v094WcFAzLr2t57byNO86oeR\nyGMVR0vw/Skl2KdbzwoSSZvglpPRGdX7OL1G1XlE3g9how973tP8qz390Mtz\nW3LKLAIvOuEIOf7SKdijvaXJSzELEAyYYROg1IBWzbGu6bz1OgqVl8h2+zWm\nxbFo3nV25822bNf15lCxdEMrblBZTJZGig/wBG+uNM4I2FCvQJZUMyy2wsD3\nTdXifEW/MkW0uZY4snzjCjvk46b7UEL131Qmuiw+0yd/d9eJcPtOI6p5LgZ9\nw0DFhvHKaHgArFjlFOA4FtX7JT3KVkGomQ2APNJollNkwCA8Q65t/UC5AUBH\nG7qFX+OxE8OW1qYaXGHAQCHWPr48xOabVztW8Gof+5jAdN4z/HR27hprFrfq\negQPwWUHufCHCwXI1Jgqmj4kX5gamfRk04E4FrDKEGS2I4YtOQLOg6L+5Xcc\nGOML\r\n=laYb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b9d2578-1598079215488_1598079274481_0.4315928279235266","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-3045e69-1598101829116":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-3045e69-1598101829116","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-3045e69-1598101829116","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"27b842c9f44df8b495517ad8d546cee9740a6493","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-3045e69-1598101829116.tgz","fileCount":7,"integrity":"sha512-b/pA04M9qOxVJs/r66mv/37k+3TUbKd7nI8FaTw1dlF57xzEjwsULQfmLDGeQCMUaQJX7XYfN0DCKKOH/JSdCw==","signatures":[{"sig":"MEQCIDbfnxjnSJgUT4V5uyryyv+ITmJJX1nCehYlHb+zuEVRAiBeMhIPEKPV9oR14GrAmepot/ymM28OT851seksWyr02Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQRmJCRA9TVsSAnZWagAAmqcQAJMCyoPK3RyGiIolnuP4\nUkpvJYZwNIoJgE9QEJOV+NCmyek82vA7v7Yj/eMqIOh7GPk8jf8wEkftgCM8\nsQlnNY25WWAkLRxjXSYrIhIFG1RWnU/obdKLltplZlc/H26IU2amOpJDgUpm\nCbQd2qAS5RpZlAY283vNpqasCRjalsvhgED4JyNpiquwAzsDtsvN5g+HBRx1\nqXyf0i6oFGhaPwylbboEYiYMIYO9qfWxPwuys1ID/hu3pDBMCpvqCuP+dI8q\n9jGFwFvY3haIm6kYGlX7ZNeb2PUwW6CCZ3L2cNGiGca8ACp8kdx1mk7EnI2E\nU96c3ezwvbgVoGFOA0+Ayy4QfjSMCeNc0hL1OvisO5sHFQegjakVtOmWo9T9\nUR7ky1vCtckLc/QNTrIyDGGtEt3IMCB92LLfF1bYW9g/+WuSIjO+QJLO3Hlu\nBYuvfSFxHpppby+dc9RjxqEMIwuPAPNH5QMtGgKWGuB9TKX6HqG2ByQbW8gI\nag2yV7hd3562d5kdxL9eEw+CUfzAUORgHYQXQP4ln9ATBvVG0ZojiIvPYksX\nCUPVyGhg1QO9I+fq5Lw91YF+sjNCCDqSRgwSQ7F727SHuMqqNn9ED8vOkExR\na1NNsl8fr7gKhf+++5xU/hUiN5sBl1Id6/ENcmIK6eC3dDxujfnVkjqLimJn\nV8lZ\r\n=OmbL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-3045e69-1598101829116_1598101897143_0.003843036997198457","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-3045e69-1598101873920":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-3045e69-1598101873920","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-3045e69-1598101873920","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"57222d42118e9957176bfb2c29e0971c802476de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-3045e69-1598101873920.tgz","fileCount":7,"integrity":"sha512-n2tAtw5VJimvOgjKqMAYnf2h8GTb6Wn80l3EbjB/yZUWGDJArmLccraKxTM1ZW+MX4box6WHDTiqRn2d570d/w==","signatures":[{"sig":"MEYCIQC4R+63zLLq8q+ITmSj9ehe1Akk5QBHx1i7MUul94suTQIhAIJzvMST8Sn7oGaEs/G91QGA6PHNrZFNY7aUHp5iUVDg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQRmtCRA9TVsSAnZWagAAw6wP/1lVkfUyrpY2MO9Cq5n8\nVdc+n27oFlO3wPzzzrvmbLtEwtF5a9impfsHWP8n3hWXvx+cFJXEqwMzf+ZE\nt3iKhPYadcWuDV63ihJOOElovuc1Ge+4pO6OBCve6WkzIAXTcJpLawnmAGRe\nMihhSdAkaMddsDJSP2DYzNKDITyp/UFAUoC5hxtiWWxRDZpi2A4+cWaV4xrT\nEcJaVrfD7Z55Cv/qlVszuoHCgrYJRSVvERkSyfLqzVu8omLVOpMHYp4zl94I\n7o6vKIJ7NahPQZLmRbg2LRqdBow74InMORzg06Kf+wU8IYnITHKvb1eRdUoh\nwdgkUugNz/Yg8mUgzZFUQ+bd12NZayEbTB56RGnsxIfrJ/HCllr0YR4ZSsje\nljkNqvUNBg/EJLWmWfa9NoCISDC8YWQRJpQdnzPcUyhDkDLaSD9N0bWqIDBH\nvyiTpChHmd4PGyYTBT4v783YRi++K5mPeIsZ6y6MGXUF2M1U+4uZLphVvKHv\nqOVHSTlzjn1yWelQnQDywnwwLoWMfSpAlB8GLBXIvpp89Lti6Ch8psdx42Z1\ntPLKxIMuMQCQW3PfoR42j+oKPILDGMWA6m32fZ+AubA1Qgmb/ZUafvUAqriP\nrNxGZIgOuYXUIdLmM+6mur1FHGECmIgu3m3f5aoF7ho/dqj5oepSL3DSdX2D\n/uLr\r\n=L1wf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-3045e69-1598101873920_1598101932809_0.3346442771715261","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-3f0e2dd-1598223404321":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-3f0e2dd-1598223404321","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-3f0e2dd-1598223404321","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"01c3508e697f18cf2ea8027c108ec8a0119e75e9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-3f0e2dd-1598223404321.tgz","fileCount":7,"integrity":"sha512-LpwWb82GTvES+Y0wQlp2D6n6sR9U6+T76POdWE9OMn0RDKiIG+fpSEk6AAr8p8c1OAcwT3Wjtc0kpmeoRzWmrQ==","signatures":[{"sig":"MEYCIQCG92UWnI0nL/EXsbPUvhcUG983QtzyIZbFRzuY8wOKkwIhAL7cV4+vBMh/pVYFHnRCO99nhSwaHW6jIVwTWtk9hbqe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQvRXCRA9TVsSAnZWagAAnfEP+gPUEcTWEnfRLp7nT+xq\ncK/+97kICMTnKzgHk5fsiihVhlxk35v4Q9HS/UgEBb1FasZCVmtws+Joqyyt\nLm9B8fec8yC3vf/1WPI1MPtk2JSxZ2ppBwe7TEQfj462AcuCcmrDNPBSwZyc\nWNThI29jIBGViofLtB25aW3ETqxHkPXVFs0pTerY5nAmW1kkV50dTcCp5Bd0\ncxVN72bao0UXHmQ3272MmMh6cpqpMae7Uy9kFJviuVd9b8egcSjNkYEae7rp\nwsvEvmqqOMZwMX8xKg5G3jOtayTAA6szekB+zZk+8XQCF1t2p/tJ60+DNN9I\nA/4SZOXaFiogVJP7t9F3KXQTTdBQubtlFrkxBeKTzRyBqUawp5Ns7sMDIlmM\nO0kYR6NYyyy4It0Ou2/8SOgApinbWBB4MjVq2H7qECLpECzJLM6o+98Dq5kg\njA840bnUxo92KMxhoNhMvp4IzXYbLPfrHHU6speblC23xpu75bw2hOFhuGJt\ntFRYQFTaYpKcicv+PDG7jSI8VO1D6HuaGJ8Me9MYsDaAKjl6/1MAfRrGumBB\n0R0cGC6owXClPrUWqG2to/AgdmqMhniijBO1rc19lEoP/iyhj/8hnVZOEwrF\nLiAKF3pGQ7Bai2OfHsR/qM7Aj6yXHSfYBbfiUsIxnZtLyCzYJP1JNMOD5m8s\nqUgd\r\n=clVW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-3f0e2dd-1598223404321_1598223447177_0.19111133512105294","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-fa383a0-1598343690696":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-fa383a0-1598343690696","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-fa383a0-1598343690696","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9582d23750e262dfba7500cf855d4c5fc5cb2fa9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-fa383a0-1598343690696.tgz","fileCount":7,"integrity":"sha512-Z2wmXRqluk9eKSVzLna3XgPytFaPft37Cjorv7PBxikdcpAlZ9Htlcl/2i0Dpr3F2eXPSjg1HMrGUO0ecibY8w==","signatures":[{"sig":"MEUCIQC2h1rDKw50XLRIxNNnnHra9Q3tYGc0TVeMWxL05dN9KAIgTjLKyZ7B+ZBdJYRNeL0WFMDp8K7/STOG0oA4ZiVGeIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRMo+CRA9TVsSAnZWagAAaM4P/24p1sHA5wlo9I6N78WL\n7AiPiWsKRrCjtG6payZikPYdavd4qxynn82rIDWJ1Odp1k7WAZypQ213ZOnY\nUZ9LKLCOtnN0iQqPISpyY9MnBU5M5lZcsVDkzG3daMyI/S5Bc2DtGuISPx8v\nMngEh+8+xIdIN+3RQdoDl+SAu7MCovxPkmOYLo4FNr+M2xkdVutueHNQ2XkQ\njNfs4sMgWTNCsLxoB3MUenWFjBit7mPFtHN6jPzpwfTslVYAX2yfO20bLXVp\nzALrE2btLktIpA/Hg75eVXmOwIVYF5lRNVUE/Yu+jNM5A/231703We9ZAONq\n4A7vV3PugOXvLjQt29YaZwMVpIyxkrsvG5sBIuhGVTA9c5RE2EFfOpWy+jj4\nZRH1KQDEnGQwHsmecq76TqPAehNykKFLR2PZp8hNfQ4gEYLnATDIArKp7up1\nm5a1MF9UJYSH2MNMu+42XGH66hd2BCvw4Rcx449FMIjPSo3lQuFRFKpQmcOA\nED6ay5GjesAcahvs14/Wyr6kthsdODQPLmItoJpBZktHpMEgWeH9mJteCT8o\nyL0UpLtJWj0e7ud5lZl+Vj6mdYxuoWK7oUdC+MYC+EPA+XjtsbmSVUTXTZmk\nCJQ3ltzeLupv7NQQQqvSkRFphNGrnQcyQN1bKh9OwyvmaxU8qWiJCUbprm6j\njlKW\r\n=ljqS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-fa383a0-1598343690696_1598343741907_0.5857823473520714","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-fa383a0-1598343690906":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-fa383a0-1598343690906","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-fa383a0-1598343690906","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"27204f8dda5f2ae3d93f47476b0fb7119e0c3cd0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-fa383a0-1598343690906.tgz","fileCount":7,"integrity":"sha512-FNgrQA4HNyOrAS3kip4K+xjIaAvw8RFdDnyrB2o1DYQqlGrD6TrYDpv3pg1IXc/Z/CyJqgjwFaPBhTSj4f0MJg==","signatures":[{"sig":"MEQCIBaaygHq6FJCNMmVvGMZGbqgSJ4db9CFWO9wQhGx/P4uAiBxfLj+4uZ0M1x4JfghEJEmHK9HQLLZcvmbOscGjs4AMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRMpOCRA9TVsSAnZWagAA5uwP/1T96r5xABSRfTeCRTTa\nGnoGlRgdlBgqKiQZRlceeLf0khmEzonnFNnRmc4ugMpXgFPU/W3VqbLJTtiz\nNCJy2l1DiyavLZhYf7A3z0+hGKSKJRxyg3Vbwt4jnroIfgT0VfbEjiiPt/2r\nQnMdVU6v4zOFhFQKQDoQacJaTo+8pBYYmeP96OR0kfFlKQyf3J0pZ4l9hJDy\ngNPtVBTMM2D560sn0VEDX1lDD8OuPLJ9uhUBn/KpzYlcVWeHQrzpVVzKICDs\nRkHqP5ayd7N09yR4biUT4w749HRpahnfd40w8ImFn4nJ7/9rTOOp9V+QuTbB\n/04ujYP7v7XGmZK04K52WEq8d6eifnj1qaiZ6HK/bH/OoDvN36iRiWYVlGLY\nZnibzUV9Anb9lC1gV/Mf6uiKYbnIvgJanO5StACY+M/q+ZDTwU2SCPJhRF1Q\nsZbVhrpPYDBi3+MP6YSzoCEyTt7nucOGd19ytv0EUnVW5d9Lo0AurrfxYkHZ\nTFtMzrgyCFudVNH2ch83xoiAnaE1f8o0wWdrMV+FkC/GATDd4NVvX4dlrUpG\nv1dtJvNOWgMvNII0Pe9c58s0qKPHBp0GLUKfAv7PL9tym/cBo+DkANFZthEE\nRs0hpthjTVP63WshedtAYdxrlpEzMm5qsmKhyx3asz/zjjU1ykPafO+NRoen\nc74Y\r\n=UeID\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.2.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-fa383a0-1598343690906_1598343757854_0.6836981179623163","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-f685de9-1598508857621":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-f685de9-1598508857621","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-f685de9-1598508857621","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4b225a1df894a7278ded261c0b7fd0ff909e8f6d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-f685de9-1598508857621.tgz","fileCount":7,"integrity":"sha512-8doH3WIwdYJzZFyZmtIzwAsciQ5phEqb8wKHLZB+4+uBt8qKhpyw7V2y+n0FMyvlyRhKvOCeaxwvtfZY0SVi5w==","signatures":[{"sig":"MEUCIBoZBQapRrt8rPEbiy9KuvWYNtnv0pmTd9UPR1LhoaLrAiEAyaek574O5Y8B0K/5SYam/lvkBVr5cBUasu8OAQy2CfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR09pCRA9TVsSAnZWagAAjJMP/37GLY7u6lQSaV9l+TCg\neaWxH5kLPTatiUBvzikSKaOWpYr7nBgyPEfAUjFWJ88VOfO2faBTfJ1QXhyh\nP8qMWXKsfKudtwcO1B9cP9yJ7gltxY5nDCIhJiJUTcNDcrlHLb94sADMwvGB\nSfJ5AWb3Crt1QEJ/YI99lmxk+ecSEQsqsub21O68B4+ByPsjlPF8EHpN5CF8\nJP40i629UOS8btr/xOZrI+OXux4vOHDtPfTgIabS324g5emaOdgWto8EMhXW\nsIf9XBQPsLlutoECaRmif3jffTduF+OPz1sOnGdWQtvOU+xJSNbgNUkr00qC\n6XKayiE+QqzO7nsR588ZMSZd2JddMCcWjqqmNKVjNXbB8d4iGsz1Wz2RE5n0\nTHsKbvvQAnPJ0tq9i8tC/ogakqy9UvIb7Qz5VkfFo+XEoQnEnr6wGrL40vWm\nsqcynXlV9aeHOQJt9H0ShfwYO2+RiXehYprmeucg5hxWwcWVvFGilMW2zKbb\n3+cvFw6vcGio3LyFfmg4gCcc9S/LRJMsweNuLrjsGvgRpjY6v2tQKaVtXiy+\nlgEm8gxUKRaTsSF6CpqCrm5lLp/YvCabIzQzhtmoR5yscjr0UkzzBrd4xYrq\nd8r0iVRyRnhV+MC4B7QTUuDAa+VxcwiY2IHWY8ugSXY5U8984OeOp839+mN1\nc83t\r\n=6J63\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-f685de9-1598508857621_1598508904903_0.5550641239929013","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-f685de9-1598508857310":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-f685de9-1598508857310","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-f685de9-1598508857310","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0de6789672cb7e0c041ed7e9b27f13e65100996b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-f685de9-1598508857310.tgz","fileCount":7,"integrity":"sha512-EyNj+wVp+E30uSiFnQ17DTmrMG+pq8gUbdi83vdhhDKWLZNMMF6o+1VxwdqxBO1bu1fhAaXiVdSztqTL6nKmTA==","signatures":[{"sig":"MEYCIQC5jLQyw0lHJdQEoTl/sLweIfL75NhV2z8vA+QjT28RsgIhALhwDsDHmaHoeTvKcWIVrmWVzbaLkjyZa9e7lMCqJknc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR09wCRA9TVsSAnZWagAAyWgP/jRztke0qCuN1p90lJKj\nc6ZYOL6f6p8Wu9yvT4Yvpf/4Mhrh35XFjoUEzxWO3RFvIjLe7aTU/nMB4SgW\n5T6mLUatJPklrsaoV/6JfLdWKN7/Vp43lgX0KPXJhGdLl0WLmfRAlRDEHzHO\ntJYJyh/v678lPJeGHaU0yS/qmtg+PSUg8HTmt1d+337LyerfSYdzzl3QsbEF\n6ggLzm33KTahRQV+Lg16D4TqA45Z5fb8H3HrRY0Pf52stgtL9G/B2qM4xI+o\nYEp7oeubZDGwg08FTU0+uHmQP4s1a6P5xiU9yiWy2x+2QiEDJGVP5kmvjkIv\nXiutMLBvveMZBsm3j0UCMBsAzgaTzasKtIBGTkiRxRplNrB8a2K/mHGEKnRm\nGlgwNgbjJ/jP1LwhOtn4zvLKx60281TJQfQRsHijc4/QuHJY7z/h97dWChzs\n1eqw45kuygJAZB5/wxZRnT17aHJjIHgspSRsEe+fbAYVLpbily7i7/Ud4UtZ\nljfSawJH9C0GtEOfCdbcsUkWOjqKfQKGlXGmFDQZeE4SMiSXPzVGNBC24/v9\ng21IESe8h09vFSXgGoe73eL2kXkTpcbcTUuZ0VMd2b2ncPRHwbx5Ioa4D2kt\nXFZuYcoChaW++4V7JpJ0llEMlX4zmqD9UMfvRgi2BI9453GSd7yMn0zAqCnq\nAyWe\r\n=Czey\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^3.9.7","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-f685de9-1598508857310_1598508912144_0.8982165737425485","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-43998c9-1598510988546":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-43998c9-1598510988546","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-43998c9-1598510988546","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"74af932be6b8bc589f0cfc7a8b5926bcdf38fdea","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-43998c9-1598510988546.tgz","fileCount":7,"integrity":"sha512-DBrON5YnMs0d8bcsGZPy4fhSKuhz0E163WmUyFe4yvgwuk4wtYCCvKnYBq6Oi8qRgOp9mGDriN/7x+HVY8L22w==","signatures":[{"sig":"MEYCIQCrcoBXxP1bgutkEzH2x2WgwrFzDf7b7MlGCPbj5QmdWQIhANSODrvgqoS6YkwvMb3+RMD+55tr0dCsjavYcmpoIPnU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR1e6CRA9TVsSAnZWagAAjUoP/0ySPN3GT7yYtUeRtovm\nMOfqmvTwsz/DUDAgqaTnbbaoZbs1UW4Y4qVVpdzLV5zJFdYRQIoKTo4P9sxE\nZBV2kYiJciCbccl1IU0ar0N4kQ8Dii7z7dGgrRHGT9aV2Rhs+Cw9AXluo1bb\nAbEfO7N1RrWgksNYT7r41+npxWFvJOQLyjkh5r/Vu85XWXoU3cQgm+nWbFdU\njVQoKxGkqtYPRy9mB8XIkyb4D/IsLDuyphqt3XurgAmmPYCbwSKGfM1ke6x6\nWpX54V7Qk9vJAJKTPPU1msKQQYzOPFtVxY31pL3kdXnaKz95Avguoi/7Zsmr\n+Gxuma6c/3GGhpM+PhitnisyJTWYBx7QDz25+DcCUkmbV2hjVOe6f/QuZLFS\n9ZPd5ZJ6T/LnM8VQxdUlTaAZ+kFpiKNISP++gMYc4wx02t72QXokhDpEjajf\n/FY+n/Kb5EAblED4yoAzDFURfsDEy/EoJMU6ec9gUaDpkuLVgI2YQLoWj6I0\nYRpedcydql+eUHlzzBBdKueglCZsyyK9ckHO0XXmW5yxFyUpo4cmwZirm44Q\nVzIwSMZZnwAEu5WHxEzBi7F7cx+b0skYB4BnSs04MyCnSL38XMRsWA6JXeZ7\n+BLnZovzLqD/M9nxukqYEYwQ3/6XWpx2uiTOK+qZTepmWMXQO5JrbTML+E8S\npS6D\r\n=DawT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-43998c9-1598510988546_1598511033626_0.15537549525850203","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-43998c9-1598510985256":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-43998c9-1598510985256","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-43998c9-1598510985256","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"609ae7fcde4d0ed9f6051b4d92bc35700768b0a6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-43998c9-1598510985256.tgz","fileCount":7,"integrity":"sha512-zT0xBn9gUzvLHZwB9Rcq88hr224l2lwe07zKtCIwMwKfCmEV9tQ+q1+1NFhOjWsJ9rNL1c7uLy5p53abgHEbJg==","signatures":[{"sig":"MEUCIQClAlJxbB3dcCmPDhy0qTZODOT8qD72AgiIjQqRCJKW0gIgXfz/U9so0qHKesgX4KUEEdn30nTW1rORCU4to+RhiFo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR1fACRA9TVsSAnZWagAAaUQP/2LUbEKmlR2ZULR/MrXf\nUH4Q/paw0IiAKclk6zMXj30vfAdQBFKe+Q1QKoMhiPXHh1XkzuybSZZfjdN2\npT+TvhwEslbQofmxZtHgTFjtBc97GMG7fGOEu1MbQoYzWYUY+9kcEr/R7qRx\n8Mk6J+XJ/KGpBa24nGHDalgRj5J7jbvu1f/pkvxWQtulNGS8/51nelL9VFVA\nCyeSndqAlriBPWYTwECA+PDQKolFa4L/Y1p0GoeGeShys4McahlIOq5tuWwR\nPnbAiNzevX/GA3P0+1Xht0JGFZBTIOFJ6kd363mRZ+K25K8q06fft9aw5Lef\n573gVSLJhc7A26MyBXsiviKJng4A9drptzlNCNcjSeOZWAYSyGs66FsVkH1M\nFvftw4pmMkqVplU6o1ZKCFtd7o3Gt5E4QI9vvvsTpEGS+f7b5MMIbXNOZEVB\nTdf0s/WVCM1celw9Yhz+elFWTH/mqlB2UhmbT51wEJdY5Dt16RpSuqqrAyNU\ntlRxRdO6ptsbjK9b/i7wEmGqGmQqTWY/KgPWURQMKwN0wz7sG/etfMfCZr26\nq6np3zOBDQeBfWo7uzwa5shMMjTIKnq/DXwWfuNRWxDVKzzPwBsLcIzfCF1r\n3R6g8Aal2HYaAI1ThjCLfnzV01OUYebjIggdXHtxt3NKSdNEIqA8TkwBymdm\nKIh5\r\n=AErL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.5","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-43998c9-1598510985256_1598511039946_0.875057138169931","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1f873e9-1598592514728":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1f873e9-1598592514728","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1f873e9-1598592514728","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"365140596279e5b9df7f2355321bcd459d46cf28","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1f873e9-1598592514728.tgz","fileCount":7,"integrity":"sha512-DNx3fhBIu4WidUuBY8REwqYJrmSInwiu32X02wO9QY94LGpinuOq/7Hk9sRZrNDCZfnmxEubnRmfjY19N36Gag==","signatures":[{"sig":"MEUCIQD5KAvOmp50cjiI30+1u95fQqfkgJuy5rSw3/a9B5XEFgIgOiqKdP9L+veowGDIBAAVOX0+Rn7h2A42BTHFHpFU+pM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSJYyCRA9TVsSAnZWagAAj60P/02EZvh6JvTYov733q2Y\nBrML5sPglN3Pv5c1e4cdK06iqxeutH6gE5niz6y2M6Zl7l5Uj0YHZK93Th84\nii/OsTK7RFyv+xYIQbIRYi3nFNPalsZzdWJw2VN0kJbb1610ZWlbNxRu5S0f\nWbjz9EtOTqGTE0zyqErUfcD/oROp0R84xPFlh8va4Q/3aJgbS9y2+KstUEZQ\n2bpqVZMBgVkxVjHXFdOTBo4ATRKUqDWAm7qnldfgmbEHdIh/1pbwOMLhClEQ\nEbwW1BKGlcomC5kKt9OVc2Ciu3MLfllJzzIxN7o4rH2nlNKgjWV814tHf3BR\nSbOoZtT8ZlcyH7me96nGNvh3S+e3xVmdSbIIQW3d3gZVUTkFuLD5fU0RzJdx\n8iLpN3HyCvSwxeCO6F/wF0soUqo4NlJ4/LP2zRuT+iOsLNRFyu/5/M041119\nji8GKQw4cEukxuz5MKGWP0Bf8N0wwDcQQskEuGoG1QekCoSY83gqQTYUa/dw\nkiXM1Pg5TCfIs8Li37tzAiBVgSnzDfIQ7hCVcG9cGCnk2MUsfs5Lr6G5EDaP\nf93HV4MroGQbgPYNxIeAMz6lsYEzk5afAYWYEEsGnXp9yYxyahxJ/ABO97pv\ns/I3944hZoCiTgChxt0h3fbcXhjZNFHoeOPnPwT7cQdQNzlCY04AN+ROfXW0\nH4Sk\r\n=hqHp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.6","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1f873e9-1598592514728_1598592562404_0.5191762884623483","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1f873e9-1598592511062":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1f873e9-1598592511062","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1f873e9-1598592511062","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"83501f010f229b506d5d1c4f315a44b701679af8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1f873e9-1598592511062.tgz","fileCount":7,"integrity":"sha512-vCEM8ieBHTkkPKVJCJMyew8+sOijcHBVZyOZfoJ3FWcBZGZIycyL7Pxv+9WXyJeb2bD5IlBlWdpiWXmZNjOT9Q==","signatures":[{"sig":"MEUCIDIuO/Hkt6dxijTzpLp+tARyEmhd2rNpqaAkbYhAEcE1AiEAmhS3qK1DT27kfgXw59egFtEnireTMorg4BTNWmjEM38=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSJZCCRA9TVsSAnZWagAAixoP/RYZidO1tKitAuhN5oQ8\nqONZEYyPoN6nrmoJlptP39Ha+QsqtWLebDKri6/vaWVZm57lqKd2QTmsz09o\nDxYh7TWlESxOsBaOw70oHe1clxKwIa2Abk7pV6SpxbUAhXOuZS35NPMYujLM\nd7yxwR0dalI9UEU/N6r6347l6wZwrU5yg+Bq1FW9ZZt6uNv+4Z8iFb2edu58\nGvIdWHzGNgg1vmHYDMBXidm8HMvETyDD4EPc7rW55aU26MJLJYlIsNtHsQ2V\nOylOUlBxfH3HWeEfqfxf4+Qgs/rRKu7BcJru6NapPwM9viv0dyj2olgWgQ30\nrVwvFtOqpl7O3gGxGjUiPis881Qs/V3ksen2SQSeTj40cHFzOIUOTrqUZakq\nLY6OQn5EnKfgqtAJOBubNMfUHuWfVrigOXE9NTqXAlxjr6/0gCy53XxFqY/S\nKo57z1SIr8IuuJS3iL/JZmmFoM2Pp4LmtuUy7OhMtlgjoJfbR0EjZz0+3wi1\nXzk1Mu74p/jRyB8PjN/JGtrpHKMPgGwQ5alLR9Q3wsZjVZ12X3B2RfomXmSS\n4YUjLetdFx4Er26vdtyjClXLw2lud1jBO4wDjWyl5gz99shemtatIaSa+Hdx\nshM1dvF6WEriBIO64lhAN2Sm8vOcTJF7Ry+jxLZdorzCOx9yqu6/bAneu99B\npj7I\r\n=Axp2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.6","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1f873e9-1598592511062_1598592578096_0.7228376022483824","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-16aa897-1598596093522":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-16aa897-1598596093522","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-16aa897-1598596093522","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1cb96c4cb317e0a10f84b2d233b2dbe3fdd3f335","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-16aa897-1598596093522.tgz","fileCount":7,"integrity":"sha512-mZ2bVVS6Cw7FmPVgDq00ACNMYhe/Iz2Id/5e9WQCp5xaMXs2TRNsmOjLK/oLyUm0gWN08JFLp5kZxI666Ymukg==","signatures":[{"sig":"MEUCIBjKnWP9eDudiDlFUCP2Ql8bLpr7Uny22ecApxBuJ7+DAiEAqkODRELBz2s8xSVuqjinNFuVSTYiPsdz7J6Hzort9Pk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSKQyCRA9TVsSAnZWagAAtcQP/2/lGY8NDKPmmGgwctS0\nlGgiz15CosLp7C3YmMEiDdvn8pLUAUe8ydtTi7PKJtN7CV1xPW4a8wEetRph\nqEidyU8V4BtE2yb4rHAI6MaFtP0nb6+sG5JNmgC8F47Vy/iF6FJek2BZ1aNB\nSkRPjUgSdlCwWeWex2xLCl732EYOpMM1VjBCubKvFXcj+s0Ww7uEY8OXgHXw\n0f/+3cs2L0o7QXnHICiH07qqaGK0B9dgOUi15AGTfjuQQGD7pEErnPlDU/Hl\nFd7qUgkqezHVcufsX7XQ0ZWwRfKzhsg83TbLbz/Q0pKlSmUILM25mlwLpfbJ\nvTuPNhycpk9zbrEPg14fXeEjV9MpaqsFD0KVwbrU1eieKgbWhqLEHchz+z/Y\n8c7Sn8hsVeBd5jUis+Ufz9NDNRjM/ig67xH/wWbqRdijXA1C2BeqNGfsCCz8\nObWpV9XbrEj0MadGOtupxouO/KoCypQmV7WjT8RjluibUqzeilbX7PZ00+xT\nok0HE44K7Fbyqwf0LREClrzVc4ERewpe6hTtLAxnozPRi0kuVBUHZsiqREU/\nlRI9o7uz3/Grlgy/UVHfkqSDTnfPrQ12Jqi4o5HPzoWEsrQBPGgjde0tfKg3\n4lhEzw+Y5Y8PKQUjhCNIJE9FDvUfUbPsIUvfm5MEQ/Xwrpbs3IuwTMnw5cCa\nqpCV\r\n=yO/y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.6","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-16aa897-1598596093522_1598596146162_0.15509243774053894","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-ba2da21-1598708175439":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-ba2da21-1598708175439","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-ba2da21-1598708175439","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"667b09b13e7cd64ef2bf7813415771b9005d1289","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-ba2da21-1598708175439.tgz","fileCount":7,"integrity":"sha512-7nceGuiSNj7LhaVKTCW6VWZ5XEg5vzumKukpATl+tKDvCHH4fdKzvV6POxOQwqsHqaf8ntoCNf2JQXphgesVmQ==","signatures":[{"sig":"MEYCIQCc5TxyLM1DOmHlZlNEKJamXxvqi9nPYkbysVBGctbfCgIhAMF6FdDP7mezvBo5sLquJPjKBitu0oATI9vD6mIjrg1i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSloCCRA9TVsSAnZWagAATiMP/2UnrVW5rmTe5NGjuYdl\nTKYjfAxRuMlhS26Du5bYnBUONskVJ2hZGzBfZDRHtGG/8vt8VlwnKxphzjfP\nCIuRlmTdsAJGssbH7We+QpFKwhJTArpfGqFAuWZBz5clpSfIOsIX/nsN7+ye\nA9WZWwXwoXS9L7psTf2oCjmXxjQHUj+EwKFm82S71eY1xzWuaP33J43ou+i3\nblAsXYyvPsJjqqTotjbu/bjH1lNgzzhJHNJ96ip6BwZhUmzRvJjLkZm9Qel7\npawSxN2BEXjD+dNREoDT/WRetSL0pTMR0dTpuRRN6Cs6/s9ew6Fn6noOf4/m\nJLF9h23qiXSDd8lQX8sRDOLp24SZn+W6eFuRVLdAfMi6arpDc0Ps/J+mlPe+\nZr8OBmeBzjJSIESRiqwfVqgRZBmhmq7MEjH5UCBjJNvKem36rfjaR3jQIjYh\nSjJPiH3Fn4dCQKHvoMonBiWGCUN8CmXCvghHE8i39R1L61g3FO6YzPdAGSr7\naoMBB2yCDWUf4dUKmrnyasIX5OhDkrMff6PvFgkImYlBTXnZqf49OvpaQ/2E\np+lf7j+L8b5d5wHkV9mmaYme+n/ScBx4aBkv1zNopp0FcKG8RDDLOeejktzY\nMZdLE223e71VsS8qU86TIthcB5djhMWlSV231O15FbFX8FwE+dkhIN6rvlwM\nsMKi\r\n=RkzQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-ba2da21-1598708175439_1598708225806_0.654196023210051","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-ba2da21-1598708177538":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-ba2da21-1598708177538","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-ba2da21-1598708177538","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3fe6023e71876d2ea9292a505198e4524f79d4a6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-ba2da21-1598708177538.tgz","fileCount":7,"integrity":"sha512-DgHsq9s/fneLeCNHvExV3AaqiwgdaJUzkhmIADMhCO64G7slKONPya4i2TcRJMgTaMrA/7TAQ3f8fVLsFHe4bA==","signatures":[{"sig":"MEYCIQCF7zxcQi1tZAVZxT2bt3PHfpAtzDOY1o7eFA63rliW0gIhAMQJ+kkrlKCwKXx8+/UZRiakMhn9eTW5RJ/CtIa3AOoB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSloRCRA9TVsSAnZWagAAaoQQAIfLDOS/d1pvWsgOwxfk\nowmb7OrDFr5yKDV610Gjx4dj//9LOqMvsJw8zC0/XBidyuXlVfohaEv3hVag\noUej4GnarQM1BI3nPuKpo5mfW7zgp+Hp2GmTrcxtKn6nGI7krIFd7SKLW2if\nMSaL+IFQ+ZnRX9REypqfTVxRrrlR1wS/H7II6Hq3rE1DFq7wEDteypWXizEt\nycBe+w4ZHe0uqs9GIMCoNfFDxLAhQua/BG5oUM2aY3+NB8fNaa676PMhIvl8\ng/Ts/WBaJ9jY/4z/Jc7TqwYuqlfKqpgmqmkDJqS/uyvWtj579qt4gNJ+XdnI\nFvjFEi+M8vfjJjuyA45dfTpTNI/zePlXQV4wnQYZ2MuJSFMnwXXOFpqEn/i4\nXcNopmWkbeOD1RYLHe8eS1RdxNh8aecA18/3J+/YC3J98r38gqO+NaCCRShF\nvhqr7bf7ZUZg8emxrh1PF2bfi8oktaLDPc80b8SvI4GM43qMx2sPhLZ9sIqL\n2eEGrQWbP5swU0SioKOiXqbfLwV4gkRtKkB83mrY8WtXUn0tmJ927yG3H5SD\nZ2WNJKp3pzBRgdCumSQ497BYnYZDwHFIXiq8vhBh96r4+ehZRVNhzjGwqvvg\n6Pu4hgmJLu1eQGjOvQrqqJfKkXZwg8WhsqVag3CzhdFlfNHC7ejZ0P3LKASy\nIET1\r\n=MAsZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-ba2da21-1598708177538_1598708240878_0.9255815598839146","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-4b7dcc5-1598710293118":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-4b7dcc5-1598710293118","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-4b7dcc5-1598710293118","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1ad75dc3a82959088e407ec080f393b1bf119e96","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-4b7dcc5-1598710293118.tgz","fileCount":7,"integrity":"sha512-W50tbjr+Yrt7rLrEKvX+IMTx5p/6v5Q5q6erdlki3J71+cmr7GM510aA6TLxA8EB1s7SNm907Ekqqb2tLBmN5A==","signatures":[{"sig":"MEYCIQD7aHRagNYkLpkIicf/a1JfEE88f0XhacO3KKK1E0sjtwIhAN924CCNrZIAMlF+57wO6z//98UUiXxD5IaucI/1Le+m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSmJTCRA9TVsSAnZWagAAa2kP/1DUannLSTu6Cnvs+N9Y\nf0G14naDqFHKKcqIKFd21Ycy3TqR1AzSvy0Nen/AYrDyvmGBZin8udPOcXQ/\nK69JUXgrJmZ0z/LxcY1CPK9OB1GI6stBvC+An7msHe9Gnzz/H5Ms6jvr3/tB\nGNwwhMXPg+I6ru142YGvIqUAsPoYLIaM2kR5OBWyAY2iXzQMdizvtFh0jmjA\nif3w8cPI9xISpt4Ii2W0qakmXmJTOocfT7sF1zD0Py0tsWwavS0geKwh9UqV\nmdEDXIhzsoxLrSRIvw083JlsZbY40bd6egpSgRXNPH9kNwTJYZ71yBiZ2BU0\nQeXTTo5yCA6vcxLWWr7FiUtF/uy3AZFBwlFeLSD5G2R21Xi18KvKIM41YRhS\nry7kccEjh9ImfL6lcndDq1PAle2VeuuDdXVNBgchstI6dXyxo3KBoCiy46Az\nL3HYxrzUn4nJ90X+ssKqJK1nn1IcZJ/Yk5J4AxhgQmsP1WS3a2NreVs+rKZh\neuWWZDoiGEBLeRw9Gwz2ov16nCzK60EC+qw7/bKLH0ldwjjHdWt7QJRbTGK9\nEECXSNDbf9WMGl422tj9nZ+UydZw7rd3tDB/w+QLqevr5YVSAnDSnRNrJovc\nPnCcckh4qGLrf58OnKsDL8zoc52yr8l+S9RKMKOvlE4ZZuK01IpNd63MWL+m\nraMB\r\n=EDhh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-4b7dcc5-1598710293118_1598710355189_0.3704260823400092","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-4b7dcc5-1598710296407":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-4b7dcc5-1598710296407","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-4b7dcc5-1598710296407","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"89768200d55ee46a70524bddf17219b257671afe","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-4b7dcc5-1598710296407.tgz","fileCount":7,"integrity":"sha512-drZZTCi/+J4K6XHDY5Rpwg+GbXUQD1I87PKivcDe8YXsmENJlE0iyI2s1MCg8gtgCqXvXSx8pXJytOneBiyrww==","signatures":[{"sig":"MEQCIEpydNX3/GJ+px2jyTs6MCmjwYddpAIG4Udepp7NgIOqAiBmkdQDsNK/s4JQTAkcHYLunVWrUDcGfDqiVpZEMm/sew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSmJmCRA9TVsSAnZWagAA98IP/2nT/F0riyslp4QqWPrZ\nAEqMzQLz6yYZvzw1GpYPPVnOPcvCf/Tm5QpebmcoJGykV0JTOu0JzUUx5iY6\nOBQliZ2/cDiP3/lWcxiqu1+lI4/xQMU8EaTmi8q1pn4rWM++JLQKlaKcBGrx\na30fgN1JxuZ0c8x0GFjhZzYNjzQ7Z+QS1SOi4C9O74hOC2pmfrmC0RQWnS+P\nBDRIOJMSQznYui/IuZGBKuKpLx9BUX6hsaEtF2ZX7Ctm3R3S6yV5Um+MKZL4\nhIxzcxGxmHkOZ5pvNYmfDsHcrTSUdv4qTegKmJiGHIrwHPnKuq6jRlpCTn6P\nYLI0s8hhpJLvD+qw6vx9Vx7r8Ts1edhJzSmvoJ7LjwlODix/QkRJEVWKgHWo\nDigAePLSeM9AaS/ToMmJg1r1QqWkSzKgjuQkTdHSdT20iEde5dcXK/w433+Q\nqDHlp6FA8Zh94ABFyiLZtpjIkyg9IYz2XzUHUKnKPr8/PjfGrGrKMZQ9yJ9L\nIBYridLp8wBnKHuk/O1teJQasCqPYjzEP4boLppQKdmCvu3pptXNBCPCwQ//\nSAsJojHuCtFvqBAN0bmLDKkbT8JnoXlIX76NdC5kh+lu+pYHhFBO7zVro3b7\nLjGdsXNUSB7JIR4SIojekT2d8uU+QRUOXIYPgznkEbxcge0gBnOteK5klz3r\nLp24\r\n=SFkM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-4b7dcc5-1598710296407_1598710374426_0.4821633775936578","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a3dfd86-1598712177076":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a3dfd86-1598712177076","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a3dfd86-1598712177076","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dfd96e59a652818053ba876f1a8a14f1695f3a70","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a3dfd86-1598712177076.tgz","fileCount":7,"integrity":"sha512-nZRFo3xlY4ca18Fgx6aF50Y8DgHQsokYdQtJ07SYFSvuCQEs7gA6SbMesc0tEkumuoCSoxTlkbUqkUevfygPEg==","signatures":[{"sig":"MEUCIFxjBrBQWoBHkE+cNZojOrlqRJf7SLtX4vpsOZq/tRPKAiEAwvLMBFNjGpnl2qzR2oxkL75W9ZCmQAClfhKxgmUDX6I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSmmmCRA9TVsSAnZWagAAnrYP/133Y1Oafd2QT+GIaQ2j\nA1GLId/lKqtbHmWHHJV1SHKtvwwFuEGIVUR0BmW76x1bDXpGr7BZLC2+isQS\nHSlJHfB/YAZjf0MdFWUgE9oL/S3lkVlF1uBGwUFy+vDyud3fmAMZHda1d81Z\n8yR+5GcfQl+4kSPBzdmtnopakad0wExm0kAmsAq9ZgCcdvbs01adpW6KR2wl\nCrEpqWiSleNHqOVPO9hIu1c75ScyP3U+gOw5wOID9guUx1OUF+gIKuSupjSP\nEsAXW9gujXrTYn6ZqcyBKYn5TMBOH8fpzEdS7Kkens/ev6GQ63X1uykYLVD+\nMdfs+vyQK0BYEcd5ScsCXB0HFSiOLbl5UyQ3FgoDQhoMRtGtLKTSHcjLyTlk\n2Gdli6T6eVdrxPL7O8/mBG6TRqGtGsbhqVci0wYgJaT9/n4EcypztgoUCuiS\np6n+DHXexGT/EpYsDNsX+hEqakwcniBYhEyWsWnDLAea72ElL/ZZRmLCykt7\njh6/nViTPf3rFiBH02Omn7+zi+tl0PVkRApsVajKw/FIbBjhy9UA7uVz2HLi\nyRkkkPFlU7APX5C80nZ+NPbBHldW3qmO03XToWH3sFsJm7PxTNqjbiZ6F9Pf\nsMBfPqjptG/M0NfQnFyQE3ZXXVcD38UyA5Jp0/b/IPqaQB7gZVILm2EPjyMa\nSbsJ\r\n=aGsX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a3dfd86-1598712177076_1598712229969_0.32673937345488","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a3dfd86-1598712177957":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a3dfd86-1598712177957","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a3dfd86-1598712177957","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4d95e36bd9b3df7293630b990703fc875eb33354","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a3dfd86-1598712177957.tgz","fileCount":7,"integrity":"sha512-2NwYknxU1adcTYoMWfrYul9YYcyTruGAZlTW8YVBQ4X+8FGgX6ry/rriclCDMQStoySdMyl4/8r6zKo2DCHfYw==","signatures":[{"sig":"MEYCIQC5JKO5hs89rvJd5HNiKriFse0tHd/WwsR/nSqy1p4CWAIhAKwQQc4TVtPsEDq02Mbbvqn/k3BCN4+H35Y0nSKp/Fls","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSmmpCRA9TVsSAnZWagAAbBkQAJo5+aM4WNQKIwRXbQgQ\n6w4sdqAINH4A4rzKWH/lVij9wqSkbtwyizy3dRYF00ZAh1zQewMrumxZ5ps+\n28L5ThHYqmyVbK5zNDbsG4m2QPIhBAUAn15zgttWPxPk39y+wWmfVK/H9Ek9\nzTq3TeZ0UFNJ8uYazaAAVTkLjfxVJ5E+tsa9gAcriRdaEJi3ad2pu/rZn9a9\nTLsnUd9TEEKvYoaqmuEgkoiTU6I4CzCkd28BFUVFAAF6w1rUqNYjVio6aXMJ\nTf1iPcWe4o5Dd1Dchm/b1wnWYXFI/z8WVMhB388WJb/aH46HcBix/VxWBXHO\nOjQEQTOlW7zBPZivQHajFl38s8M6HqZICtoWuy8FdrxZHrewM+5I5qXN8hTp\n3IAHy2C26eM5ESITzqj6+cP82FDj/Y3JElTAs/rHJfcuxkF5VRdNb1GmDWwm\n5rywpOl2/ViPbfjZNF7MG4GwPIUc/hyzMZctt3MRt1FXRBlYd7LrbjegHJOX\nCQFQbOayZ9AFmywsC7w7TZhdKSXKQDATbe/3G3w3Uv9DGUiy/Ui7Bhz5voqv\nkhLyDCMgVgiLjvm5KSZeiH5x1mwf1BbQu4a8UmMIkrTTEKZCiKzp0tW+6uuR\nW7lVg/L0XCCakiCB2gaVLp8k4+cNbwGVfekNK/UiTi+zAG4pVZRDvE0HwKFU\nOoZM\r\n=Jt1G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a3dfd86-1598712177957_1598712233407_0.6355036244332148","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-3a9d2e6-1598814032056":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-3a9d2e6-1598814032056","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-3a9d2e6-1598814032056","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d4ee01df61440275220ee7d53a46822bf65a70e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-3a9d2e6-1598814032056.tgz","fileCount":7,"integrity":"sha512-PL4rZNSitIKTdWmNCQLyFRLSUHLujSxKO7+DznBqEX8ntwr5ZsbafvCjalgMRWZzfgkynoe1kzghsmDS2A4Vkg==","signatures":[{"sig":"MEYCIQCx5UNDHUU7T6ArPSoX+xh5klXngWfVQL7DyuCoieRohQIhAJTXz+bTLGA1X/gWfn2hj+prOvQEm9sYyqTiXZUTL3oF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/eOCRA9TVsSAnZWagAAakUP/jbUlRMHscu8s/yFTqUT\nVBRu9qCztKkNqaDqiJ2cY2NL05gVkW6u5n1a3dxSqnm2hqFdlddDPM68I0+t\nw0Wa8KY7Brb6zPVnlYEEKumnXTlFQ3XKMGbmu9yQyWxwW8ginQkrWoq0Vnkl\n8doVDnVDZ9laC98jIYBGCIOd/9KjFQeyyTUE95jduLOOezoVkhPPp6noV5Oz\nnrU2xE9SC1wLrVU/lTIrYp5wpLbtD29MrNI0pabDS37CWgnMMogZEjQmwkAe\nOM1pdsRcpmzB5mrtjZA4j4BMgbwGMj4JwgvFLuWJEWwTmmF51QGVtKyJO9Eo\nx5Aj/AAKqcbpC92Tcx+g2+D/Hrb4oNy4CPC8QyaM+cyHK/ai092815+obcIm\nfAo1VuJX6udFOlsU8w/if+zXmtVmSJapB1GaqA0dHY9Uewb8cetsvSGfBDwu\ne7ncSzva8MnXtM61My3l2WTPRjjkTK3JOVXQEI8gSFvjuNZzCfcpReMHEqcl\nR2cjUf2CpK0Vlt6xSYNMDy2kCsjILEh6M7W5IuetR+v3h/6lbCqugQpkwg/s\nEVsyhiJVsTJFCXTb2QGtyscLODK34QQW1XZKPBUmX3Qmt+T+GGdBT+B3LvVH\n1EnyEsWfF6k1N13rSe5fHtf9sjUnp/pyievlCukaib0+2VIS5E0FqRzl8DqY\nP0pl\r\n=Nb76\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-3a9d2e6-1598814032056_1598814093656_0.8353862843339313","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-e3b2932-1598814029047":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-e3b2932-1598814029047","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-e3b2932-1598814029047","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"669eaddbe417bf3f0d19a79b0a260c76afcf6119","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-e3b2932-1598814029047.tgz","fileCount":7,"integrity":"sha512-FOaX3BybeYjLtGYi/HRubwYAtjbCd85plNzGXAcN7lDQz+OyPmcBn0NDB1ISlrRpTsnrewUEKsfbLTczu9ok5g==","signatures":[{"sig":"MEUCIGhKBl5cXo+raTcbIOXIuvq1WAHmo3mcuZnvo7Cj/JJxAiEAk8gJZk5Fd/CJ7p1wM/ftsl95ddBb/yBYRC2mUn+7DkE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/erCRA9TVsSAnZWagAAxOcP/j+z5VJDxQBvt8u90Iru\nZtnEJUgnZn3eHAfG/BAStGi8HeigLenCeBSnykGhy3Ytdfw1A5k1V1bt/TFF\n4R8m8HJDNLnyiEefnLipCYroMMwkdXmaAhZ9ibmKM6BXr6bFNUC7BuIfm+VD\nr8Yxj2Lyg0Oxl9QYVcBRxbJaU28dUO9VpBc5E8fqYql7iVWCK67g3nF2adON\nUQ/xkn5fnVTHQBnFnkvvr79fpsd+7Tr8vglii2Ki/iEa8W4SOS6enbVUO5fj\nm+fkQnIpZ1mdd3/tjPG6BJe8vq+JveYrJ8bXTFn21O8FiEYxtaa5iB1Jf8KO\n9s2G/oIO6tm1FJEJdb9nt9KQyQAlnlERg6ADRSRIB9Cj2j1AM6bOH0+3iFov\npHkhrOQX8X2ADGxwTVcixcBveSs1mm3IkKSfmwqYatiWR2c3KgIbQnhufDQm\n6CVLftQSDf1RrKvFkws2dxE4Gx+1vhqMGvKvARrQFJ//3ZiZh+CFvc2QbkdA\niRXyQOnaRHqqdMn5iF5I3EAzjCg6zy97fjZiSpYE1hOhIepzvtQi6slN+HGc\npi+KSgnywW+MqU3zcbBKKNaibqqTS3O7dLWTvIt7TjvpeAI33TaWUVZ0lE0J\nFYnQ7U8YKMcbzEJhbssXiC2C6ojm44gUFZhRkrSnI2fHwkEVMkJxwKYQINFK\nMvUX\r\n=7sSC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-e3b2932-1598814029047_1598814123119_0.4505720813521281","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-18404d6-1598814233958":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-18404d6-1598814233958","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-18404d6-1598814233958","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8db577df1cb17347fc2b70104d2b7eee88c69d61","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-18404d6-1598814233958.tgz","fileCount":7,"integrity":"sha512-C0pV26f6DY0DxB9qdU2PqwSy2RqiAcRCbTUY4+vv1GS7+Xe7itnyWc8wscNcEzpsYisfr0uJ7QnJ2UzCPPpiCQ==","signatures":[{"sig":"MEYCIQDMVwiXO5wq0BKeHrwx/xZiIdly0sDWygQ6jzBW0hyoawIhALbaqHH9dF6nC1/Wu1hEmyPxMTDRxQwS5Xq5wyDkR1YU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/hNCRA9TVsSAnZWagAARKQP/1yhepHJcPCsaQTSB7Bt\nBZcu/XX4BZytUkTI5A/5u8rv6vnDFmqAMbZ7qntqsBVJhbx/1KGdwRZnPnBa\nj0GIIJFhjdhyPmB9QK/3AmLrWqyRzQNf77qPAv2NACncVRazJ8Br4Brr1m/9\nhH2PbcBYGnwwTP7mnDzRgPAygo2ZzIU8a3cGobOaWKeDC6Mf3mnz+M5pjE0W\nUXxLtplUC6Q3SyfMQPHkNe4BVC24Ey/TBV4KzjtgbQfL9tdpkvKLdvBVXb0z\nPeQv7el9M4UTIZIeKIMtPYncbEuIYOnKM82XA7pBsANw1rH0IzdTvzn2EUUH\n9IP3ML6ywxwzBRbTsnPlzWJExskwuMgAkl2YJB36Xj/kvL2o6IoMeiHmhN77\nvUrBI+ESGLuHTz8fqW5A0T5w7irRoQve0p1WnBuLcz7q7g1dy0WnAPvPnF6M\nJDn/v8ATtvC35dgvlrCuwAwGKxGvbknowN92eNtLvp+S0v6MhI0bpPxugVhJ\nylwcU9xnpyM75Z9A74pFy4IsCIZjWu1rFSk+4VDfHMpWVhdZRdO6wl4EIX99\nHUNXYoRjrI7kCLFu0kw5XK/pyE9PKjt6Q6Ifirppvc18e28NAdqCBZihYXzS\nwsgi/MdhfbTEPvl6kkCOWHhlzcvFKLUWxLYQx5IIJsYDpf1Hw3Lzx6bo7d8B\n+mYy\r\n=F5C4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-18404d6-1598814233958_1598814284607_0.7740030290614837","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-5fdf004-1598814249187":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-5fdf004-1598814249187","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-5fdf004-1598814249187","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9e4e45f2bd94b3c35eccb46069290f2ecfa615cc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-5fdf004-1598814249187.tgz","fileCount":7,"integrity":"sha512-328N307v5xEpyiiIqS5BQPYWLp9RZb7AL/Dlo4nx2i/Nr3aFOHElGvpUpJxAobkq5rhKee2V6wR/2n0WAy1KuA==","signatures":[{"sig":"MEUCIC6bP1kayT0ICQ88VVLTenASAUW/8SfLSOxHDaRLG8ZrAiEA8Ef28AtZEP53jc9sud9gtTGwCmx++PZ9bWmG9shEMaE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/hfCRA9TVsSAnZWagAA7MUQAJ53+HTzzZwC7ka7vuML\nCdA8B+qa63Cp3G+N6hQKzwopdZGcg8ReSI8EEl+5DWO+57POsbYKY1zZbbui\nK5BWtkDJwhzIESABIjhYRZ5HboXfx+36DJbf5UA2ZtzrbPKy2zlbbF7h3fpZ\nJxlTgvs3ZtczNNhWvY0ddxO9b3VzTW0QTTZcNmkfYjlIasVHcTxTiu9R83Ui\n5+Sf6IZgp0ZSvIgoAKzGlYK58gaZXGtATDwnZ9LuzSZMIjSz/mHuc7Cc2J+Z\n6TLkSmB2NCn13JfAzVQfHzG+y2gJy+Vep5JK0/OJzkH3kwhHumHfKgxH4vbt\nI+u31QDRtId7h5X3az8R2R9A03JsfCFcSxGtaK5wdIJnTVdlh4WoyaRakn37\nKQXBXO4gAuThlerl2OIwbxUYSoUw63WwLkrtMeBSIDQGsJH6rnoBi35tsBe1\n/I+wwRKVGTDYOJGnW8uzybeO4ROmhB3SKkegEAqdceRtQ6DDjFjGQ51K1PZi\nJAgLEx38fujHWEKcOYKrRgeTRm0+EPO0pgYtQBGa21npSBiVq1KT7lGGd0xe\nqe7MmknNBrDx8psxKzQ9Kcg/u8UM40KRo+4ZW9NU7SLzAkhqZgQ3hsha57h8\nenNHRwa1FJ91mBofhYbuN7vE6UUHtlQNYo2elNKabKYwPFsehyMofyewPRCO\nxMiC\r\n=i4mM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-5fdf004-1598814249187_1598814302676_0.48765747762400724","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-6de811d-1598814435697":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-6de811d-1598814435697","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-6de811d-1598814435697","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9490ce7dffd9aa5a7149c1b9bd2f6364920e1780","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-6de811d-1598814435697.tgz","fileCount":7,"integrity":"sha512-gjiMmjs5nfFxBd27RtodHKf8aahnbvBlQDNG2/R1v6SvKPp9hIfayetyr2XsO8LQix+5kzTC0sEaUstpEwQ+5Q==","signatures":[{"sig":"MEYCIQCplISOSyvTJjW48Dq0AQFCoOLoTQuuMT/gPuRF5UzXoAIhALCacVu7l0xSMAve+OIwymcjI8VrfhQMmrednwUZ4u0G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/kaCRA9TVsSAnZWagAARSAP/34mnAI/NlYZw9AGmkXU\nD0YZULCdPHEWrRhwDrncUZTlcRxJxRgL1TYkKe/XIFooDxpG9kfvUNGGmmJA\ncKDTc188vzxkk1PLGJtNPQEutE/QcZMzkE9sWtNC1WS8bNhoNoW3+qj5peb4\nyGiIVjA/yvemS/YAAjTG5dr3LraMNoRs0rTYhO+Ru4cMH6wUW2CqYCs+re7D\nl7zGz20wsdvdKQ30SMeFUiy/p6UdjJemFdEwTB75PctTqRv3olU9Q8nUK5E6\nfVBGkHtEitzhqv/kxXyHPVNuYtxkcGGtj5oDxTPoEs+ZdZvSFLNJYNyr4mbQ\neOQu403ycd0Pa5+3vbd5GoUvVhZ8MGsYdQiA4U8cuck2RCy+wysMUnFo1/6v\n6Qs/fuFlqTRoNalykErdBFuT0ZCHS2y7M3HpCLr9aTZ4fs1BI6J1VO6kOeUg\njRRC+pzdcGa9xPOZq2vzQIiVA8ObXjtNGIJ7OBSm/YlS9AVvRuOruZnFeBF2\nZyI3kL78JX/VQQwZS21B2QGTlSpk0V4Mx9MWNT5Zc8SpSUBNRt+YFRWq2a3U\n4xKxnYwzFzGwKpB/azOVZREdQUuQl2bUxnmXc2JDd8x6WVCb/GCqGLV94gS3\nt3DOpdedwDYM8KUCIhJfRn8woRPWBYQzFUEoEmV2r/jGw3lXKxJkE32KdZeg\nDjXR\r\n=g0P7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-6de811d-1598814435697_1598814490022_0.379106774366075","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-4c9751b-1598814444759":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-4c9751b-1598814444759","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-4c9751b-1598814444759","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"755e56b1d13aaf93b301844f7c73ca6145da2aa9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-4c9751b-1598814444759.tgz","fileCount":7,"integrity":"sha512-/lHO5pmpufTsWzZZJk5mKX9Pvx8vuFSt4637FrwsChyiLZ2enJ2txyZNygiMLMT4kCDu0o5xsv0albIoYvOQ8g==","signatures":[{"sig":"MEQCICCe9WAmS+Z+bKh3hfnFoTvf+8HJvANhua3wGX8aou7nAiAmyKbK8DI544GZYpijHJXSs0crD8YRNtNpXXZDZc6j+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/kpCRA9TVsSAnZWagAAeIsP/2tGkSzFDNJcSnvvXytz\n80eTp62sVKTmAamN0MbRDuj0oAeV4hhPx0g+TUKlVM7J1FWotnfY80JSdV+B\n1sxLSPDpX7hSf0ibHYoEayi/SjbnOu3jqL00HQUXnDvtDt1CfcuNg11JkR4o\npLENQGIw0UPlY1Evy0rlmEsOXpLh7lSnlqbumeqLDn8/u5+GgXqyRwVRgQOG\nUlr4DzO/8Lh4E8WfEMYoUzOpbUJKLMwwiRgrVSr54XO7+f+pxwM4CTtslTNW\nY2BtMTRYERPWwHglU9HWASVeCkWYLYmA55h3+otgxqJ9cF1lwijwXS+WWLda\njzcmk3cKjmQBYRPJRh1k4ySdImoXPP9IcHx+iTKjhLxqPnekXlIBxxhcJVX1\nk1IpLvR78Wi2RZ4ECJEAgH/tLNqIBpfu2gaFaiLw5vgryVuepclY0mEoihKA\n/jE/PlfskM3aasQ3FV1qtmLv54FHWsCGIdrQYu9HxK/0XvgT5zlEs5rNp1zW\nrUFeXGp3QpdyRZAK/0CTyBgHjDyszXTRAwo3xepOBHJEUzsOB786jrGacXHy\n0RTuF3A+41tDWfPypxa0eAANFrE6UDW/yjVmCiRtJmSCLf90I2Q4tJaXHyDx\nUdqzj0SEtKF2wIdDRmCwVHiKc27FXCjGVy0xALa6lzD9BaMc0NjEIQ7vfWzp\nQ5F8\r\n=xT2/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-4c9751b-1598814444759_1598814505134_0.3410883592253193","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a96ac93-1598814662053":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a96ac93-1598814662053","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a96ac93-1598814662053","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"aee7b908ed9528c6a421c527f1b94d072220bec2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a96ac93-1598814662053.tgz","fileCount":7,"integrity":"sha512-Hl1TTmFgQBxdaP0GC3QqFJQfc5WTi8sMLLsY1OPCXlA9MP9U0wlP6Brk39sPGLTWa3oVfzPzbuMe8K8POlwmvA==","signatures":[{"sig":"MEQCIA9iIDhsjTfgvtMUtEE29pe20tld+MtXTA6e4g0nSUSAAiAybuGbZanMeu1ql/K6FharNCrDndYX0iYq3xd9UcrFrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/n8CRA9TVsSAnZWagAA5lgP/R59hXfPTCOcVj3NYSfS\n2sdckgoCn09kssLjLaOpRkdzjkt/81zdZOGc4zjq83qI8qa+OihHbFr0stH5\ny2fg/bkqnln4rStawkY8YS5XgkNvAd7zdKFm6qrrxjGpdn46D18OhsFnYb5q\nQs4RrAhiR3qc/3bbnfqUjEXCI2H0DAi68RS2OMt30TLJ9csWFdsva2O89l5o\nmKny7F3xY0bzXTlFESYsCpu/bbfQBKKRq/IDfuKzQA+mrtJg78+5MCj1jkwF\npCxJfUYrN6u9/r/p9aEDOqak+fseCEUdIY6LOqnCB2+P+s4bLSqleg5Y211X\nf+CtR/tNXk/YdEaYPLBH5Bc5jNMbYD6UPiMBndz7KCAnFMC7+G/y6kUeMN4+\njC+4ttEVV6d+aZPQqTd+PEwxxL0G6FVtFgE7S10a0xj9hADRb3wC0EQuokp/\ntnH4KEIOlLY5nOsAofBWhEtZqvGCPFuJgov/I4Dgy9D0nXOMckkcIz1V/CSG\n08xKO6Aci0P4q3GeihUqlwtjPIUs9lH7c3YCtYV6BopnuffUnq2UuPrauog3\nTNNYfSK103k6HPc6SjOm/zef0Pg83E6U3YJkibIRouXlJj6g1k5Uz1PrldJq\n1AV9hI54fMPgDSEKLQfFBy2q0H1bL9FETkO7EO2F5VeTJ8ZZj62JjqVTcegd\nKQ6E\r\n=nRj9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a96ac93-1598814662053_1598814716045_0.7633042174704694","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-4242507-1598814660948":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-4242507-1598814660948","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-4242507-1598814660948","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"35dd82598632a669a2df7ba56376004c1d67519f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-4242507-1598814660948.tgz","fileCount":7,"integrity":"sha512-9x/H6IkHezuWyNtFwVq7Y0P4vB3ibhlePo6XbNL/vC1LgQKKndAvS4Zu5CYenMMBzWb8Q2o6uETdFLTYH0f08g==","signatures":[{"sig":"MEUCICv2luXuvkn3i+mUEOaX6hIpjFzHSZvNZBxlUO5GaIu0AiEAyHXeWKzFoZuBkzRcyD4MlcmwoIgIFITnNJsnWaB8KWs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/oLCRA9TVsSAnZWagAAWUoP/RlkRYN4cXR/hGMJ79xa\n0K7yGIRMKPkXmEMOTPeiaAXoLm9drFIHbhEXhgyZMchAvAes8Y6/P5N7Jqd3\n7fo14fpMxEsQPktjeOREpL/VR32Q0Hm54HHOj5NqaIaKUJupJ6+JeTKnyeor\nbGWgykKpYxLot5jibaubWw7kfgBKCCykz+DCMKEkR4vsO93eoy39TvMIfRBd\n/RbxET/3M7YSvpqRwtIHbtONYxxGV9LUynxIcavf8eZ3H4E1ZRDr9NtyQ1Mv\nFDH+E3kTIya+WHe/vqA5pK9LP5vZFnZpMwZYWI0qNMJvdlE8YJuRRNfsmsa3\nezAjd3RaP3/Fnw7eWY5AWFqYzi2hjW4zqPZyvEwK/1vQ/4bK0Rd5E900KAFT\npYsfJxVyae1EAPOZgX83HjwUcmJ1TECIhGL2jpxNj9ZW05obn5KWvnSzxCNN\n0vPvEbA7A4nKHEb0NJscVBg5sasMr+b7Q1LykNrOTHh9wqd4zMy5fw8zAYW8\neOTbDci5507QTFJ2n7W7nQgVCeWaY4xeeua71qVwpc3bEXNn+3TlOt82wI88\nLjl3jdvgzFrJTWGy8ufJ/wy4pHYqmQlkQ3EGLQ5bcOdhmrp4DHwn1UZrHhO9\nwPe8PKH4d7E+UqmXpljdG8ZIPwz4+fQ7cPsUQbBOINUw6e233VWrGMqtY+pb\ny5Q7\r\n=Bwsa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-4242507-1598814660948_1598814731442_0.8649490470559695","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-67a6538-1598814827908":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-67a6538-1598814827908","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-67a6538-1598814827908","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"27a5f0a0709c7d9f78d73c3a57f583c34a1101a6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-67a6538-1598814827908.tgz","fileCount":7,"integrity":"sha512-wbvL4nL9L2/LGO6dgcyl6xNO42iADqzHNgY3I2xBrj4kPIEGUX5+jjgId4UaWGcXMQlNrSajVv5R/nuZ/GEcTA==","signatures":[{"sig":"MEYCIQDU/f+ysX/pdf6DD7EYlazG6I/RACKdN0WO5nW4V4fN5gIhAOpz+LMhj3FD0kpT5CrUytCNGo/JSdMKxC08lvMytxRu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/qnCRA9TVsSAnZWagAAiDcQAJv3E5YsZZEckVroZQk9\nmjlho5meKvESL6u/nlLyVvN/QI/VHkZvH7wpQBBi+ehridAt4kN+DTcZFrlb\nHUgHXOooPmKEl6A4NJJh4nriKMzivX3+Kvr58cCVKlMZ1bpUmO4/eVr0qTLj\nPQ4tfYYMcc5NEPFZx/Lmd/JpTEOHpr6mA+YtaWpJvkq1X1qe3xFYnB3G2Tls\nL1O2kmxumb0ZvhoUpfKvMtjDWqLV986XdCP5IX6uUBPoRe4pn20rWLxYLk0w\nFkIPi+4UiMg7Km7oDFaULOfW6W5iiur+h4xwCy+Pcw4q68V1qX5kB31EY6rP\nDhYLKGFNma1a0JiwifMxQNipHlKWJQCtHRdSeYAAF7lWgDG907RNObqUyFsB\nWJ0+IpHhybWSyxEYRIn7jrFipduOyZuTmFDOBQCy9HKWDQ0IMi1jKEiuT/F9\n8bYnPHUFRpJG5OAI5GLBTXHQPxguqfFqueg9eDhWPHt3aeXk216NC2AjdqzQ\nDJVX1g+j7JytkYX0hD020wiaWiAXo8u7AP0wUjQnCp8tCrla8/efTOpfCS2T\nwynJmwglLX+XBMceYqYG0Cag9KhHByXJxpUCIYjUIvqNygunXajkrIf2Hr+1\nDMCMta2TqLm9ixgHMQo7PkX4Pyb2I1jLluvC7I6bboOf3nPGFvImq6KsjEyH\nSlku\r\n=IZWF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-67a6538-1598814827908_1598814887475_0.885886032667496","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-f852ff8-1598814843668":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-f852ff8-1598814843668","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-f852ff8-1598814843668","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"aa49b887a11d3e8962dc1cc68d9827a156052743","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-f852ff8-1598814843668.tgz","fileCount":7,"integrity":"sha512-sYfxz08wIPGI+erBbrZA7OJnCyPvW3HO6udaro7vSYMRb72nQcH6JF37qm1qKBy7O+dh7CY7mGwBrh8oqCAISA==","signatures":[{"sig":"MEUCICkTK6M2B8h3hANnidjMpr1opUkzEbd60qhaBaJNPj1MAiEA1SD4VfUnsGvMlnOoqaJAMMDCo/bTPiPbD01h4gMIfDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/q5CRA9TVsSAnZWagAABr8P/AjVcMAviWNSROrKS2pC\n0LkuSPJGaQUx4a1ydzt99GAVc9GPAEPu18P5spjHEacaZ3RoWMdI/l7pUi2m\n2lGEJCkXmqLXp3bJHHD5ro9/7W+6lHF7raBuzlfQHfoFLzv2uZutOm/xSH/S\nBbH8bcTM8ZY/KPqxK6FO+wWg9pqnaWXj9r2eoAtTST7iVX8+rF5mIiy310Yf\nLl/XGxoMAx6OFRw5QkG4Ja5EO09ZuTaakgqzrST5rtEY+p4aEh3zv95ZOazB\nRZccKgYRlTE5rUurWreBFR4qm6G0S3T/yFoR99pfrFRVKnWjTiFpTEJMOzxa\nYjg5xOnLptLyBJ+vik5sghY6MSNrnn7ma5N57MY4xFpXB9FbOvu985HVtoMT\n85B7l+BXzWXZRpBlph+2Y7Qf4Ei1CUhutYKu5ocndl0N+nfpr9c7jQBTzvIa\nONkZAfpF5jrSoi50c8KaHgeP6TWb6RiY3sLXjXWQ6m2/8NuZZ+oRym96Hr9T\nKbf/tsxCiFFzUtvwy8KeYqNBNCTH0ni+MTS/YhEnqGEqzdEtCU27IkW98oK9\nCGDmVGEEM+R0U1W0J8AlOWdkVlG7/VQWdn7Fvplgz/9K1qLFfsR6zGHX0Y2l\ncS7GGoy9lBi0q82bk1+bUWbi+1Go1vp/gW3m/mIzj56ogu4+OABZ6sJpmWWN\nQ92C\r\n=4bcz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-f852ff8-1598814843668_1598814905323_0.7677584534823128","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-6ab5d46-1598815061481":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-6ab5d46-1598815061481","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-6ab5d46-1598815061481","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"32be637e2f1c734200882710b9a8bd1989229c2a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-6ab5d46-1598815061481.tgz","fileCount":7,"integrity":"sha512-pHpGtL0TQqmoMbK1/zgQmyVVrhWdkeUuL5A4HtHAQqgqj9YU+VwOtvWAKSrqjuXb8urrs9XpMGNC0CnssM7Bog==","signatures":[{"sig":"MEYCIQDcp1kvzGqvn9DZe3Hf5NrBcnnvJ8tmpiB9Bura9GVblQIhAMotyrQnGQ3peEINzI05HM2ygvodULF7VXly/nrLh8Fv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/uOCRA9TVsSAnZWagAAccgP/il7P6h5IPTrrHaEbeia\nmZY1aUzLrK+S+it9XcPbrZ5vVFPJsB6sbWgApmvx+xAa7WWZ0kRAQL0tJgZi\nfTQ+6gbRP8E9Z9nuZSktFYCJsDt1L8isdV8MrtF3nDvpLHZjx5wPvtRIAqCb\nM8Fp4g/Fpb9fOGmiOxVnhYuMs3zRAv3UCJhc2ahn29zurtpfEhOpQ2k4vCCu\nzbofMmC/y0iORHz0UorXO8c3qRS8rHhBWIh4OIKSBBsTGdKVqDEUyS1lYaaA\nq4OK29avSeZphQUpwbkzgi1zSMjfLJVBtSsddPKRBMrCdVmVj7E24z4GmR7S\n9qnJM1is26ZLF0yNrCH2NhhIOp7+AUv3nGHdEZihqJKbgLKvGulgNQNAvztn\nrYbdZTnfYvcv31tcvHmVaY683Q16LIwtkFjK5yLwLpYK0xIIprG47q2NaSV8\n2Chyi4hA8JIkAdjwZfbQXX208rAsckQGR8dHxk7tNnqghXGb317wPOowiTTo\nunXaAbQJKC7y9s8mD+M2cvYbmgxHE2VFc1pFt6pqdss8cMbvhOzYXw1yIlwc\ng51+ABNif89xGZ6s7OtIq9H1L9Za1pLLnzln8kSBeRxWgzcVy1RoBvcK0z/G\nVu/zBNbw4JYPEN6o6ElD0mr0IW0RgyiZmVa/nYqCeqaMFSdZnXqQm/DWf46g\ny7EQ\r\n=IQEI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.0","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-6ab5d46-1598815061481_1598815117803_0.21699158257230478","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-1dcd34c-1598815075787":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-1dcd34c-1598815075787","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-1dcd34c-1598815075787","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"77fc964512dc0ee30aa8d37070f9822e8ab76d3a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-1dcd34c-1598815075787.tgz","fileCount":7,"integrity":"sha512-+1z2IZrxPE2kBKryGqocAXqhshpd2m4mcWfQvPwHZBuhZWjc6ql8t6/YzMB6lJr3aQHVuPsgeQX7jDfbVAVv5g==","signatures":[{"sig":"MEUCIQCAgRHNrlEXJw3kK7JBbxymQ40PFl3O5BrQuNIc7y2w+wIgdIfn0P1YudMdzDFQMzWwkZoBx9WmYy0IzXyETAqSUFQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/uiCRA9TVsSAnZWagAALjYP/1ROdN8/Nj+LQ43VJvBE\n2qFiwLcd4Gp7EHUW4bfJsSIX1I+vdcBuZ9VGweVma5P2WyacTfy11VGEQSK5\niyDN+myfjaliCEAKdkQwGy5o0UcJpNdOEYqjdbsijiVTBxS9vud3T97t/s+K\nj52P5PRed2vgwXaRn4HW42b5E+va/bkteoYPbMw/hYYUxIM6rMlmgi0MHJuJ\nJUPvbVhSUyTlPW/XDV/O7iVe5om6wWSC0LTLufiWIQCmphaSHy8o2tYo8Tsy\n5JSVrZ5GUfNlUhmcxLvzmjuWZw6dOD9Nzm+ZpOReFSIf6TlXq2hQV1CYCCUN\n40bdmV+PCgtTLZ8Tvrn8JzLt0nQvdQkjMlYzijwG5nPPmHZU+181JNL3B+Qv\n7oWWObE6e2cnPXg8lf+04qwJc8wh/Z3G7j2ujfdYZ79XWmVe+qb/mjExjLKW\nyPmmVdRMTa/Ba2r9aRFCLSZGvL82Homv45O3xxD0r0j1eUtrHy7AKMLOZcI4\ntWP8fPKejMXqoNFdJXGp1iAoB6Fghvy+Hm9ax3TyoY6DdO8xdbBBo1h3ZES9\nj07bzYNrIc8ZhDoKno1B1C+2iM5qFKgYVI2DMPZb4y91+Qt/GM8i4+QzORhV\njl8QeIzARh7U5d4zIq1so28RqiRMTjVw+r+shgmB6Cvu4A8vBdN7YdALITr/\ndcR5\r\n=VDhf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.18.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-1dcd34c-1598815075787_1598815137393_0.4519905074377655","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-6366fa9-1598815259024":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-6366fa9-1598815259024","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-6366fa9-1598815259024","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bc9dba2d5ea50b9c90591310f2c950089a821979","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-6366fa9-1598815259024.tgz","fileCount":7,"integrity":"sha512-u81LGFAi7/o1om/J+XE/B+HDVqRipc2XFpu/k7mSYFcCSpq9bH2P/vazIA/Nr6ytoliQzZICMrK2fvch5X5bvw==","signatures":[{"sig":"MEYCIQC9Hx4F18Vl01oEUQKAVa8Sh+5GRyx5BohYMIOCFTYIHAIhAIHHFDASXUWn02bvl13NxeTzmJ8Ezbsb/cLxO8kVe9c4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfS/xPCRA9TVsSAnZWagAA6XsP/28pepLS0y6YB0ruzusd\nDaQlg0ZCaXYdaMar083hENmhOJMw/NRGjMgL+gSUqek1RMR2BpCaF3gNMp0J\nUN10X7r7TWvyYDvkQRW3ghrAMfL7zE9iCt4UQh3WPSWGkEBnKZx4nbQY7BDN\nLY94oyQSdWQeuQLDzA0F49NVGHfQ23GajaXtYCgZyYuNZl05+UUA4HkkYKGf\n9Mc5S3zzSC47exQLG0eDEDFoTIVM9bhFECLoDqRmK+Z15+PYubkJp+d+mo9v\nYkOxJNg4CYvu4Dbl4iFOM5A818c+V+Eag80H/zEBB6NxtVgLplSeON++bjoZ\nqQ00t41cNdv1EvQqcbELkvPET8JsIwdhEhijMh22k+/b+8d9dg4kKFBQSEvC\n1KcoPchXsbq23nOZTsGMX8hUkeDt4mX0g3ZqORvdfyGfq3XswWtqgA40/N3r\nWGzeOE+ZI0enhNRNpdXDWczgnYoVKcWa2XW4KWcVJRhQwDOl/pELmMD/xqNP\nUQsfCxMu2//PjVQ/UD09KYAK5DlqbV9W0zXBD8BnBbGHWjztoXDDZP9O9pHC\ncjTv8V8jWIoRJ7XdeMUG3ar36b8mSA2wqcXxkBImKpiT+8Z2ICR1XAQActVi\n/43XJMCgooBFxwAOqG5M1C+0dVYRHcBoiaXXFdCvwGZTiPdVqym4KXA4t7Dp\nU9g7\r\n=tiMq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.10","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-6366fa9-1598815259024_1598815310649_0.7661393024079786","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b8ce41c-1598968813430":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b8ce41c-1598968813430","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b8ce41c-1598968813430","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4769f3d50a7250b93177cb11f7df7f7aa077979f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b8ce41c-1598968813430.tgz","fileCount":7,"integrity":"sha512-KluEbNWlaah+8nYctqL7lUv7t5raaFH93vmDgS0JjmCyas4suNwWT666tX75BuaY2Bm38JvSkU1pFXjKtJNqPg==","signatures":[{"sig":"MEYCIQC4hpx2wgn89zihqHQSeyMisqxLRtMDk/9JhS2q1MNK+QIhAJeEG0hXZErOw2ui7z5bCxuxeLXw+iv0ORnSfPOyk5gA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTlQpCRA9TVsSAnZWagAAogIQAKS6ytRNtXd+wQiQcb1z\nRefCaO6QFTIP3djU6f5pKug3+YTX9vZFb1YH+Svs2+UShx3uIyo0C/skp8rm\nJjVR/pCmZRzCkNu4kWiSrY87k6IWJGIENa78VthV7ViRCNNmFj+hOnjDyDEr\nHCy9g6IaidjTI+U2EWxBb9j1PFRVK9wRQdqQnytWKTJmmYhhYx2/m6x13VS5\nqI26U0Q/kdjtFz5dRY5gQ4xMtoYjrUswCIIkA3VvKKd+iHKZokfF/Xfbipj8\n119nNh60fXeY7W3yrf1qPo/ScVxQSgFfQVTn235I/fBOuJWQT4QN2Pox6bfE\nsNHix1L8ZhsI1T7l1Z/AIP+6weDGTpjpGep7zqlutGE76BzhRFoa17Gs4we3\n/htEUB7MpIlMbZIMPKzI+23dUtIpSFCIJp63rXWYhC6hEpu5smhuOrbQuXmi\nawU8y1YQtXAIv9OXwaWvmirHiJ/cyH8KxFGaTzNhvlT5gTy4E8Qm1Si5CmXT\nvwPvIDKeYn8e16E6TEAulrpum2n5/yX9yK/Ijll+LRUwFCyEOvDyNRbNSL1q\nPT47+fkEr8z3XpZ3GlzJVjDyzdbN7oaHaWNlP0zZIzeBfBFcOQZYcH4t1h5j\niXsKT3vq2qbzRYvC6zsSScr1kj76pNs6AtcGmLZibVzOPKiIlW4hcNLeGdIS\nEJdK\r\n=Klvf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b8ce41c-1598968813430_1598968873107_0.13258689286289593","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-b8ce41c-1598968814600":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-b8ce41c-1598968814600","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-b8ce41c-1598968814600","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"04d1a330c855ff1277d17496df06b63fe28c9fc1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-b8ce41c-1598968814600.tgz","fileCount":7,"integrity":"sha512-k3a8bSlnsNLf3+KasTmX4cmUR40LOvclVc7ULtuj+X1I6sJxLQbZdWzXrHy8SyS3af6z1cDHtaAuMwL/5W/peQ==","signatures":[{"sig":"MEUCIQCjst5SvLMvQwLby8OfeNiCbAgERPdSkfxd5QvAeH5pggIgUYtCwPLG7syR90HgLEJTF3gELwZmmSiGQUbozwFdJIg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTlQzCRA9TVsSAnZWagAAKUoP/j36HsNcdgWKCOy+jEQt\nh3zPXk0zuDVWBj4MHPp503G25h9uObe2Kyl0Oi3RNJKiIDOaKg/3KJwezHM7\n7gxxGEURMU9OG7j7V48lCGmOHmcA7aAoerqOcgORqUigw3u2JC5Okqgkv545\nL+1uB9w2KqpyiVh96ZwtROHJCTR8pTfuhlKNaEDrOU1K42DyhtWWXTNILqJL\n16/DuvunU6uzBG8quqCQc52jGeYYtbA/llpa+uV6wq8VHN9JlavQxD6MeUpF\np11XkIO/yK3HlrhGQAL8tDGQkvyU0wm34sjvsm1QfznAWHcPkl23w9WPk4gs\nu8JqiAM0eoSfUSoFEtYi0DSjE4k1nEmsZ1hWWEqoO0yDWGm3sHmBO811Nrmv\nmUCHWWI/2T77lkFDT4tXPcHSmngcEy636D15K6P0j3nEVgPq8Srng8qgVPDf\nhHpecJl4dFb4DxwutRBjrxaj8B0qDxqhMlJuBbzHCbp1wowb8hiGjAu1D6Lg\nxmk6zBA+78DdNyaF6lyX/+WdmaHDC+Hz/Vp28vxCPecVXiZPRPI7K3C3RdmY\nUisz0Vkx6fqnsc6wpYf5x9fIMet849Yl/bbAlKgo2lG1bcjrH/Bg71q6FwEw\nhRT/OS+siJDgIolADCu3v04naUpeA/vh0sWaYJxEWyyey0syi+fEM1hyVrg1\nq+De\r\n=ADaJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.7.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-b8ce41c-1598968814600_1598968882869_0.7604959680982926","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a065ba4-1598973280681":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a065ba4-1598973280681","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a065ba4-1598973280681","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ea1b8d3b6dffa174c4508835e1c992e7ae7188dd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a065ba4-1598973280681.tgz","fileCount":7,"integrity":"sha512-nUWAhLOnsBD3nBQ7raO7x4QUASWk81izFtbusM1eTtlKWOLqY4KGUsjZ4c/QLVPwJhOwHi8qQExBDQB7/jW8tA==","signatures":[{"sig":"MEUCIQCeGgxlLAaGJiw3GOhlpo23vBDegj35ar+Uji0TEiKLSQIgK6yO1zdn8hMRxrngXw5JdP8FzIheGkVW/k4VwXjUCCk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTmWbCRA9TVsSAnZWagAADYEP/3mb9kJza7oSuZweMAbv\nqbJ0C6EzSHG5TzDsxCbS2PulSd5V/mXbHotxsBikpwuhzu6Dl5qmvW+iu+8M\nY/P8eUeS4zoZDgtv9Ay2ge/2FuRszP++c+VPXIw2iNfIVo3owDjW3wTmOgwZ\nrv/yOLctNtdnoRIJvLf6CFeN1lnqVO5nuRs9MIwAFBN+g+WLsOLGqZPJdWRB\n38U1i4Tq+x9M9wA8tNlYIl5VfoejEQ7JZNKYayTCvHgnOGqEu1KVpBZiditH\nU+6QAfyPJKTGIapXhliQ4QtX6eanwGpFhvrGP1AUGVnYt6CyjzrG2sDtulcn\nOS4+DDu3fznNlDLkPGxhSVicqT/YdJIrfqBIlhIOY92cGgQPNt293SJIcTUy\ntSIfkheUbuQq6MHNF1FuEiSkI+x51HwmNNpuJc9rHOFUCq02vDThr7H6Cs3G\na2TLoYIBDVxNNhhB7A5YBpBJykyoEIxLIOQv/utCA8N6A4uBg2dk6ZktoskA\nHr2wG7j1oYbXaFSM8mLB+T8ZlRaYBiQkPpUCZULpxfXYnDs8rrMIUOkCGBiX\nx/xK9f3NkXmkI528Nv5yRXvY8d1A3xb+qfVNG0hKyGPEUNcZVWGtA8DVJxmU\nylOGH3MzAM5E0DyPeIZ/PWmilS0xJXupHiy/rv/UU607iHveVSgNmEGSkpC3\nDdAj\r\n=0VsJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a065ba4-1598973280681_1598973338453_0.47949033871384095","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-a065ba4-1598973288208":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-a065ba4-1598973288208","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-a065ba4-1598973288208","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"519a6a9f08378d91fcf6075f8f1a0bf7ec5504a0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-a065ba4-1598973288208.tgz","fileCount":7,"integrity":"sha512-wJ+dlQJkwb21YqRBxJvPhceG7LOaEfnadSzQCRJpONKRFXA4MjyQBd/GB7rX5P8/fQAyFukJzEHAIlthWv/mKA==","signatures":[{"sig":"MEUCIQCVLEVUmFQuhNA0iWyOrLilUQym6OKnedbTHlljdSHE8wIgFLaRD/p0u/TpGuEwDLtMO6zVq1HVHXpoHkYav3vYT/Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTmW0CRA9TVsSAnZWagAAPZsP/12IF82bZETnjXNMVRNH\nVmSh+AVLLkvgw5D6L0F3fBf6SClenAuwevejLUNfHsMiehb9w4wHPBCHEKWh\n2/DDBWyG55XfE/aAQRpFZxisX3MhSDwYX2MVbQw/SDD7BfblF1X+L/ul8f7f\niZRJ7ZNABE52dgVB7ysGJb4zumTrg3aTbopLeMyKZbD4NFradpiNaRnKa9mx\nlorpZobwLnBkq+vl1XW3U1fkzRwTrqYydYujcEtvDS3HxoAy6c1P7jtIXT+I\n5CJIz8SyMr1Rq76HVlRvfB14Eo0Hwz9u/mtP4lwQMdfTy4hiQxNPSiAiws+X\nASq7hmqr9Ud9i7YVVy68NClm2k4asUoNHD2GLLsusSd+wYyFZ5MR3euosdhk\nfSqPGxcKMg/bFjjd4vvpm6cx9AwAT/IjpG1ga8xr9UNJWIKNugL4PsZCe/ox\nofI9MM6Gtixe/Yc5NoiNnFpS7kIqvwYkbVYsOdZIASCDWZ8TYBfP7CO/wz4l\nLVnT7PSIttdFmyS/bieMsJwmtrinwXnA3zYvHVOi0RPAuiNxNYBquu8HKO/J\nOaMiXanomOu+F12+4wWmG8A0xdTlJ2u0jcSxwoRStM4vY+c68BsCWlttw3b7\nK8jcj2XmoRdBLCTJ1Kpe6P5cA6Ro+7ahZ/J9/mog41Ml+qsdPm8ezdrhtF7v\nTpNw\r\n=WAaG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.0","rollup":"^2.26.8","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-a065ba4-1598973288208_1598973363801_0.42709980316495955","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-3066bf1-1599031361406":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-3066bf1-1599031361406","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-3066bf1-1599031361406","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e53d41f36ac4da6faed47dc0ec3c66d1708f40f1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-3066bf1-1599031361406.tgz","fileCount":7,"integrity":"sha512-DOsBWX71SprAAJHHJsAaF2W3m8L0p9WWJIa/XN1TNqQN1wVibzNiG/gZ+qjmKgfCQvmppWishG+kLgJr6qvFIw==","signatures":[{"sig":"MEUCIF5PrKv9UxQrIl+L+Ows/xSCpTJ9en8FJiVW+3XESdi7AiEAnDJLymNVCBF6BNEtejfSAuAshvkoWRsiFjlpJI+LCw8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT0h5CRA9TVsSAnZWagAApOkP/2mNbnsjE7obOuXNIepI\nWHjFztkp0Gg9YuQZomFngCsqa+rZ/XLN4+yFnNFwpqd06r+GhutLSMaKm/3K\nS7CWV6L2ht7lIUY8V32uXUDykzJ9kkQCIsHSQv+a0Hx/WqXzhdOsZtJbGzsm\nkyGMAMK/ONPGxmwxYYEak5fiaHp7ExwYCtyNF4qeisiOuusOFoX+0haeRXK9\nhDhrXA3Z6M+i2GgMGXCfDGN+EvLFVi7w5vML8FW2czf1gDtgCxjmUtFedkj2\n8m3V80qeWlSQJw7+UDsY1vsrH3eE7t6WN4zT4RVVs2eBXLRHQZhIrwux/7jC\nN79z9cfT3jmErCjw9RRZtmM4R4072/LUZYeVtyJogUPelKgQ6zZNoKdqI7Jb\nqLh1hJfbV2VPP29jt2WT2OOQ0gBuAnttYvBmb5n6lpld4JPsCQzsBsBNdcOJ\n9fLKJBhByQLW0dCeY/dsE3ULNYfBmKDV5R+KnzTdB+E58VnO7ayXhQWp3o6j\nHbQoeGudEbeqcJZK9vpNHMqeXbJYzC8/jrrc3Riaz4IWTw4gcG5GaWzdgVDV\nUISPUj5LQXlaBtekQI2aDuzFguaCRjVV3fcms96pMx4FKNiA49vAdtnNH9ZE\nKu1ZcUAIe5DWx1vGiCSys8jkk8mncrYJO8jG3MWosZDh1ReDN+DDA+kbSg1c\nWkrP\r\n=PGOA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-3066bf1-1599031361406_1599031416820_0.954020100931676","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-3066bf1-1599031365370":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-3066bf1-1599031365370","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-3066bf1-1599031365370","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"642f7e82480d49770079bf1f4ea9c2c221f9db8d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-3066bf1-1599031365370.tgz","fileCount":7,"integrity":"sha512-7VWTxn01IeUPIll0zUUi/0a9Ls+GU//5wRZmXfG7wjOL3evmbgdc+DVameeB2uvsR4z1kpxJdxja3qqYItpZPg==","signatures":[{"sig":"MEUCIDNpio2Mb5WbcUmhjskj08iYdBvtPVRS82Jg0K0RPuNvAiEA9jHhQcZ+gOXFL+bRcs4VtCcV4ZPuOJi5i6yps/Thsbg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT0i5CRA9TVsSAnZWagAAsxEP/jUaBeeBk3KX6DTF7tvv\nI0njx7F/7HHqzzpKLz1bF9SgWC7Tb6HAl61+09IECVpVlMGiAX/UgL7u5oTm\nAIz9FWM9yYdbzQIVljRagbYchbjOKThE1TWvvdsvp4fJJPSRfwds9fio9PS/\nkKGxdIG1bqenkXZKstEciyNRMLg3ZW6EKb8/CRQk6a+SDaCL80ke0HaMRCg0\nJRUpF25/VIiF7E0toxkxemnVbZB+9u/BzPwROVh7lqgmJkrpBTTsyt7nZHBb\nwuyH3nwX8DYzuzhWVeVEWjmByo8buJD4gcSij2RQidJmTS/MpFgVJA+DVsCo\ny1zfHcLJ49sAP3dyzKOtm64etun96fHH2kxAORZcLqVc2/Xag/qwRBGSXknr\nfwwrd6fjue21QH/Imo9XcfEgYDJomrDl0LQXz25WyH6dfIBw1wqfnS7y4/Jx\nmRT6RVwEegCV8k0CNoz1Y5NhuNfZUrNC+a9qMlqd421EdDJpC52+jUdU6iRP\nvlYrhfvfqQdC1yDme+GLGRrAOjj60SouDj96XFTzNszTwWN3kNMIBCfgcZxr\nvLFJpcVexjyD3zRihUT5Xwg4lITjmwLV7ohvFYwQ/U/ckPWsf2NRPSMhikW6\n1p0E492S7wZ22190dzUP+TL/MjBTxkczmh0CA87905GtWxpdLTR/yojj3MJF\ng2Js\r\n=wIUD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-3066bf1-1599031365370_1599031481052_0.23427053133601805","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-ce99c2e-1599067153489":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-ce99c2e-1599067153489","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-ce99c2e-1599067153489","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bf93741ac7f18c435a0c5a6da598fa6b528bf701","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-ce99c2e-1599067153489.tgz","fileCount":7,"integrity":"sha512-eN0zjUeyTfQjZVSY4vChvkGPPH+6A/ApJ2h8gIKRjyChfWcNjs30pr83aotCsvS436+KvaWjs1gkd9yEhF+5XQ==","signatures":[{"sig":"MEQCICmpNOFZ4WiJqJ1yaOYH6wWw/vWA8zBs15uu4nXBD0omAiBsWkgsmCLB0E4dL71/QW0N0VO1FNd78Nxml638a/XBNA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT9RDCRA9TVsSAnZWagAA2sgP/ix9bI1GdRFbo9vjQoDl\nbOTeuQ9LJI2sTJ4RX9+ILvFRUNl1PDO+5e2BN+F7/3nohLtDeUBWrX7kOsAZ\nzVANtETt4yMc6XJ7qwgX05d1aTIgJCzfVqIxh0Mt9uzRqQ2u+4VrSBVwXBT7\nH1NSkXBOTPqO4TdKubk88PV00p+A2obbqdY/mPuKwqSOY876m5eGjzKKeDXv\nPMz2gqVM9OBCrVmvxEfuhXmVtPdXaWYkC29J/4i30QDrEbYCuHmci9vozxYX\n9T6zZZ30ov9PeReSfxFWu6XgXsdgCqqO2IQiu9/B5Soe7Xlb6YDfomPuafWX\nwbY5FiJ2iDKiALEPk5ISeZZzZsYKQd4WhHZvTpFg1LqAdlTuVYaq3cfvskd/\niR1HkBKNPiDamkj6fz7NkmDAPnmzXl4o8PILLz7Pv/MMxileRtIe8rkNnBrI\nxO0L7MeidSosOL4LnWW4aUjzkTsho3GCAWyFByLvzBwFkp2OZ6t8PWx6BJuh\nioCB8O331A+Xnj4sh7zyM49O3s+9YXFs8A95nU4OShHMZp+70G0pBVOsvQtP\ncCI8VNKf3u9xMvacizeX0xqzDI+KhbnI0ZO5eADoO8OZMmIj9Z+JTObJuA9m\nDLyCWe20tSKnStB7HHen2A74RX62ni7ofKUo8XyA5+q0f6jh88HR+PhmOMVk\nWY5J\r\n=vsmR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-ce99c2e-1599067153489_1599067202534_0.44752090223747776","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-ce99c2e-1599067155258":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-ce99c2e-1599067155258","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-ce99c2e-1599067155258","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8c7e7bd6cf3690234803e8db73d5c39a396754c8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-ce99c2e-1599067155258.tgz","fileCount":7,"integrity":"sha512-c8gaJFAmEzgSdecBEVlFHYyJEicnKAQSjhdYldCIpeXiu3jmSK39wUWa8io9lvb8VNaCowbZ4gn4w9k0TwR0xw==","signatures":[{"sig":"MEUCIQDZvLtCzjeDckM5hegZPAkjA0wDnGAgplZvnS7FeoysigIgUoOPvowhRtuHTn16lf+vLTJhtAg8toK/FVNNeVRDju4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT9ROCRA9TVsSAnZWagAAWnQP/iLGHvUCTkLtPLW4E4fy\ne7vMzyXpIVb3f2zQiKP1rlrEIr0pgOHrDfMlosaqFE9XbJswzHgqiRRYewpr\nUFQzzMKNtdjx25aeUCDMDWnxKyuv6BwzM4V9GEBHf5AO5G7aLK7CRuY8z4XF\nxhmu9xuSdUbDl5iA6+0AtFdRErw3lrIuOOcaSV3dAyL0VDb0sJSJ9o5iae5e\nAWZjab0TEGh0tJiDT/XkW7ebN9SwFlqXLRZLfDprU0sWfUZcMfg+0d97BrWU\n5h8W8dOnK1Gp7+SfJTdgKbTg14TRmys/T4fMAF/Wen7D5T0CSuZIUgquwf5o\n+V1aHIVgBhqoVDf/cXaR+X5RLAC91uPgOD3zwbB25vAwFj28hsRz9AFy5P+L\nb7nIzKhAWRFOvYK/i9nPYWWkKQM0Vk3MQiyaHBRC7kZwKcd/bWPCNV8nFriB\nT0gjB1E9/mBqbZ//O9BqnFPC5Sbt2E0goUkgoqXst5eYqEzZ2Per4Ec2YyZW\n9pQv/UxQvVqkOS0mfjhMTwZgXNSHuH8SAUs8YTltq5W2zmMINgkOhwjXqRah\nI6WiQt0a+Xr5TbyOyYnyZ/Zb39dzUZJ4aWZFcEALymkF2lNPA+PRlQUe+8JJ\ndMsHmCQez0p9Lde6HJQcw4GFFCVEH95achNK4Q9exIz2AAU2hbBYBXOMLsz8\nobJR\r\n=R7Hn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-ce99c2e-1599067155258_1599067213941_0.405907339571016","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-3fe43a9-1599115250298":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-3fe43a9-1599115250298","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-3fe43a9-1599115250298","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fa8cd889ccc01707d4c2ccbdf360e2fe1c90265b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-3fe43a9-1599115250298.tgz","fileCount":7,"integrity":"sha512-Rr72v2mYgWCrLhlrcRD/EcIzq1damNOlPQXI49fL1gl+GBWGmGQvkJE5l0Y+wO6nhrUX21/6TKAgRSzgrQGsWw==","signatures":[{"sig":"MEQCIDH4RzHP+ZcvCK9oadz/dPtEK6iJvuBznP7Z/p/R2kjoAiA1g78hPL3R3C2jfA35FHLhKRlu7ZL1NhbmHnOilbKliA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUJAmCRA9TVsSAnZWagAAOUkP/1hvQKra63LHN1aBpfRB\niTCWb8PnxijBTR3YiWTy/JKNtRH9RhTsA2JF/Bs/VebpzjPxIXwok9OuO23I\nTkIiZu2fspn+c/oyaadmxBk6N4MQhGQh8OIdLV657QnCRqhrDUeyn3QW2ai+\nLBjiMdit0PX0ZVBkdTqoKgYMPYLzHSvP4sKuKI/+Ww6UDs9b9chzAOxThLkR\nTt3DrKxrAHG+cHJPZOsvUx9tiaBu1honZDr+D5IZv4/a9C0BawA/wQltRfII\nEj9VgQY8llRUDXa+ZmGnrDXaDCRrECNyEE7ADpR9DfMWzUnqFTKtW1ZWC2xT\njZj5m0XszIUgNw2sglp7ZRwdW4QFFU5EXXhz8Bum9hKhHOruEpr+deXnteCh\nTM3MyhB6KJ/X8kfRfpjlIAJMchlkuhVrFC0xtxzkBBV54VU4e3oo1ybo0nog\nBr5LYfQTEBQIHZc1j+nlzffT30DCO/NhtzcJ4UkC1U5qUFALTllt2trq/4BA\nuvx5vR8p2umQCKduxA9xmrpf1Jf4wD47+7Csd3NPbLRuj4YaIbEiNKBeGBkc\nv0r/D/wNfAG5DPcv1HeljUjRXS/XXLnyZyMQuaMX+YKFXyEIY64aMrJHTuSX\nlYho23VMLr4+zHx3E6oiER3PV18JwQrZHl3dXV6jkiD6lOKfakPnxjXH3Z7L\nJMV/\r\n=/VgI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.12","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-3fe43a9-1599115250298_1599115301567_0.1854160471249151","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-43d07cf-1599145637997":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-43d07cf-1599145637997","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-43d07cf-1599145637997","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"125201730427440ebb0cd9a0652a8f6902445757","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-43d07cf-1599145637997.tgz","fileCount":7,"integrity":"sha512-wlHo83Bn4zn9oTtciPqMslvt5el/u4VxteTkq9eHMXGy5+SHWx2/Iaru5dEsbQIx78X0p0VpCzSKMzvzqbwg4w==","signatures":[{"sig":"MEYCIQCiflMQ25xtJTarx6Hmisg36MrdlNJuXXS1paXp6KlGtQIhAKApV7J4Egr6ZegzqfL1odfSwOuLMl8tlC15X36EMmNS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUQbjCRA9TVsSAnZWagAA+s0P+gJnsHiER7rvLi9bsWpZ\n77RgarcK6Q4UULnr2bLP7QWyLghadkJuUUHajZIEjGpVeO37f6JIrPkA/rvd\nSLYDdEp/mBgSBguKUnkXaV4QA0UMlEwUH/ARXEqxw17FAD2YQcNFoEon52Ac\nWv1/bx4yiGdrqa/UUFIUnezYnUOwDXkefiHp+r+PWrZjCJMlJeCdUG1wobrF\nrfIb1ZtMU92n620hWs4WshnEtC1llLuhe5+/OfSReiJjzMUummD5FhudU1vf\n05WJ6mCkhStiRHZ6vod6PEee9ghECY4zsuyDu5ujohf0NJ7pGPBvElWUf1WA\nJtituj6zhWoDw3uccxY8s1/1J7jyBRPWV3PCgLW2ZC5KSZoXTNnHK8WlzPZJ\nvNuguwN3O6DzYP4T1OPaCn7+4wxexLk1IQIaBwuTxogAI9bG7r+6AXttK4ce\nKKkiYi5ieewilK82uvhZusw3ZAE2QIjx/V4uWu+2dzdQZinwteIA6UGGJ1E/\nuRqFa2eQKxiUFQNWgXlLR+vUSiLeO89GesltdXlDhVhmzcAb0Sn6gVcZ/GlF\nFMBMGp5PERoFBxxuDdlmfjzTEMhMmBhaI71X6OZ4drRso2UODNk2ssF2LU4f\niXVDw6zVL+9QzATK2yZ0yH7Xoaq3s03S8Y1KD/g+4u+Kcsnzk9NukRh4EYWx\nNm5i\r\n=nHwr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-43d07cf-1599145637997_1599145699183_0.18300674980780207","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-43d07cf-1599145638821":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-43d07cf-1599145638821","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-43d07cf-1599145638821","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9839f3c2e821014e70c1ec7d7fd4212213fa1a47","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-43d07cf-1599145638821.tgz","fileCount":7,"integrity":"sha512-T8Wnw8IkyjcDv5rj8pOhRevqEalxFpTbrHvm6vR5ydkX0aoufub0Pj9ZcMctNi0vO4bBZcmKwHxJZI28YmVjAQ==","signatures":[{"sig":"MEYCIQDAMfORSWKgeFMTBbnxu44BQb7U44vhyj50bbblRXZyxgIhAJU0MnbtGcGmH6UZM3VCyhLoPQDkuXvjFto11juzhyoS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUQbyCRA9TVsSAnZWagAAbaYP/jL0nRGCr2UTexbzaWzN\n0f+wAwQCoS2dvKr+NiEfiQj+LFwruKMw8YNbpgl5omZOeVpy+9yt17FMissE\nbt28eaZKPkTg2Yv1Het0pCXdY/Dz4vqUU82SpNxaJd7Bwur8Oe9sc90d2JwJ\nC2M/6Mm5THXnBftLvwjta5c2+hjUc4jATP99XM9a4lJm5dMPL8NxZU/Fi/0G\n6NIcmLo191j2FTCTbvk4sV0qGEOuVF1GpM0uw/Rb4c/OB/NCOL7yMaeTqmZQ\nMgfUf/exTbvoQV0ay98ZSLbQwRRv+Yz44YR8Y/CS/7mPt216kYDAKabGwhdx\nuifMLVIzai5P2z1T0JJJ0SYKen1gbnNEHrMuf2s07MAx/DqreFgmcKgJ2gXo\nNERrKJw2h2/x9y6LuFx1wdlEP9IbOvSvo6zD7weI1i/rhQ43vHkUnssjFN5p\n2nlTjZLQgaoFL/Sjzc9Zn5Wulku1Cg1iIt1VwDqtq9RJDgJyUZ0C8pyswB15\nchfMUNGsKn1atkUmd1MEmkqbAjoX6tgR8f5S/ponWJBk4sl0eeByeTiE3nA2\nNiRpaL37Mu3YEGao5My1LEsxH0FULgenSs4jkY9tEfSPu3fF/pwfHPn1AXmX\n1TvRB7wJpPzw77RVbxRC4EAUkvoOOKI+WYzfuhjYREtFI+6FS6XBXMJ+4udr\nOJuQ\r\n=n4DL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.1","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-43d07cf-1599145638821_1599145714059_0.029287213578652604","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-be587f7-1599330137416":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-be587f7-1599330137416","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-be587f7-1599330137416","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"065a73cefb851528d65f7b8160baafaec1afc05b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-be587f7-1599330137416.tgz","fileCount":7,"integrity":"sha512-JOlzD7+rCy/Sy5u0gHlfrz7Zy16OZO09vMeWT8CqrM1Ygv5sX9NyQ0n0Wt6LbeTQv8/mRVFW9GwJwP5DMpOwzw==","signatures":[{"sig":"MEUCIQCwGDhwXgOTS7cA2WWGmLZwpBYp5eSdRFv0WPiVeBHrTwIgYAUOYBAMtF5I20gpJdI2pUjhmv4QGiJzDIL4oLryOqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU9eMCRA9TVsSAnZWagAAgh0P/jdVFK903xpvGz1jbd8P\nDM0z/DJs3dM9RjQ24pbnuD0m3Fyr7uTS3H/S6DyCbQNnN2GiQeYxOdl8EeUh\nt64VsnDqLQzXv5Al4Nqc4Q5AAc5JXEd+sJEywpHAdrnrveZVyUsvlCWBonCE\nhhb5rdLOmG8xrAhMG7DjrlOjltzLXbu6f8gqFj9y2Ky8GnxtaOoYq+CI54br\nmmV0nA9Au0lGQjhhCUhT77BETFggUvqNcnK3BQ7LV6c9ctoYpi37jWA+oRSy\ngw2QvLko0ewbX8iOzN/CclvaQwYGDY+qj0oCc0UM49y7t5MxKfUPnw85ygl1\nS5VfKkfGDvv9Ip3drliyPGKRkrTNJBJUBYS3OXsmoAUoaE1VuXm6lWJkVVKH\nCXSTRMOqDa340oB8i3tQeDngOd46B40hP9rqU+2uCCTJudnCn4UAkTy+KxSp\nZJwdUs/0A1dBy3AInAAylQDF6Q0miXf5bYT5fmtutBO4plrGPmyAPTeni87i\nLa7nINMVdtmFdj0KDHCdAaT29XF4ou8FravoI8C9hpTk8LdsxgC7zXr4VbeB\nJEVAf7JEL+SLPLwZY45C65yuEVNFF+K2aBDpQwEE7YXMJiBPBt2fWXhFbWuM\nxqLk1R8qeLgLxTsgdzaPmGi41nFGGBVPjIZB16q36D88DknmAsYNOiCEM/Rl\noWyt\r\n=mAbb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-be587f7-1599330137416_1599330188212_0.48096410295337555","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-be587f7-1599330137922":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-be587f7-1599330137922","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-be587f7-1599330137922","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"022797b3fe59b8408390ba16daa20aad29a9db33","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-be587f7-1599330137922.tgz","fileCount":7,"integrity":"sha512-2Es8qwGbBvRP1Y2VTlNGw86/trZmchSgoFMIJmGIY5Tin83NkWRlW6t2xYrbR3/357Y0Z8vAZ9d2lg5dtU/A2g==","signatures":[{"sig":"MEYCIQDN5NF1UK6GWyrdNee7PqweoYYrTYTzMyXU89Lzl1TVxgIhAIRayaKlP3FUC2WHsRbrB/CyOgn3y3KCd87TxSiSazvA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU9efCRA9TVsSAnZWagAAxHgP/15KesfNRrtat8vedvH+\ng+lwVvszbWb5frP/J1afUsBiE2CutLr2nOynywxyuokfXdja2XMsKpZnAYN/\nN2xgduu5uLV8R2B9PcEwYOs2nTLBmsk9mTSnZzG7yGz7h170rC9dHNKtCJW7\np1gpoEaiws3RhZ+qukGU2wSWL3Hiag2gesJjaFgL951C09j0pkzrNiQ06aZU\nvh0uJK89GqrEjdqRlVulGBtAEzHE2o/gC/+c+blXjLPsjm6esehCT6BXZLk0\nUPs9CeIdU1H9+rZ1aHULDE7ONhwd1sjy3tiAFkPvSYidz3vNLYkGn0Tn2rNL\ndP0V9QcF7+fJU5pBcQ8qLR+Khysv1ynUJXT2vZlVbNvV5D7Wdf+ogGntIqmb\njBMl6du1WgP52M+KAlW9uGW5zqzkHdqmEGbOAwMtLG+/WiVvDL7IE8xiUX0q\nGg5I0wqTv0e6gNDp2iKjs9+X7YE7wugTbuMKqYMzLGSN25E5+QS6ywlIQbxn\nwarsTpMqEye9W4PhFGrBuM8eyZDgQbJIkRhWnn9atJPBwFaM5jKU0IffPBVj\nIzEKIdVpZ13d5inaKKzsAPBz1QsplD3mn+qlERyBJ9TiHQC76C6KyMc1Ptwk\nyFdY8quPFHsFG8vq40A7p596PEONKdQj+zxUTr20B7OoLa9s603qRYyk4JuI\ntoPN\r\n=hQVY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-be587f7-1599330137922_1599330207131_0.5627782136209745","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-5998537-1599333670260":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-5998537-1599333670260","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-5998537-1599333670260","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3fbbd47ebd5343cea57c494686e89d164a3f65ec","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-5998537-1599333670260.tgz","fileCount":7,"integrity":"sha512-pPHiKDrnkYpvrFoB2I5RCHenz2IyFpN4RSiToOhBQRDhilTAxC42NLtHHziSvXUlDHbSjN2U8GRVCdLQ2/jG2w==","signatures":[{"sig":"MEYCIQDrfXX+cagziGAGiZqG2yJo5iNS92kLxxKY0X5U0dWx1AIhALZ7J27E++R5ad8AYu6ul09bbaxb0tX/eW1hRHaDntWc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU+VcCRA9TVsSAnZWagAAEHgQAJdP5Syaxwoz3wxM6VOp\nADBaOdnTxJe/cAtzzNTGLh6yswKlZ75Jplj4OTiM96Hq6Qfn1wb4ScxqJ7wK\nbKq8nks0VlNr5XIBPLGjnqXs/sT71/Gc0ODDrS4z6W6ORV7Is+88gNYuglva\nNHyBL+/Re88TYkZmqs46YIeNk0e7qTEiIRfiPzDXGT18vd5pRuNTIv5C2vxo\nqGfohY3f61XBiqx6DLZ13oHFagYyU4Czhsqt9zciQMY0yVAoQ8JEfZNAVWmQ\nQMB6cqruK0/WbQ8HReMJGoxVaTWLcCXXvqK93tPfWDtqCFYHWOQ0znvKwrgW\nyvQX1allqELXcBmibEN95Pr2rpwGeWOZPiQ7UutMAl+WvVc6G6/FWf4pp/w+\n4rhS2Aix9zJmswft5PHzk5mL900mXareGjDSkXK9E9Lv9x5gRdORX6du1eP0\nDCTvCc9DWOWzeMHZIUKPl2//tdiefBi2z55X7aOBF1+Ygx8AJyAs/mx/CqTX\n0GBSU4Z69dLmUlu1X1P7vNAHRqfX2Og9Yr7RuESinldYI49eMtDVLO/ffuwY\nk9W0FZ0FTmZxfb+lSWhNyvbonPkDKIhoAOPUubk1XXwZDk5lwsNINfE6tOmJ\nOvgXJPG/C16raRv2Ca9Kan26Ye57DIAMDmtoMcPEbuUcIYwesorjP7dccyz6\n9LDF\r\n=wBgR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-5998537-1599333670260_1599333723732_0.6273401962569551","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-abd1303-1599333851160":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-abd1303-1599333851160","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-abd1303-1599333851160","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2f456dfdc523cdd98d19becf9448e389c64109f7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-abd1303-1599333851160.tgz","fileCount":7,"integrity":"sha512-Ub+aNQTG1n3iuTAYGnXc2GNSgHz9BRsgp58KXK2AsU/0Q5sP+DylANzkkFh8Fn7vk7nS96YjKNoy70uoW8yHgg==","signatures":[{"sig":"MEQCIEUUyrHIBBl0TmlXHiWiw0k79bc0tpKQ11gn667mZmuVAiBbZPyuPdASHu5LDQE7/x47Bw2F9zo010jZSmhqqzVEOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU+YKCRA9TVsSAnZWagAAHtUP/An5geoxxvWLgJSQFr/w\nQB7Qf8a6OU7OWj+5VX+mqmoI0jeIN4e6NEgFlJzgJPpJAQpR/au6y4MtfVZZ\n6NVbSqlqVzcZ1VJdHi4SSXt2ynuBH/f9mriyzJy2Ey3NlsahgA8cxbsUmuQq\n5f7G88OMqlik6NhBYlBeKlIosQcqH78lpr4WhihLNS5+oM/a09kGz4RPSlIO\n7PfldgKmFK5V7q9GlB8glf4yocxhndVkh/2nNyIY9Ju5fXRATY8/llWug9mJ\nBcExpy0LC7Yxm+Qc5BjaOzbfoOlYg4obFxHdqo9jqiBCC/zys0yv7dMKRqm9\nilCNmBjveElz30be6VzzStPrvbiuZWZ9feXEF+M3vme1owOzBRnGCL8sUlb+\nPwFsnFnlIqEmFQ4025f9sUGCDMPa19idk4uMKp0WbiEbpvpEletJQm+iV4ZS\nb9RRGXG9wt3c41rj+GdpzdbKAEitMLxqQzXwJEdZKSTgmyt5PFQG2mXm7Z/y\ncpikI0F2SWdW4mlQPapTWz1j9DKRhXv1fiH29C2ND73FVUQH0l7DVDsN8ztZ\neBimO88E5cJxTPB/QpNKY7+zQbUbKbzRvjE9LyQaLpstSCfLUKQ3HX6FpG1b\nHAZJQi5JpS47Hp2pxMFtC0TGhYTxUYKi5fm6z799iN59u0ppUGg+Kz2XqLmz\nLh4K\r\n=jRYT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.0","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-abd1303-1599333851160_1599333898005_0.9121494340078629","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-063771b-1599339551758":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-063771b-1599339551758","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-063771b-1599339551758","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"950c74ee5fb2026c7b75158235941c064c2a07e6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-063771b-1599339551758.tgz","fileCount":7,"integrity":"sha512-htcxsnHIbH/YhsN5q1zXftHI5p3mhHSpd1RpryPK1JbjOgNaaxnd8Ha8SRa8aZf66dAh6hU+JdLp39EVZZc5vg==","signatures":[{"sig":"MEUCIAL7LvynAKkM4//Hs3akxeeXXbvtUIksWOvtT6DnDA0fAiEAgNSBILXREnkb7uTegvVlTW3Psoi8JY+Jcp6Mo60Dgjc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU/xQCRA9TVsSAnZWagAA76IP/RBT6gZC+TfwbqSLtVoQ\nNvkk6D4QnsxLKXZtTwWAtDCBTDB+3pxzDUxh3N83jEafgBEFzIsOI/3HTJU7\nPf0g/iWPIMlWadS6dVfTS6cRMQHVcBQCLckWP+CfORMFwPxgq5OyUiajroCz\ntN0kKHUDy45ob4xv2IEilaYNdIqKwLEySWIou6peXeWyPPlB11gn0thaelLJ\nbWes3Xtwh5aHPkULx67xre+Cf6n3oKyfj7ONa1n0HoOCRBr05S96Cv+bS2oq\n7E8V+ryBVXk6sJoKPm2pXDmvtRh/+RMNTGdVMKXZdrzSLHIZ2GevlBaULrMK\nPYvrxWjLq5XMURGWp5jKapPRpXWpYgqIpzEY++e6mnwMQk0CeBnPMzNBoWkk\nw0HGigcbrxHNHiJ2NPlqazO/w5yRCTLTRgzhUJ9wE7JQYVbo606k3vUBbFHb\n8I7DA7ZjyANtd1TluSoFEZS/LJGse+9DDZjcQHm7nWbiv2X7lykqm8n071mU\nCkMRoAyQUbLl0myrQtg6QImzr7PcHf4xOQhyOTiL2W+B4qSTIQB3fc0c/r4l\nbRHy0L4y9UF5pxkFujfBQPte7aJGkO9RFPH8NM6WM2qv+py0vHMZ3dxVgNww\nChjewKHjb3H5P6ImX4fdOKOceWVBWjmTDLHRN8wf6QSdo24W4Yb0LAaEsIOE\nAITD\r\n=12Hl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-063771b-1599339551758_1599339600284_0.16360005755696116","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-063771b-1599339550060":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-063771b-1599339550060","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-063771b-1599339550060","maintainers":[{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8601f8172c73c4c07a6c41edee95b7c5dfc3898f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-063771b-1599339550060.tgz","fileCount":7,"integrity":"sha512-VYKWF7p2Go7amfreKEbb5PBalI0IYh42l05hvE81MG4jM/KRFD+EONMTVJ+JAxy4oOXGRmqonq+ThIGORvM18A==","signatures":[{"sig":"MEQCIBGLzthL/PGd9ezGKJfll8pI1dP6g/709uaYXDb5U4oZAiAMDxjslZuoQpa0MzKk/mIvMEoq8RWMXzYJBmlefTlTOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfU/xtCRA9TVsSAnZWagAAGgQP/iZOkC1jXb7I+jHMR6Ci\nkKWN9sMxijQwxHEZRO7oCx7NCLHLqMyJQ/kWaK5t4B/qEFGRCjG3gbK/FNek\nS5YaeVhGniuE6AzvPFjakCSMSMI/ly8rItjRJGc+tT0ogJr6v2MLomotAVZS\npWamoeOmdOPflymBhnjRbSqhDzeUoh8/ICa3A0piHmGy9yifHAjLTiZqQqER\nPxNSxlSRFEsWtwhIiU3EmN4gflOQW5BAZN9BfRiZKc3RxYU9YparoZ5KJRNN\nF4sicjXBPuMS+1pb4S8fa4mYo9qSUIWi3i634HCsjqPZWwH6JBeMnjigVSaV\nuGWzk8Gu3+LN1TcoNZqUvk49KcGf5+WS6QTxbL/Zh4DsGURhknbaCQKtypq9\naTXdTIbw0zzP4/EIE11U/Bx3J6Wz7cplVHOOq7lHSJHKp1C7dhC7Du9U0TrC\nMw6yqHjs/FhWmsX6vOsa8wsP2PX8IjJEeXQ5lbOltsjbuisM8LDNkBhtQNnx\n2/shUDigs6kqV/yXvZSOCbITjSSu1GmEN6Vfi+sISBn6IGeYgqdh4D+3QgSc\nEEixY3Fxsar5Nj8pkp4gIjZhZjA5n1pGFfKZLbws3x3WxbG1si8E9P4HkvH0\nJIzqpAs+bM46MKijnB3Mv0JZSNEkBmIo+EMqeYG81glqW7P1oSrSKeWOfeEY\nzgWv\r\n=5hvI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.8.1","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-063771b-1599339550060_1599339628833_0.6289861551373885","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d650c61-1599936651650":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d650c61-1599936651650","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d650c61-1599936651650","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"024f304bfaa508d261aae61b1759def1509b60db","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d650c61-1599936651650.tgz","fileCount":7,"integrity":"sha512-Vn9NJxOxLfzEKp0dUEhRvQ9LjvzrIguQqAWt7mJD3ZNi+RCsLKd2nbIDmnx//vg+bbQWaeWe9O8DgwWE7q1Fbg==","signatures":[{"sig":"MEQCIC+Ot1llGtR+BAUDzegd4A9zt9uJtouTZkQjh2+ZjYszAiBAMNeBZshhb4cDfqowZx+EUxB+FVH1JWOm/P8wDaeY2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXRjKCRA9TVsSAnZWagAAewAQAIQwIgNaXWlNwis190wo\nCBMWM88T+XPWRVo75368nv1ZrfQeVnXMQYWZSxLXFxaJqicQt6Nim8u0ftgc\noSXa/vpT6463W0/o/q6hx8Fauhx9B0bxHJZFdKPGzOcnhLu/g5IFuYvQD6Xz\n6icVws18seuAU2X56WZf/z8Qb7sZU3+3SFbyTWPTRUiP5BgkK8evGF0a4cDK\nGfXGjeDFybeqyA3WbJgtSaMp2SS0aF/AstebAswiFOLkY0CaawV8NWHVvi/q\n8j2xB5dh9qarobT6fOmHonMVOCSeAJRbdfFSn5Y+HUyhO7UFfgUI3eBgCVjI\n/yj02R+ElVjFE77QgtGWf8c78rasrIC+fG68ulCIEyrB2moaDc9YSZLr2opD\nH8VTwgLUy6Gt0csq+6nTtIoLotz8MFsDYPujJqefq2Wm6DLeCsfMeWUC0YPm\nMZshJufEl8WoQjSOlEwi4F7utPTtHNc7kRr1eumXOlOwBFbW6Ft2/Cek47vf\nhJnEHB7eARsvOREUff7FhShscuLiGgH23jxvoZaErV2i4XTdzenjg4F9NluC\nplralJLDp1yzUUE22cLjdvljQCTNWrYj5thVi98IhJTNRVPudjqYExQmxS+g\nYL/n+gR2iG0FXlFkfZ6rOBkXLSEoy5vlktn5/WtK1hFr0l85GWvfZdNn7Ugb\nfikJ\r\n=lQfz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d650c61-1599936651650_1599936714431_0.9377476066006836","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-d650c61-1599936652982":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-d650c61-1599936652982","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-d650c61-1599936652982","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bc2bd3ecaf1f06546909ea334229568c8ab5235f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-d650c61-1599936652982.tgz","fileCount":7,"integrity":"sha512-1AVEzkm5Vc6fymZ0HBq590tJfiQWMefZfopBwCA+BAtkO0r4KjNHb3vVj/8m/pVcMTL6d32UcgGq7vIk95o2Ag==","signatures":[{"sig":"MEUCIAOl+7Q0Jz5bjj9PKUANVhNnhrqu2Zn53JJ31kPeffzlAiEArSwG74hitMeUhJE/ey1TK6s192oBwi9optxh83n2J+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXRjOCRA9TVsSAnZWagAAlSUP/jL187Ay/xccv9HUfHik\nox4gHhrFTF/xJ2PiRBL0dVByOaY+DroKznhROIxXBnrsxo/jzz33igA6ZOVm\nVwo4hkpeiC7MLRGlnJr1Uf8QGin815YWQAOYLEICyrBGiRGmsF71k7JFjFjl\nlm39vsxNwHdOwmaFjdtuGGBLKPoHW/M8Hx6txdJPC5LLiL7cfkBiPdxxrifp\n8nALYbJhzeYKa+46R848r4MRwSZJVnymXSGmaRJv4fWhaV0usouvnwQMpcSY\nmzTzDCFNk2yv09KLtB2QmbIj14ZgTaGbW1BOPxjkitCn6GCH8ukHNXfLbgwt\nlDpZV+/ywUPurxFv/m2mth/i6pIFzF+2+qWcFLn/sFRvifydIx4iH2sL+utc\nmufwEdpS56Jmpk/0O01t+A45ZKnBzJly+A5cUhCWkna2bMWstwIQWiNIPG4L\nTvfWEOQbx99fodPsQJjLSnnsB+BCw2JrrCP4IomKz00zbt2RM3oJDUHM0aom\nntTMjdz+iDWCUSrkpOlDHQBOYkpQY3gbCorKoZkgDe+lUQz/oa8aoqPkCRrc\n2PCwXCuCVPZSbLIYmKFQruo9Q0HeRqZyQuLoIXf7aUmWiik2FbQN2zGGF7kL\nN3o/OfQBfFsqVQBiUWP8MYJBzNHJ5JsA5bVF6o5sZxh4FWmcEuVAuAlUIajA\n0ZSn\r\n=Oejo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-d650c61-1599936652982_1599936718245_0.37276862827043455","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-f3c8e41-1600038354755":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-f3c8e41-1600038354755","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-f3c8e41-1600038354755","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"430783185cccd211d0cb6ce83f3f3db544dc9a45","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-f3c8e41-1600038354755.tgz","fileCount":7,"integrity":"sha512-Cy8PrRAgIShvJatHfqrkV/D5Igzq2I1Q1JAXkiE5bqXqcXpGz+U/EL3yOGLRPgvgHKPNzZJTjcrhMp6S38IgTw==","signatures":[{"sig":"MEUCICUqCBXyz6yr+ftyEFmh4hsSNhOqWA7luk1n1lNiJjTnAiEA5RyTYZ2RJw584IK39weKccNW+HggHJSCbMIxLafmkVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXqYCCRA9TVsSAnZWagAA1l8P/0j3BAFKjMlqBXJy8FAk\nxJUowzWP3OpjJA99ALI2E77qE6vNvO4emvP0cKVeDxpM4bPmddvZg+2/7cJH\nDlhtVNkUCWF6bC6Q0hBO3bajbqlzmYNkccu2ngeBqpmXVhZ1cNx5qCmhLKIe\nIOqvQUnWQCXi6Xck4eqaSaD7jdx5ny5jOgYQLAdyiXKV0+k5k8B2Av41FYLI\nCNwWHUwh49vZ5KodG+qzzzh+mM2eQB6KGVUQDWtrX4PxWIhCcDLp5+YvQMNF\nR66MMaw1lMvO0yreIQnrXxo639Oawgta0yrpItusVPaToYfAJtogcZ3Q0BCA\nmuNJTVM5V83RtdKtQFbDRaMk6UvZ4qudapdmYCjoiARXPM1KbK/S47FJygQe\nuKQBvhe1znpzfOGACQ1Bre4HD4/4bjvhDO48fldTu5oI8Nqq4oo4vrk8a6iA\nh5QFLh7t+3r/1akipI640ZAc7dmnyttPusxEiehpSCd2hOrk4kr2HX80EFnn\ngyDs54gFKrbcyG0PHUORQNDiX5TIx9jy6Cqg0Egtkb3rnLGdWa00/E2lUAY8\nDW5TaLo3YnH/HUfu9P2JeZxRHyggZuDK/IWZztyZGWqm74r7V9z8NY26Xvwr\n8ufq3sGux8FCx49NSRWujpsNPiruUQjW+X0nDt9bCodzF5fc+EqqYFP4/8Uz\ncvtp\r\n=jzzM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-f3c8e41-1600038354755_1600038401736_0.343433289261287","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-c911391-1600064326008":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-c911391-1600064326008","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-c911391-1600064326008","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ea1e05aa48f3ef6c87dbfbc851168d68b5248691","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-c911391-1600064326008.tgz","fileCount":7,"integrity":"sha512-g21bgk+eK31eeg+EzFIHlOLlbvz/e/7q5Cz7RFFyxDwpTdZIbcC3iKMmLLzZKxywkBybDBN1BjxlkwMBTGVPxA==","signatures":[{"sig":"MEUCIQD2s9druTsmscT9IAy+bJRLg3ouKwWQxx/1YLnbra6oXgIgeElTDMCIbip4Mg9uZfJVx9wPeAjoakJIarCsM9s9Nzc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXwtzCRA9TVsSAnZWagAAF2IP/0U9XD2wHgUo0cdYwUex\nu/Wzw2pLq7Wv9YgrkMQ2WI8KlAlkLt6gul8A2GWqzDPs3jY1r5wZu2aWFzXw\n4fYC736lkPn68klsfw9sqfM6DVeHe1kXVMj6+Z0o5mGL/9z2FzCloKaIKSJc\nzhvhnMQOEUL8f/yUoc2xd599hJjN4Kyrt6JWgJE/wmse0NM+i6HBUROGoGd5\nPKh4+Trq6L9OdA/jzWPgwrFCmNLpS3nC4Fx5UpOTUTqmb8b717VhevKBT+wU\nZ28AxNCEhcxL+mS81Q6cqCeZghzhO3kfrNxwqiFe7ZH8zIvnAhyaRwYP5nj6\n58rHSm3/1CR92WUbfhRxIqlT9Qbs4vlOOpuj8j0GF4nl6/oByBJc1+3HZtJW\nl+cAQgs61OjOSD+eVnHcql3vzlTxhU7nc7C0QRd47SGZHTpQVmqT2gM4Ne8g\nOczSj6V/7zEb0o3aCjI8C2zgbh+yM9pf/JgGDb7bPomVLB5nFC3FKUKxaee5\n8QglBNaobOtqe/jmcJ4CYECQDFyf+OcV58Gohi19fErMWGrJPxV4ZZHX1ngn\nIxm8a1G4ms3ezOl39gT/Dh8yIN7BMBvgB+Cf44XMCavQs8DGUk3aUg1pfrb5\nwj7OpnR7wRKzPW6cVmfdZShJA1vbqz4bMycpxKHPyT2FLJiCbhonURMUUfc1\n/9oE\r\n=cNb+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-c911391-1600064326008_1600064371175_0.392694084792262","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-62203e3-1600263179094":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-62203e3-1600263179094","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-62203e3-1600263179094","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fecf7a3a289d3cf464090650c0aa42dc02eef8ee","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-62203e3-1600263179094.tgz","fileCount":7,"integrity":"sha512-0jJzR01c4guQpq64gZtSctP+UEfkJ8kX0PCUAib/UH0Qn4pSdEhiP71VSGQtt3cLUj9P+cVE82J7c+9v6doAsg==","signatures":[{"sig":"MEUCIFhLztBJPcrvYz6FvoJuDg6c9JK12+5tSVPKAtHraYIvAiEAryXUyDee6BX8nq6XVpRRFIQ4FF8Xb+jwQJY8ZAcG5Cs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYhRDCRA9TVsSAnZWagAA6LsP/R1Ko+ux8Ms90tx3Tori\nXCFW5jWUT+ALU7eULVJGWj+YO+QVPXyndj7wjTdCoWpTwNH04hnxNchdZdBe\njr11LkWtpE6ZNkFxaihwFSDJLgnSiO7jT85Y9pt3yxXfnxuSNCdbLbPxuRNk\nJIslk+jEnqjQlcs2WyxgGFfaJuCxIc5vCtE+BDYMe7RNbZniGkk4IptpRmRh\n3gxcuCKy3fcWw73YMpXA5kG/OLu41VgsUWdgJMhqYgoYZC5zhmR24bL7xZau\ny8jox5NScrLkUvJdHNEKNaYmraAxlzDK/ibAjz4agSYV3ZUQyLGcU1YoQYQ9\nI7879PrCoaZTV10/XSgLoLzZXGDcF4A1FqC8C/EJHOOELdlobAgCmZJPvGqO\n3RsNOtVHG4/PfsU3but96Mtw1QsNJEZL9I/oYL37Kr7DOLFiO+wgrBZ0pasC\ng9q5mogBs+q9NwRO0ivg+mFxijaPMufWeXWSdiWQHdL/Uw6ZJR20Cev+90Vn\nAyJnJxARcCJrR/C/yiMLpWQZ78hbjwFTueEK0v/jfcBz6U3uAzV3ldMs9/zu\nH1GztoTS1ItiY+RjzS9kAUKeSz8otU/W2KmTM7UQE/O2c/yqlReWnB78JF5i\nhv8eV1kRUxfDiod0vcqvoJ8RMZ6+jdq4+jd+hYHflcnS1CVi2//Khk/VEDta\nuCXm\r\n=NBqZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-62203e3-1600263179094_1600263235547_0.9073819714524047","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-62203e3-1600263178311":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-62203e3-1600263178311","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-62203e3-1600263178311","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"94190d0457d976bdb874c514905b645acf6641cb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-62203e3-1600263178311.tgz","fileCount":7,"integrity":"sha512-2Jp/48m9JVwQ4Ellzxvvp1RdZyZrk236+3qxqLP/CAz5Gq131817ZKcTUPv9/S9VGd/Wy69ktiKbhGCMsm04eA==","signatures":[{"sig":"MEUCIH/8KnNbnQmKpOAZG7c24lnmJq6B6ob5jfcPb1idAodcAiEAhh0EHqNo5XSEKQd8efzQnwTpOjxjGjbZaqKWRp2yLkM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYhRSCRA9TVsSAnZWagAAgAMP+gP0aYk6gfxuZL+4vSXF\nW4xIGXCbHFR8F+QWxA64fWNYc313/xSGed5AysJ8Zcs9bUl9xsFnmFhT3ftm\nMolhWm0LBy7Z++roiqmzLk9h/vVU46JnRRnMyZ+QYX5nIbMIapBq55h6LEMg\nmcAq7fwXL3DosRPduwwyLx48ZYlZq6j+6ZH/3AQOG84vwoMG3Fvo6za9YRcv\nZAo7WvLPvm+aY/x4JIoU3q3ZLdB+KKS63w2ebt2K9ZFTNfLxJxYF06gpca4h\nJFpClIp44hOnU/9gtYiaR84mwF+C1OK6Tnmici0Qs278vhl0qKhky73yU3cJ\nbErmnqfbUBMwubki8v2jP2gSGZ23BMmnTSAs9PQ+Ty4JbjFg8dnpmaCwMO8N\nrF+zKG1kwF/ASfA9v2N9Ncz8Gduph2nU6bkltHfAuTenISzaF+bevpUiQ+H8\nCz9b427iBPbLPtoO98iHdz6jFPuMQfnG+jMdHWe4+8brZ20Pr/081FGGylmX\noF7EsQRx/vhcpVtu3ZWhlEMvJqIqB2M3mUatefeYgag5vqxmQX6T/dfkzmBv\nPoru9khBPK/+G1QOqPIap+wgzK1NsoQZqZSnGecXHVPP47IfMXmOMDvP7DtO\ndLUdBkGDjttm/1xuB3p+cDi+cezC0lDKuPt3nfxcrI04vLpGaNRyypBlORr4\nPgLi\r\n=fUtZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-62203e3-1600263178311_1600263250132_0.8511907302760209","host":"s3://npm-registry-packages"}},"0.1.1-beta.1-canary-9f7ae79-1600263288658":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.1-canary-9f7ae79-1600263288658","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.1-canary-9f7ae79-1600263288658","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb407cc895cad4558d290c3c4c80727cfbdd97d1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.1-canary-9f7ae79-1600263288658.tgz","fileCount":7,"integrity":"sha512-BGGawoYwk+i5vlI80hU3NXulNzFW40nA7It+dpj5Vl/4LA+oCONv719YdG9FkDnVxHpZNRu06DshYPgmgUwH6A==","signatures":[{"sig":"MEQCID3yU5DHUyOeJfGjZgjwV/aaHpErhd/KInxGROiHdtnfAiBYswIWYB3Vhs86CKyCyFGV84Ux/Z0lgRwUWPibfo0aDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYhS1CRA9TVsSAnZWagAAv74P+wSGfT+FkYDgs6ekGV8d\nJ/jRv6f23xvJWVfvmimtoD4S/AuEMsMAFbgWM8IaPc/gQCCpNar/nThr/nqI\n35GuD0Z3jSSqj7HG7B6XaJt9UFZ97R/6TcLvpVxYHV4TDH2DxL8Obh6Jdze0\nE9gCqlZRQzbcBz5Cz8l1CcXEmIZuO6QIQDAJ78bhEMxbW5J3x3sZgAGccsRK\nV1dbggNe4oD5HP5cUS7xjUdy1Nwep48uSaW8MRLpp7jRv73SLKrf9T6CXnTQ\nmNjwfEujHrxButLF2qvldqUzT+V8EZt/Gd0g+7yTGPmUgeokK0tItqqMw7Ue\nkB2PNRNCHdmDtF7xuWVlo8w04XsLsGMGHkhBMDZA3VvoouAs2Z1NPoFZ2GRD\naFy6CihqNTKo4Yo0Q6ENLIptu44EkV4IjEY8Xc00XwcNM7Z8VfH5EHWGQSvu\nHlED+7fT4jxJ0g/js8G8M2zAetuC+t003gthbn1bBBOo85BPgjWdtjv0l/Qx\novva9/gW74sMmaEvWCHTrJP8PZ5a1K/8VDBal7AdzuQE4iSRyDKDBdBgvVpS\nSkonsZk/F/Q3Fx+ZgbXdqFZUyDr6x2+FEuQ3dFn4lsYXPrPab46ByMcFF1eW\n6XGpQfAcVsdPX9ZXT0QstvBjds7Ihq9LtDGBf3BvI42FEE3018Mm2ff0BNQB\ngU2J\r\n=ykid\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.1-canary-9f7ae79-1600263288658_1600263349353_0.12089280198812036","host":"s3://npm-registry-packages"}},"0.1.1-beta.2":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dce9ca4fdd33f9dcc5cdda2a1c43777c9c60846c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2.tgz","fileCount":7,"integrity":"sha512-btkO0DMKKVFFpihRdStvprKx9P1Iq0TaztsyR5p2HE5SaN3+g1JR83LsEBPnKtMpNMAeXuXlIaH62fJ/bebAqg==","signatures":[{"sig":"MEUCIQD2OlOdsCOGc2szGvykJFnOe6r3hTwDeA8ulzJpO6SxHQIgFit5alEdnEYOVRsWMPbdsM7IKEfBRgC2BpGgOm7RN0k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYhXYCRA9TVsSAnZWagAADnsP/jeMSBfryxyOfAifmScE\npVr5J6asgTqr+rD2XvxSvmEOazzpzFpYBoslM8GY1eC4/E0CaSfjp2nOYB2l\nE+fz/uaCPfy5ZcQltH8XUhkxs6MeNl39fe4uPADD0gaookqOhOOgcRO0tkim\nQWQGr8kWDkkhpTTGapa6WK1RAT1iwHhRzGb8mk5oiLI361mNIqW6Cmh3YYkj\ncm+ut8EjIQSpg0IRTRCGXpGUkkG4ucN1sg8C85YxfAz++JVc1IFMEe+njNUx\neAq6M3GkPJSzGyKLdgr+WvYXNbcV3wM/hnyy4M+0oAsCKJ6HsNgUy5FNF9BN\nEbdY3BAi0JZvi+CZ0OuHhlkzEO6F1o3rvTSPagFtLj3TGy/E+bVJTKgL3Trk\nnQhiF8Ds9lYZxPkx1lpgsGRUE/pGBpwkAs5xF/oSKs12iRdBDTV4snKKmL67\nz4Fw520B1l+XV0m2lakZcguoDifIEnbNscpI6wTRc58dHC2dHZGmCWKY1nXG\nMQuJpJxl5/9BS/wO5n1LdmT/NvC1DXhzbpDj9ZFGBEuot03mF9kjA/01WInf\nvlMsBimNsMulYoIU+iT/S+Shox77AYvEBqxePgWQAfCQQfVT4aKEwVeVrRBk\nN5+w1xZu1HE9qXnP6VaHu7i7SMMxqzwuRg3NfCw7Pc4CZQUMfNOipD5/hwjg\nWZCM\r\n=T9U8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.13","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2_1600263640466_0.6933695940743891","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-c476d40-1600350369469":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-c476d40-1600350369469","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-c476d40-1600350369469","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"55ab5da9f736eff838667c9fe07ff657bba522fa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-c476d40-1600350369469.tgz","fileCount":7,"integrity":"sha512-1q+Tl70VfctHBjyFYg0naIANo5pBlvAp7Id2lTJlG23c6Mz3VW6FCTaByVc+a0ZfGGtDt9NA9qphn5VfiS234w==","signatures":[{"sig":"MEUCIGlny1WHwzaGtYQLTEQDQqHtOLEe+X/HO1r9H/JdORa6AiEAqyp9Ik23eVBcX2xtQcPxz/nl/OV6x71yfiimMWiQheQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY2jSCRA9TVsSAnZWagAAT4cP/iCKlYa8PNG/FCWDTnAH\nommxwf1bZlirQPSxtXwqnV/Q51YUDnWNjztFrnZYCvM2abQHUHYvD+pNn4ln\nR4JXyiNkhbQi7ANuP7qfL8sjTnM3k0V/bRVD58POfEmnd1gEacBSZYSH9SuY\naY+gprUFZmEF09WmkCdX5Liz1N2ht/zsew7b7JKiJXjUh8EYksXQWpJ3Nbk5\n27PjB0QAs8ZaRVY6vfDEYNHSf6G41ffLWBWRp0xOrYLn3hYEeFwxxZMeyjLw\nod+uZr21u9xZkWLnqyk5wkvRvMWThFTMomc03KN1u4mOEDvY+u8tfChQ4UUt\nEwLGQ2naAxm0cfIfOT4cWKcaj/2RVuBfqgsnmtDmdj+tAy4++39QslOGkv70\nffYqhmtzrYKXT2YJJ8H3xaECKH1GVYovauK9+jS/gyAJvdpHEsKp3KDq06Am\nyN0gcjoFuvuJN+MKAd5w0nNUguUIfL943dod0jAec87+NjPhsMCzdJFgOZMx\nVtSGNKrFpZoDEP4SBrOs1hk3xeGFKeRHiwryKTBSyMxDMoipZlshlMskiPUv\nR6W8lUgs7m3hLnvOuDjwTbArHrx3HF5nbdd3g65WPsFULGmxdY3wENuTkWcn\nUpSJZU7pVtjSL+atrVxiCJYLqQ/32rXwvOh72AWgwjyGWcTeZS3Dnjg+jZ7a\nZWAF\r\n=w7kh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-c476d40-1600350369469_1600350418085_0.6823596075121692","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-c476d40-1600350369731":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-c476d40-1600350369731","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-c476d40-1600350369731","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fe21d5cb501dd9b7d8766eaaaad344a54b4faf9d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-c476d40-1600350369731.tgz","fileCount":7,"integrity":"sha512-IFqxIkFCbCP8Iz+CvOQW34DPRs2dof5B9lfliKv2GBiAGSL6BCty7pgz+9K71axZzjDCoD6+kM3fBj/J2v9oyw==","signatures":[{"sig":"MEUCIQDl/uAqq/dkgkgz6ZMaeNykxh1f+F6E9uFnP83KOfcVEgIgHrFNALXVXb8qGw+zjvxsrXBEcH0nM7zkJe3OuG5+1ZA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfY2jiCRA9TVsSAnZWagAADlUQAIc3NUAB1oJQtX6X5xxQ\nQodB+ySJhbFvgjLQzaIrO3M+lrFpxpKt4BRaynxx3a0/u0rce3zdmHIq7Wjh\n3tjM/RBqqMNXzw2wjzYkJksXltZGubUofl463JwJZnCBtrcZUgEjGlw40JeY\nq6QTngdJ0k9yjbGDdnXi0m45/n7w34l+Qtv8LfwnbXlow6TShAb3aH6w/CfQ\nzAPTFZwKFGd3rc53zruCUQCttxbUks1yf3Bf22ZZBbZZwoEfvxqdl7TCEDqY\nE9HFsa+hgmLW5dHs5sNqfHJfBhw9SFJdtxGTwouOhdM6b1ylBREVUyR4FdUD\nNeAbwwIyDTDYEMfiGYaN5dd2tx4Jz59Iv9Tw65DzVBkMt1vHqMEEUgqPkcMl\n6oDMzdZ5doukjQaqLSHzJXXE2uNeYp5ONsq2JoMRz841JOdEZCwKbJ6xVUXI\nOUWgCR4QAc+cK9wZUoeHyG+Y9b7F+Kwe0nHOm3m6sbcn4/4yota3a5Kkq1Le\n7AAbuLuTNTvmpitih4JW910DsKk+J74KwPjTnitWd9su3z5+33vgy4m/1crQ\nnb0UQjj/CHCy4fdb8qi91ZyV8FrpIlMqnv0U3bL8jpoIiMRYXYffK4T1nZSm\n/dJpQNGHz2duWj9sGc1iO+ewfy+Vj8TLhcI0IqB9c+tKckC9RN99ZhUFmzsR\nSLvN\r\n=3Mkx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.2","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-c476d40-1600350369731_1600350434398_0.42099428747322243","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-751e816-1600526184721":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-751e816-1600526184721","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-751e816-1600526184721","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3798ca391f160be928bff7db9ec901975712df80","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-751e816-1600526184721.tgz","fileCount":7,"integrity":"sha512-QATLyQVapMG6jxCzwkIEuxvcbQ7OMELnJWHWvr/4D4T6Anl8NsvrmRcAI4dqSGseYL54UHrv4IxuJP0CVgbwRA==","signatures":[{"sig":"MEUCICX7zaOUHjBOW5+MtPj84dv9zHbbCdlaP6GAStp7qT/uAiEAr+LtMuhuMNizurX1PIkAs+ELc6/AUV2sgtNz9U7MtJQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZhefCRA9TVsSAnZWagAAkUYP/0lXaE2WQnF+TVZ7mZTY\nuhoZKhhHKrrnm3V3nsQVYmwqvrAaKVhEJxMQmvX/k153uintpeI1ZJhoc3iH\nQXd4yWQMXNUT0VmQS2en4JGnHHpHTuKgx1bJMdPJNbuwFSWaQa3/Q0XvN3+H\nFDwE+vy6XxMJYw+ORX5gk2FahapVJqYPnBeobrIIJ0+sYItkaZb0ZXHNWkAo\nhtpf2jAUxVJLNJch7gAW1QHzdCrdLyZ8WSRngC7aUD9Y2ZAb+ZsuC4bIOBBU\ndMIG7ajLk64LNO2CVcBSI28h1cvsetjzAylipbhvEu0SNBvsWCk81ELpk6XL\nbHjNiARJHeHsk4fNJRFMx8jh2vYwKfSXr6bmPxTS5la5WXIC/t6aw1KUeUsv\ny6HROwhmUUwedgnnqC7j6RBI0eWls2rgOau8Rdvac5U95LBgoulHJT6zhjNJ\nfuPXt6FriWF+yHAfHvTG2o7gn6QAx4p/5A4P9t9OAhm1nqRvqb+UodKqXccb\nQ3jG7AeFew3ZPYeDlK4HIQKu4s4mUe4O9JX98razg2Cs37mRqRiEjN0paC42\n0GLFMYzQTpIIQStlHJ6YiF5/ypmfVjSjWL1Cdu4m/AYnDmu5CqeOmbjrg7Gp\nWz/FL/qIdRCz4CILEzrtSZoLvtT1vBL2ZkrBLntB9dhKuA8Mr/oqab33UBeL\nxRPi\r\n=Hnob\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-751e816-1600526184721_1600526239446_0.0025758436190657097","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-751e816-1600526181882":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-751e816-1600526181882","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-751e816-1600526181882","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4eb593b2231a4417d31061a5636333ae128aebd4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-751e816-1600526181882.tgz","fileCount":7,"integrity":"sha512-hQVxlMS8W4YmhZmMBSKXj2dyNqVrbWVTP7+itPqTh3TGc5coNmrjJ3u1b7E9/Jd1PUDvRfHwxoXP29w1RYWsiA==","signatures":[{"sig":"MEYCIQD1yYaWNQ7Mu1msiai2+e6lwYYM1bk/VLkAQX0S5zRO2AIhANUN1i2W1QitFvrE9IwI+x2QcijuxQpdQ7b8biXIqyRJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZhevCRA9TVsSAnZWagAAJEgP/2K/7Rju7zncvWS3aYrM\nCVNXJ0+VXmQajdariQAaBWgqKo6zLPu4cPOzM2QpigobTFLC3wMCidL1AYpT\nn6OrTAk7sBfdgfJ4FbjRUq9eN3PWhaagMR6JYgFJna4BJfy72h2bLhFH/UOA\n5MJJrLHLFEiPhgceY4t8JXJcrVODCRZnBLZrSYy6kzCsuEoDCwd3EPQls85S\newEGQsqEPzC9nvj4m+g42MtjIOlB5pIIKdFu/AX99gqWzvmXfNT/ItdDROhm\nytJWdLngMvNsLxl7S90qbXJNnD0H8KH2CYuM+synp2AB1PvXX/hWZEDvPJ2C\ncLJCDokEU/de8TC/ll4dTzQPFZP51x6lwkb90Z+4KkhKzjTrI3buBZEwwyKA\nVrOy92k1inEI1QhL8NljrL1YMRD7uN1gSXSkwVk3o4jfSyMzL84zL3MZpGGI\nXWb55UOI0Q10QHWx84q2IavabNw+hYOBLEhZ+FKZQPH3rBiGGK2CGFLB7E2m\nAQv9PPHrwUfCdwVrt0Y5UWlfh2vghWqmCSvYs3aoS46cXUGQW7OgO6eS/7vk\nSZMDqtzGmmEQEOLo6bvkgbMI1j6OycnPAnCiiN3HEaxTs9YXG3IB1eA+SCwl\n/YR8Z2Ic81UppXY+zUoXqBIZro4FeIv/OnYhqf3sVvOeTspvnx3kSJlSWU3g\nKK8p\r\n=iPWO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-751e816-1600526181882_1600526255210_0.07737316011306161","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-feacef1-1600532261431":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-feacef1-1600532261431","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-feacef1-1600532261431","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4de8e1fa9ebdf191221210981b5154df61fadcc6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-feacef1-1600532261431.tgz","fileCount":7,"integrity":"sha512-kLsV+pXWwEQXWiUoKSL2QwSxAtC/jO3WLrkOpxTpWJbRd5r1Jiwod1kbyVd7t0GNkUG4wfclGBDGQ+xvKqJUag==","signatures":[{"sig":"MEUCIEXJRpPaOghX1q2AV+19BJwip0eztIVzE4o8DA4TsNDGAiEAnG6B5R9z06uvGpE9bAPZhmUYRf3ysOuOklZArl6eboE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZi9WCRA9TVsSAnZWagAAevoP/jo0YLBMkviukbhvbVxu\neSN4Yum5ZlfxqmgjijyfFD0hiICoEvZ+Avl1+4hOL9Mi+/dZrhkKVHzrJM0U\nKbgVX2O8YnQ1A+XwD1EiQC5B1bzz2kDGFX/Q9EnDa3BynO1uNiBN30tFymzD\ncJEYL4AEr8rZAHyi8vph+Bq31hnTCzAZHoMqZCf93x65gl6QWHpXaBvRwEh3\nrqj2L75MdfY8sCCI8YeWUtIxZI7ZL0CylEtpjH7eWU77jnFE4kXyTJPqoJvw\n4GZE/WpRqL8BjGnwTFiFbXvSRW+5gjIaqA/rMQrD4nwJ7GYEqyhVq7RALk1I\nStQdf8fzM+MB74dN7l+7XWYaVZzCJRPgNIEcD3ysDZP5LbAbiuZSD5w5pTCj\njts5icsZfhVznYtskn95luNx/0sGPYRUfYP8iU/pxItdiEVM5RUYwI3I1nvu\n+7y2QEllTeqEaI2qX7H99ZHjTjZB8qJtb63JEaP7jMznFwk/SKtclChx3Y5l\nvzUxwC1fFozIGZM4h6aZqRCwpTTdzLPp2LA/sdguJMqq12MdlRBLXACHnYVW\n0yQ60CZUxlarNWXVVMTPwpEYQQ+aZYMutlBdFq6oq6RGRQg4vQSOMYI4Dm3d\nEiQx1aGBV0KkA9HzKQahTlh6mj3pRVp/PQWlA5rZ+WKWDL2DGkEtFvOl2b4O\nw99y\r\n=9lA5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.3.0","typedoc":"^0.19.1","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-feacef1-1600532261431_1600532309561_0.4678648318508418","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-0546646-1600599532970":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-0546646-1600599532970","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-0546646-1600599532970","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f0b6048e69372f77d7d067b30eb2d9c384d0427f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-0546646-1600599532970.tgz","fileCount":7,"integrity":"sha512-5I+BhNefstZlY1oVas5t07Q0pCybZt5JjkSvBqYn8epY/pp65oG95/N58f7srpLMhA4O0EsAjbpFc+YyjEJmDw==","signatures":[{"sig":"MEUCIQC9S6JzmWOtyBpJMh5FmcjuTgC0LJM7mcOlURKws2xIswIgd62nzIL/Nhf7NCd4ij6PIRoLwq3FA0DABHz40EkE4YY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZzYdCRA9TVsSAnZWagAAUtAP/2J0QWoGUgsz9fESK7Ds\n02YX+l3e1A/KMVKFHp27uzKkrrtNH2CA1N6ibmoYmjfDaO9eiPlPxY1/Z2Bv\nHphkycNuyQClxQKmqF3YSnWtU2n0N5MQN62Ihj6o/WYgAqU464nhTmPHJcW2\n1fxL+rmE/koYY5I/VVZ9avL+lPEV44IZ2831l5Cm6Ar8YWKCzjHe2a1Fz1Pk\nyIpUflM9+GP4wjtwegr6/K1Jq7/9w1DTSt0SJ/MV2WRPKuhqrgzUV5tZY4F2\nZYO7C+PgAqVciYMpLj62PdivsoWbt4QoEAhCbjP2tGjRyjBXmgMFVIm+j9Ll\nAIOM44bYMWLIwWaXm+5qLWGkJquGAkAqCEjRkuQKPC30DPPsoUg5fTeqLfDQ\nd/C7tCTk1l9q74R8K+Np1NoUkIcDtEsfZnK1em8C5BON8XP6S39d9IxaNLsF\n8fswA2lQti9NsW7SCQny14KIwDAXV73ucvfrSDpXru+ONxf/bByHcz9WLEsK\nQdp7lHWnIFlzt0WB2MtJX7pp4/qEw1+htkkTVsT/PUB3dsLZfFUTrO+Y+qxq\nsARhp8NtcR1aYQ4sfhMC2bsr9X8TmNgKZRMBlVLRdGn8cibWNr1sUxMSCIYG\nELQy+FnDTsvM9D69cJv7oAoU6Wib7kdKtB6Wb8m2q/sCjGafVUj5aQ90fJlE\n4ix4\r\n=yunf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.1","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-0546646-1600599532970_1600599580808_0.37523250312038603","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-0546646-1600599536071":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-0546646-1600599536071","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-0546646-1600599536071","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"23f2a1c6835346aa118c086cf84f6065201ca56a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-0546646-1600599536071.tgz","fileCount":7,"integrity":"sha512-JqIVamEdhV++5gHyZuF8C2ERXj+ugpLfgKaGUSY9IPtWGSg5gYcWdEgXlHCHTZzYLdIQ+JndZ8vmdt4XiNHbKQ==","signatures":[{"sig":"MEUCIQDQQs6/PeW1y8KJNPwmtJIQE+3MK0hh7chCzAljbm0oxgIgM0Ze/uAhSmR1Yj/OFhYRIIaA2Or/9inVupSDzBCmhu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZzYsCRA9TVsSAnZWagAAHeoP/1rDQY5JKV1XntVZh2lD\nvuMBT4Y5cyM7Iv/tJnC/8qxtOnDmI6a6w7y3Uu9x2h4eCdLUF8iMpG143t6D\n1z0VXwAyH/tASGZdSdU+0sWy2JNV2TEU1oolpKcF4dhdu6Tkna/jonCV+O17\nYspUPlNcsLgbt+6hz1wDjiza+KXzuZYaJtB5pkurTb+Sb7DOuqA8vncW8KJw\nQ69awwnojwllzu0IgXxugLMpqKhSNPe3cLVZJYQpL4zteBWbrgt8Pv5pnP33\npPAkJGeTFd+NWUSI8yvIkGyJCakKPrLTpIYi68T9J6ygQ+wIDPF/4gzW0L/8\n6Y4C+kPFQzXOohbb6lDVL3k/S0470wJLjbN2c+y/NsuO+a37UdtX4Kn+hVyA\nLHL+8Noo9+jAXHNBfi7mj0lZycWyNWjswWosrokJNeQqioiusjgzlAmfZtjy\nVg8x44vBSQLWTdrQ+Am5L/1KeyNxpnbpxhzufDRPF+Dlp8tivW1QbJL0ae01\nfDgWRfIMaZnoiDiCxvy+Aunktqcv5CZ2aITT2s2ZxLiFQ9U88oiDJNXx4uFA\nZd0/Y+X+GgoFHCLiJR8QDprFlB+AlZej9Jf5tVviYJEg44Sysd3bYCoAC54w\n0g3YNtcWUtLSlrDEwVcjpy6fpjQy4ftSJZooyY1pER3FXBxgJ8rlnMTskzYI\n8kVY\r\n=X8rL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.1","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-0546646-1600599536071_1600599596082_0.9834249205608381","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-1c6984e-1600643212102":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-1c6984e-1600643212102","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-1c6984e-1600643212102","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e0e7d2d38da3b9ecb5c1eda2227768b261936a1b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-1c6984e-1600643212102.tgz","fileCount":7,"integrity":"sha512-F0pv0AZHTX1HNge7eJOl/rcyU6XV2rASxXwDkYz5AbzLoLsIbbudxuwqujWKzJ/R0fgabMFNCZFabl/uypGTzw==","signatures":[{"sig":"MEUCIEbAn1/INZxh0qESyVKQYuo13QE+jNb3YWwpJD+C/A8DAiEA6r9bMkfTJDGqbOxzTw4ZaqN/O/gTqK9oXP/sE8yLT9I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZ+DNCRA9TVsSAnZWagAAfKEP+QETTRDLveAeXkvqznHR\nX92P1tx5/MUkRSSEDnDkP5zWn7m9YurIGaZZ8QBcIY5jEF6BQzW296Zetpjr\nOiuaJZFk2OFqconnjR/L0YQocNlCRkD2xsa3J+EEn8nxt1hjfvMlybbLhi4C\nMnE1ca0M9smqsAFP86QPWWy5zG8ZeJfPyCBXUCvLVrnTqbZC055lsZCn7ryN\nAY4DNNgf9SOivTHwW02adj0usvdSIoZ1XiFqVs8/74V45TOGzpxhEmAGMBTD\nEku9/T2KnhEHmF2jOJvrcyEPhh+5cKi8/vV0osL16TVJ8dUM/v2/JtZO3fPP\n2FTsoocJC+eH1Q6Fn3mj8Ms30E+FWWKHH0okKbQNzBIo0yoQVDrBsZPIgiog\nXfTkK8fjtlimccZQZXkRN2obMCdSwOdAEkP0Z8aU/hVvzhubSqv2WazCQ7e4\nHN/wxYLVy0zKKd++/ElMM7c8g+KFi0NZYXMaVS1E4558h4ieS6gDCRm5+D4/\npeN8jVxwjZ0qydbVA8LDCLIEKPlwgJ0ppuo90J/jg6yeahjKjocbRZdT8CKk\nAMmzyhVE2QkEXG/KJWFp3AKRFJAhhXbAO6BauOnfh59uX+QvCs1BO3j+PTGW\nVvfdrY3nMK0/7eF2nsMl7n73o0BhGKDPrs2Np1Ng9JVqa1qL65o7wRAfXQV9\nKtDP\r\n=7plX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.1","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-1c6984e-1600643212102_1600643276571_0.3338866391865647","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-4234edd-1600653937185":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-4234edd-1600653937185","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-4234edd-1600653937185","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb1ecfdcfe270a7875d641a5f31883ee1952d838","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-4234edd-1600653937185.tgz","fileCount":7,"integrity":"sha512-8zj0vOJHvk1L5/aJYlO4N52ZgTZpzejFXJN1yceMFjNHYLMi8+sP3XCtrUUMuDKJHB2NUJ5j/DVpfs2pznSGDA==","signatures":[{"sig":"MEUCIADOeYF3dNUgknsi6N8ZRxLwD4zSmRPbx77uBLGXh0tuAiEAsqkQ3Px26e/WhNf/e6PYzN/P6i52RfGqH1mDf0v/7L4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaAqtCRA9TVsSAnZWagAAx8MP/08q4JvMsCWywT9u0V1t\nC8Yf+9I4xJ/perKM4kALITtcildeU6cP/wyS0/m8ul8M3YYQ97hLfA3t3pqs\n4tEwf3tcFGXli8Lxe0deZDsp0EKdAW+Jmktl3kByff2oun1SDQIz8tBcUmSn\nSWLLxaphqwCiXRJ6Gcp3EOLzIlDqRi5APu9h4AbvoQBtHB+JJ+BfsAuaoEFO\nIzGjtHT645R97YZNLy/T/TVp5eh0m0nCWWvtGBEvhccNElvpBN5rpfXbR8we\njKWDu3zkdSlH6dpaoLYXVGaOnEJg+HFSEAwtWByEiAwsBKFR5HeY5nKB3jUe\nkgOFA5d+BF3yyV+z9qUPDtUoz2fX6+CqbSovtjNn3qeQH7RcAhCocKck8ZVc\nbHhYpcCKr/lBvYv69Dqhuz9qva0rWf20iiL8OLSLDB3zE/sN7K7FpjnZzIei\nHjtodQcgBeHKiiQPROvQ1LiAnGokRO5gG5svH0bQmQAFHk2rFkLGlqYRMVQX\nON3UBeo9PF0LeI1O/7dihJap8f4xa0EL/4chM3P7Zpv2lg6qmL4m+yJqAzXa\nF8icniHSJADhqiNu+7SZLWy9XYlZ2zkhkCYN1A3HhWj1am/R9y6wRiB2ZijS\nm7yvJ8xce5Tv4w3nmm12OSJYJt4IcEiFx9Bc+F/BGbd0Ds8brzeLo4TU2YJ7\nisru\r\n=8BXA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-4234edd-1600653937185_1600653996688_0.45432296927629534","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-4234edd-1600653939689":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-4234edd-1600653939689","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-4234edd-1600653939689","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d272645b4c1c37f348eea85a852a545ac7519ab1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-4234edd-1600653939689.tgz","fileCount":7,"integrity":"sha512-HXkYh6kClkh2O6sfQjO5bdH5l3vfRHZkn0plwG/uCp+XNkfNxMt10WSsw3gsbD6Vx9D/TKTBzKa442yPypFi3w==","signatures":[{"sig":"MEYCIQDoDj7A4TnJjM7V8/dxWMaAPEIfYg39WSF4GKIVEZ30jQIhAOuFmH1s29ujKZtihqQWK0Hy0opqRlUy5vTiM7oqdDu9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaAq7CRA9TVsSAnZWagAAwHAP/1qzxmSADZSswjguiDF2\nIG2tPZtvCDtl0g3pMsiOODi5nAplUjr70vEVuxgTDc4dvuuVPbS8cyNtMq0Y\nPhjGYZEMXcs3ch0aDi7C+4KeGSRWSfbBTaAsJkOLeYrmhVkqOhVbDQIQtgmQ\nu7dvJmtYDHRwkJgnFYvhVq7ozrLNoZkUk4CPgkg9PK12gqYpyXfUX16hpWcE\nSHFAJcRFhVUzjxDzg8tOR37jdRRNohbjC+p76m93LPJ034kimwgDwI5oSC45\nFWSJ6aT2rXol3sTbmNTuudGXiMeFLdMTyHIKJAwDBC6+maMHJ/d1Jv2zkf1+\n8k/tSo+jcQHuPbdTUMMaONpE5Sf3mi5CanGhVfXcZIfnP8o1WiZIMQKoD8KJ\ng/ftHOog1rHEi28zQ5ouVqQO65IStJeHIfznEytfOO8MhRaygfPBxq89VB9V\n969KmM8V06I8vUa3CqgOVajwJWTLgxYIjRgfHOjtKAgiZo0/74NPSYC2uTuo\nJWZEz0KMfhMpWUmhuQzpObmtUXYOqwBcWeLr9US/2zgFHyFB9QwrR8lKOZgM\nbtnsB62hLmizL7sZOvFoaQRL0EDalCeJE1CYTtcuMFdMl+4A8Uf4eSk0dwQb\ntfIjTt2cu35mfd/YJHyHe6vprNWaO9nwW3Xcpb8cyVnnbVkXx5Qc5E3ZUelK\n6RxU\r\n=ABK2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-4234edd-1600653939689_1600654011206_0.7234541336615716","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-5ad7f27-1600670418859":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-5ad7f27-1600670418859","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-5ad7f27-1600670418859","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6749f99f153a2fd6cbaa251ef8b32e7c72dd2b89","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-5ad7f27-1600670418859.tgz","fileCount":7,"integrity":"sha512-Zt1IoaBNV2WlILNPerq3Wu4t13oBeiNHCQ6XcAFYRr7XNWbSm9ruI8ZwDbvAtN4oRMGzafj3H4z5kpPAX8fVng==","signatures":[{"sig":"MEYCIQDbP9n36Xl8XW4h3MfIRUPyqfd2nRvT5pYJtcPCSPWyaAIhAJZSSSAsqXyN+QX9fHbllUPupBspUmEdD2zJSamgChpZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaEsLCRA9TVsSAnZWagAA1OAQAJFMAvTM5t7gcGsIS2MO\n7PFXvkOoKjlLV+5nGgUw0vfPjtr2uJ61myOtFUFar0P0mCzPU69aMlshRyjY\nK46ac+/B7AFVAjnGshjZH17mbrY4Y9M/jTAJpoX6aSOEgGjuUqpG/dJBNCdF\n6bcmr3K5zbr8977gNmECh5usn3T0/9faqBvAkFumle05uejLr+g9CuG45miu\nl/4hOZVkiZzWq3pn5O4Xm1M3LE07caIQ9t8cd2ZXJUcB6cvsWB44Jq0bumRR\nIPf1y9q9kKOMgRBbl0GYgF2mpQkdCNu1rRP0a3yaHyv/gKBUWwfbtUBR3NJy\nuSCbInbkrluZ/XVGop0eeatLy6Udc6/42vp7qx8xlon3Flpf6g//RmnY9cl0\nKz0buAeVYBQ9r+R/Ftq0chrIoGZ5D1YzpiK8hrlqd4cqLTaCETrzFSR3N6vE\n+hYxjTP3DeeBcqijrf2FLfmTXQiIhbvIsfO2HS/lxn2YTTF/GTAy6YYzupRF\nxT/UUt4kAGR+d3NGaY9g0p4NrtEhiLHjF6KUktaIMcT8Fjtf8bLwWCd5/wPj\nSIzbzib2rDV3X33sqc6gc7ciY/nktu+L/LgOfTjV/f5l57Vp+KACQ4ykHkBq\nR7YcOk7kHUIs9Oyh9qSqoyhWuKkOHz9q+m2HWBqU8rOQj+knBGOSxalL2WwB\nCB9o\r\n=6UGm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-5ad7f27-1600670418859_1600670475499_0.7409665187583658","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-03233c3-1600670609175":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-03233c3-1600670609175","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-03233c3-1600670609175","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"661c6282285d12a0501c587c9fc87db9c831ea66","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-03233c3-1600670609175.tgz","fileCount":7,"integrity":"sha512-ibyn/FF4DngQ+xAuGxwGfnVWP/fjWK/SuCEv4fveq+gCrtF1oVA9r9wBUfYCws6DfSnqbc+lCBasYlK5j09q2g==","signatures":[{"sig":"MEQCICj7zCdXeEOaSXvonTUJNZWngcOelb8xZP+HjcsZJeTzAiAdp2hW6RQAZ4iCdjIAdpN3iNkHMExGgFF8UDU9WLo7FA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaEvFCRA9TVsSAnZWagAAXE8P/jpXSORzAFp1du3dCBZj\nZnWJNI1UrEHaI6Shiz7CeeM5k4siEIhs9g8Opsh5R4MDyGGE1HL5b59TMrS7\ngrjLjz9s5yESKelWNOBkMK/HFKHvT2H+A4PeganL7/wN1VEdV2MmjBy0Kz68\nok91qzz/PEN5OUbOf456Vr9E0iYSKc2CHRE61sdx1bM59TM5rfuWel9OyT9c\ni5lAeusGVsUw5W8fvEcxWjuakrl2ckN2JN++9ZD+2/ORh+lksIdxnlZNC0w3\nnTE3Azi1b0TyIR9M/AZZ20/zVL32Z1ae5BY9V0Z3BappNX1YQ2jXODurIIEQ\nJApKyezk3qSwgcxDuAw8jysQw4KlY63MjkkK1ge4BacyuF70KFObzEChD496\nFwnrWS8qLayrB9rHvE3ohEI84b+DgcmgKHtLa4RsPu2IZpVACzrwo/N9NnoX\nrM7FplqmDASt6/fQtYtamv7r47a6erViJ7ypy7QiT1TCv0avlRhQZJFbCLIS\nMHd7nTfAcznsTWPf3Dh7oL3N89V4eTr2gfH4FR3dDutDrrIEsspfyrON2090\nF1Xmf+jHsXSaE44FneKA1FaT0ekVDDyAvnVR38E4Rr1BpxmSl8gvtAU2U7lt\nMWmv+Essw4ggV+6mSwjky+Y/uSyMr+HjpPnmZtb6rxsZWCY4cNg6jFXk8Rlg\nHfyl\r\n=/55j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-03233c3-1600670609175_1600670660499_0.7202537346728335","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-7856a9a-1600677620466":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-7856a9a-1600677620466","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-7856a9a-1600677620466","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0235a57a87dcf7c4eac56bd391492f151c6f9fa2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-7856a9a-1600677620466.tgz","fileCount":7,"integrity":"sha512-lyKQKj1FMb6lY9FC/0sIAe6Zm5c9L/Rwf1sYLomkviT3fLVAtxYa1PGShBxXe+wZyrV/EqpdRpPMTz1Oa/uZIg==","signatures":[{"sig":"MEUCIQDl7SR9bEIDRggZoRIcDNBU2cuIndwsLFU+xyl4oh/cwQIgMzfv6H4tU/RPQO4bGO134FHWNO7u5e6rdqB9yAGbBQs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaGcxCRA9TVsSAnZWagAAhJkP/1pIqzFRdfm2KeazdaNR\nHcV1lTinIjnmnYjz+rg8GQtFp3mNfCP01me7lK3lFwTME1QTI4MofSVf649F\n4FeOKRi7Mu1GciMw7y2YDQ9D//l30PUD4YgKFREEM9X/5ExH8nXCyF7P3GDy\nPNTRId7kFvlYtpS3uORUHF3G26fWH0jvVBk/PzahwtjBuZ3DnqaCpJ3k7KV4\nHOwwa1zKRQ++pXZVoMwO7vh/O4M9hOaOiqhWox451Nwuk7OV9ZsHcVVpn6i4\neEny1PJuu/yu++nAEXfavD5J4aDTfFe9qCWTU5TsOQ95Bo+/d3pIoAnze3Nq\nVmTZv5e3BACa2tBG/1aS4OkTPe6Vp+Tgb5ijbpNAOB6cuHYCUNhS57jsAnn/\nI18UMpHxn9JDkirvaXLwXzG2pZx+OuEAYcO13CwFh3RlxSN5WUJR+/ibJn1V\nbFa6D8T8r8M3RDSghPCD1QBUUagpQxYjm1jEr/CA+AMm+kx9zf9HDa7lYTub\ncV3b9nqTgPc6i0oHXFY8ahLex759jwT4J7AXY7SyPSbBL70/MiXQJqZtju5C\nmfjxu5umX780zdbjLpdGU47gKoYHmI2eAl0Eh5QGgds3kGU0ozH7mjELLoyl\nbtEXmBRjrble4vg2izmb34OSXD8B0YPtwJYuRvvqteHRD27VZHpxn/nCziui\nwqHx\r\n=Tkhd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-7856a9a-1600677620466_1600677680953_0.7474781816751328","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-7856a9a-1600677622997":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-7856a9a-1600677622997","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-7856a9a-1600677622997","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e16274c90756e63c1c9a5734f13feeade08a368a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-7856a9a-1600677622997.tgz","fileCount":7,"integrity":"sha512-VZVZUv62Q3yJhnGqlL2fUiiMhkDFRm0p/ZnbwSl2cobUZVT8R6SoIFnXBHdu5lp5KMmuOPHqLf3IEj8kr5qSxw==","signatures":[{"sig":"MEQCIB+XzJgyX8J71sQ/B29bccKeocjMJOa/2XNxUU1XuvVVAiAyx1CyLULKAyCg6Uyc3ZkwYkONiZBkqYGmT3/K3Trbwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaGc7CRA9TVsSAnZWagAApmcP/2QydKh9YsJJl28xZxNh\npjJ8FzEjPMB23XaVXZUo9CNyqJli2QzExe+hVVVvwMyBZywSBPJ4F3dKY2+X\nE+ocXnb1emCljm2SY9oeXaEus543wxwJD58DlyBGcChOzRauNxHZviuCbflk\nQncVs8KMzOt2Ls9dV2V5WotxSCPe2tWY40vr9QdvUolqQB+2HER3+P5RimBL\njR36T6IXmZ+RsB/a6FTJo2auBYSNeWIN6OapJEDr0Nc/KJOOHwxXNStftYtr\nESJMXpMX0nvCkIhwSlNFE5tkAuaobStaRNdvpD2LFBu7xFGGnQCI/CSrENKL\n3KagXTIUeo5oYnGzn1h36TfoZU9RThyNS+CS07ZKeFPDXjiSJHfMHyOvwSAa\nrQnJouGdodvU2gb4/n1ccTfnV2N7yErRwuVjq611uAKbHBmRIgBsL8EttY8+\nO64QnHCy0K/mCWb6OG2k7atJXwQRJRVi60mFClp4vRwzZsbo8y+8813/kfJv\n2kW2c8dgIBNxfIvUEZzsZEyBZuhIcXU++Yh5YdEvwSBpVJOdWuyRSSL5O2a1\n1ZkBnKVyCrbQElU+/oRbeMgceEVntnUV5Pn5U2EXRlddNBIPBZwQUL7kjHYj\nWA81KyWlImavLU5frULfl7IEDkp8maOU1dkaHeOBVZmW5H093fa3Cpvm7IWX\n3HwU\r\n=eK6+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-7856a9a-1600677622997_1600677690936_0.6862307904214628","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-fe68f73-1600851494194":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-fe68f73-1600851494194","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-fe68f73-1600851494194","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c819fbc816bed9a156d81188bc6507cdcc3ac72a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-fe68f73-1600851494194.tgz","fileCount":7,"integrity":"sha512-aHzai8b+wxCq0o9PCmQwCkUR4X8R4lmDVVo5ZdKy5DHFXGeJPyaMjXvJI8mjCPzX7b3UUl0eT6t+uiumQXGFug==","signatures":[{"sig":"MEUCIGvxTNvMoNvsxXME0WoMAa7DHKr9rYX5c0Atwmp0unD1AiEAsXf6+OO1F0SUlCurvS7wFukOmOVDBz8AwCPBtT0nEdI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaw5fCRA9TVsSAnZWagAAETAP/0h5lUFqEcGwaHiSTnaN\n58LJhgBsRXFB+R7n24+K3SimEViKLX8Se3k6gfKS1eDj91y2Glrgtf5Yjb5o\n1jwGqgX/qw9LuL8/beY/ybbLXx+tZN9ZhGiNCF+5kpNTIhKyFaw1tsmBpIsd\nwBo/UNJu3+GdvX8rbmLGMx4Ithq280eRtGnHl2HQR1ce8hb8RTTHbVg70//l\nFFtl0QYFThNgp3YqTqIos0smsKIshXRmEuNhKY2aP+clD6qnhHIV3XRkOPhv\nzcM9JU59wcwrTJQcG/ctQ1Vl0V9S32lS/frX0e1xDzMRdyonl455gK1qISBf\nQJyA9imS5Gb+632MOLX/OMLASGWUul3NFckMyiOaoERP/glKsrAbgQ8jqH83\ntApwrOgRKWqKpRCxtgqZMqWSws41SkEkT1Gz0yoipO9e5CbRX0Bv0U4ERPgM\nX4y90IDpltnLxATk8IrmyeGnwL19qEoRXqer9CMyGd6BQIc9rl27MiPRITmZ\ne7hoXuUFJNmTkOPzmypCp9RxNK3IkNep/68Q1nLOaCm0DunGN82TbsjCYQmX\nDYAO20MvlPNrpLFy9RiBI/ATZHMhGAnONxjXE+Li0MrS0Zo7Y7rnAg/sSUJn\nM31LwWHztJey5GAHR0g9Sjo3BguJcI8hu3iR2ScLRjOgVx9vGEjnZtWZgM6j\njvtu\r\n=Mktv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-fe68f73-1600851494194_1600851550938_0.019402175868276306","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-fe68f73-1600851488654":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-fe68f73-1600851488654","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-fe68f73-1600851488654","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3f177f75f91352a98314ef3fbb00e49ea2490b76","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-fe68f73-1600851488654.tgz","fileCount":7,"integrity":"sha512-1qtMrWm8wFA8TwcQ/bCksekES5bj/itJlKHeaLiXyHCBTHH/dF60PC4N0rfZvTvc3ZcWsM+OUP7nBqhqEJfm8A==","signatures":[{"sig":"MEQCIHBWinDguDMDli49MVzxNKTnkO+W5Rl24Exz+ce1hC1CAiB1J36OYnFw9FRoxW5u/0o/QMz0D8hAJbXAMTYLgMlyNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaw5vCRA9TVsSAnZWagAAHY0P/ipiGlGYaQs38i+ByiD3\nRda/U5Ri7EwqoYPZNslOpmRh5zwGS6e556lHAiCEIW/2xHpHIKzVUToOhhB9\nydEdhCBwq/Y+ZzgmkWs5BA3IfAB2zSjs6K5zZz/F/+PdiKqx6qR2WTOftK+o\n2jsC+DIoSs9/XH/0T6P2hn7masffgaoxUh3An4/Z5nd8zX5kRveD9gkPUjMM\nA3R5Q6AeS5i+iJ522FahvvVvaGJzhwj5fFk/xfSU2SWWBcUOK+g7g8Ecaeoh\nvak98dB717RkMgFPlrYIMwcxJzRW7bNcNP88Mp2R+ezOZOaClz0rBNNJ5BIx\nD7kp++GhYw+6IbS2XWSDFQ5iz//gJDKL6WcI0RHfj+Mnahysd9IEEZFt7J9x\nuq7o7PZGyx0GR6Lc0DJ332KaQD7+GuQkmCKL6bzjE41ux1cBg/Y7pZA4sy8G\nrlJf18C4GwN3Xop5rBtsoBZF5rdMtuUycdY66WjGygsL8/OSrlueOlTGBybG\nr6r1xpgbeqzuSr4CHMwSUnq0Kxcp1GFRWaNlXtyyNHeISG4w61Z+PdIBUfVo\nYd466po9NRCFBZGyrqwNPNpaZJh3hdYOaptDQTLCRhudfOXoA1uH9I00wT7x\nk6JVZGIk9c2UjWFkJc1bzbzR83bjjpheNYutbyg+SuPnQ30YfOzToQ1L5cZG\nj7xG\r\n=ZgTY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.0","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.2","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-fe68f73-1600851488654_1600851567240_0.5253701826573789","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-4590b9d-1601098144869":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-4590b9d-1601098144869","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-4590b9d-1601098144869","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3ee893ba67cd57cf854875fdcea1ea5fd21954e7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-4590b9d-1601098144869.tgz","fileCount":7,"integrity":"sha512-eCezS3WPYzY+sdX91M/pJvsHlOozpVHftFWD+Pw2qX6G3ftJGrPxQ7wrzD0GfSrRwCA+X7YzcyqDOHW56CD3Zw==","signatures":[{"sig":"MEUCIFmpqdmevuO9DBhuv2Ku94uCqMRAYy9YNFzX5cKoKyH+AiEAxZsYk7/9q3DxhUVjfIkPdSEDTAjIWTC1GkLN/QORBgI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbtHRCRA9TVsSAnZWagAAAssP/j5vMLvg+AzCtYm13OlT\n4Ndxuchj/oh0mEmtM2TIaGF6nmkutqMLlw57FAbRNtBAvTd6/4GaLyUf66i8\n0f2TxlK3CpRm/hCfR4f01RaeCrXiN3dQa7YymyXRHyEAcaCoITz1hNo7wKOS\nwzty6O5OFzJ7wil6K15RCA5on2l1lgzmEHv2+IwTKMPvYUI6Me+Io9x5JOE5\nyEgSMGokVQLuI9OM7QVDE9Lqmw0xYCrZ4ESCsxmL/2CVhZ4jVeqPMXsi/7tI\nxmvH0bWLNaK35fxfYya9sb2pFH9ZKeZyAXEozv5rxF5ydcCQj+zrRRjUsdCJ\nWhlW6EJEcgZ0VxML6q0YJEcEauRDmDIlpbsKQyXp1mtJU4n6lIe25uDern7g\nEEgVSDxzuBYJuna/USgXwG3hgUNYsbwwxoOvSB9lF0dsUGQGPPEb88MPB8b1\nzaAJ7vC7WwpMf2pnic5mZQL5dGmlh8Ai89IQmchiyl2wT7Sa2nkaXGF4pTgh\nrOJy44R45K+doYm9ua8Z3cqa4zy/UsH8674Im0w2+FFOTeiR0pDKOCW5pylP\nuaAEpPrLkGY5gqne3ePRwZXN15yk/jX9KPH5OIlmlfmlpIMo8ngIQDX7G5v+\nYPArRtm/i3CTPPY4QRY2x8Q9LtQqzuKyqfgfp52drd1QxDtZyaLWXMyPo16F\nxU3z\r\n=7pmr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-4590b9d-1601098144869_1601098192584_0.16841826285072026","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-4590b9d-1601098178605":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-4590b9d-1601098178605","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-4590b9d-1601098178605","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6dcb2a97b71085ff9477dfeb18f5f28f6eb11ec8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-4590b9d-1601098178605.tgz","fileCount":7,"integrity":"sha512-TFAVRPnsGSDJ31LXaul716KkhGGFGJm7LjOw3AiNqjjHwV1bQM4jwKVRVX9Qk5gFjpQlnXbsKV+ozyETCfk4ZQ==","signatures":[{"sig":"MEQCIBVcwuJapeYn+FhkKr5Djp8LQMKEIUMEOx0vaYRiPUaiAiB/DUSoSy3/A4/fcuZb3uEI9PVmFfrIZn1/gxNVCh6r8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbtH+CRA9TVsSAnZWagAAFLMP/i/R2NUVQqu6XkmfgU3l\nKJ41YnuOZuFemwEpBG3EG0NV2mUpxFmh/0TbYGTis6l3D/Q2ybDqpGehQVGh\nP5HGqtGuM8KpgTYisnQhlcPP1TSG59axZNxF2hdmYiWcnALr0VN2nn35Bw6P\nwq1oLE8vDMmmAtHltisKJn88GFTF+x2Oqd16dHpZ+C6TMtZMeGNxqdVzNoTv\nCgz49kfaSoq6BLuh5GniRjQMarEk7obelCQO1mTkRMefr9wcsm35GmiICtXq\nD86qa/G2ElaVFDOt4z4eBmyUADpwXfjVmr+soANBwF55t6YdGcH9F3saoImA\nDJ7MEiE3nhDbc/hpTXzXxfonGY5P9bby7GXGcnQ/tFqub6Ow/4b3yA3e2Rv7\nr3UJj1bWdNNYWX1Fk2Gdsmrfm9fjWdeEjFpXrmw90nLHNmK19QAGV5zYUuH9\nNM1pa4vOnDloyUlOse9C7gTO9+q3EDs7QDKpogXl7o9QLvuTOdg43YdAfrJS\n3HrHz0Qty1cghWr/a79O9dU56HK3Nn8aQUWAXGfbPdXNLQ9UhWHHmOeU8ptu\nJ7dkt8K5sdePdlXvVOqtvo70ATcy78qQKtSxGS1jsLtxHEPaGPibMYwhjlX2\ndQcZbHS+dh05/gdN+fzdB40yKwRAIAHO5bLc7/t4+ZFkAbz/28BWOaHlsE/x\nTa3F\r\n=zMJl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.9.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-4590b9d-1601098178605_1601098237977_0.9734696560200151","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-84b1de3-1601158585303":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-84b1de3-1601158585303","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-84b1de3-1601158585303","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5fbcd7f866f4730b3301bb9709b2ee0dc8569695","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-84b1de3-1601158585303.tgz","fileCount":7,"integrity":"sha512-fRaqvDnQ1r0EeuS1Fa0zH0hrPbgXQ+roKKWK4Yvr9bkZxX+nWQafMF4rIEtjqAZiq7Yh//krVq7cRtNOXi8X8Q==","signatures":[{"sig":"MEUCIQC8TSrtgDYcYf54sEIqEvmGP283nC1PKLuqI4/u4WmviAIgXNATOZKLfW7zIdOixHhY0lA8g9I6VA8rmjEtMi/OuZM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb73uCRA9TVsSAnZWagAA8TMP/0twpShC2rnFxqGEPso7\nKo3xHsrSDTNN+TNf/udTa/TiJa4MZ8nZsypGpC9rfyZVV10trscCmnbHS7NV\n6f5QIXYXh0Fy+6PNGd5L4UhvLQQMDHzKhYEeEFhzmfsJAah68xI4uu0qs3pV\n/F97of1qKC0J67I2uwkBACwKF6dFtE7Bc1SzNeux1P/1y7zgFYt6C7gyJcb4\nG97vRBrK/xMvyToGzzYHHtWKZBidjZSN52zT2KT9sLQShaMwDCD1UCqnH60/\nfCqJSnQ/WnCvkYL28DF+4XHwJb2cYlexLAODHLS04znhGOzUHa94MuePUHWI\naMFggcw7Y5M7YImUI6m6VIvlFP+Z5qOhNU3hnqVF4bCC7KdPcYaZHQTCg1eT\nj/8KEEDDUAKWQLqwBzcv6r1RvITRGX/Qo0uO08FOvxBQZsjzyMk9W+qt1PFC\n9TwD7yEtRQZi+GviZXcFdEEMYYsGZonzhK3T02dTCc167JPdMrWPhm3k2jSE\nx89apWvnhodyXbPOoZY+p36O9PUQHKR5q87RbrVxuyQzQ5lVCduh5F1X1MD6\nM3HxqRwlURc7r0zYaZQ/1A9ZhDs0UYXZ/iNPEshth+qqzlzxOn8KD2fZLkiq\nfSuVCA3zrZa7rqZxyI7kKoto0u1FDlvfZ9uAMAUo2tg8U20VmOEc8zPl9Q43\nRwcd\r\n=gRZo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-84b1de3-1601158585303_1601158637670_0.1667542450385815","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-84b1de3-1601158587080":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-84b1de3-1601158587080","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-84b1de3-1601158587080","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"25a281e146ae33a8e6a01212fecd46ab0d764151","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-84b1de3-1601158587080.tgz","fileCount":7,"integrity":"sha512-m6C5X2jPzBd3FpEiYz/MWroKruZMShqOamUy7iNObYr/TQJteu8uTsc5D+DFek3R8ZLdONhc9WzfVqLDedCshg==","signatures":[{"sig":"MEUCIQDUpP7mS0GnrtaSecA2KqL1/h01+WLUd/R2OyO+Wd74oQIgAVyAw3J/tuxoHX5ngBfTt/8RljyUdx0eugeyRf3n/Dw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb733CRA9TVsSAnZWagAAa5oP/RJvKab9PqaNDZn7ycsU\nEt3P86a6bpzelM5ftviSlNfskIIEPDutdNJYhSBQY++SozzeDFEqHboZDyYw\nc8p9nW+pmrEn1e/GH+jE3YCCHKKqMJUAV+e4PvrOdBRFlX0ODbOE8yPPUfQn\ngp3iYA16tPrs7tzlPaD/t+qrBJaxkrf3cnAGuCx8gNNwte+ULg7qVR69NseJ\nqYBkhEVkOYDDPdyeMZlW6ZnxrmCNb/kOrFmSG+RD0LtKMYzi3iVWG6Gl62iO\nB/SI2VPib7gydIAXsDIHvu2Mkve29jFN9/mt63mUlv0d3Yj4DZoamtlyuXow\nPc68I1ZfgXbaWerh5qHlppnYVs8tIfRs8+I6ADni8P/GC60A3Oy3R+qF8EbM\nKymjBQ8Ez1V6ayAuxXZ/KSoMSXX3sgvDPnC4PTP5UmFzzk9i7bEQPmGM384A\nD6UDIevNWFWOyqovJJSLtlmA9GwxcoHw3HXBUGxLjoSvONVf+zIB5sijiyCn\nVZtevzO1bV0yp7GGNlRGob1lfBMKWx7bxJfcO2FTYb7muEWsTIYiRGkk1Ufx\nzGFwO7GQiTNkQlSbnSxuM+rpepiFHsXJ7pnYq9x6FaznJfKJ1UsjuWR1NsQ4\nlyy+h6/cvzUUFUp6K5hmcVX/GzU9Wat2gXCDUZEYf6aoMpGvk6t4PqkRvFek\nOE7y\r\n=NA9D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-84b1de3-1601158587080_1601158646625_0.4104666982752454","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-0d53374-1601223880112":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-0d53374-1601223880112","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-0d53374-1601223880112","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ce7047f8079e689da758a799f861fac7dcaaed72","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-0d53374-1601223880112.tgz","fileCount":7,"integrity":"sha512-+3JoQCnr+f1MiplP2j3KkVXouYktldPI32o//7VHa1UeqObn+8so1THMNerKRsyUNmD/xwK8K7F7/vTlK40XAg==","signatures":[{"sig":"MEUCIQCMtYJP20zvB/c7oXh4m3XOemzjPTDj3qOb7ryeHFyyHgIgENM0xno8LPVkPKPpmZUvXv2Gcfxc7Xj8hgEQ5kjIpL8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcL0ACRA9TVsSAnZWagAAwPwP+waWV7xWIJ8HBPtNuUc+\nyI000/mglJPEPVCHHiLLUDyP49rz8pAhsjR/86lZdnbsmFEUc73Ia+Eh1rGM\nj3xEinsLRYwkXczlsAqXHP7I3ci2JxjqRKnGUvtqP3DKxXyF4jk6d94GtPnH\nttXVuZrLrUXsX29GcgwxFaseDj01sveVVF3l6mvR7pKKhaYREJjkPbd5s+Nx\nm/LgrmjWr3N25sWjsmbCA7kL0y/A09xY1YqndyOPgIuBguD8rMRO/aFetf1V\nn9qbtjpmIEw9bDBWzMw/qfx8AwAsV3MCe33YLDiBiDZh4eWmChjV+JA1zJdX\n2Tnn60nQ73PGvNBc9K0KRTUHOIy6GS0wXdCpnaifd5cGaet/01DYyqcLAIhE\nA+hBndnTVre+b4Lv7/kP4ZhNUCqGNhzpRv2tVHfY+Dwut0SttlkLHc4V/X81\nOBoIQh7d9wV1CJNYVFGibFuGyMQQTIiCqj0M/Caz+ywsXOdl/6y+T5STY8BK\nfsaU0lp29XdhVPGx8O8n+6jLgRWfYj3biHjW4b3H0g5Zu6HvbypbX24mJg6J\nP1FnQSwNkHdUsNuF1RMN8ehg6Jd7AP1UnI9z+b1MWlNSsXYlCnUblpJo+qjw\n3hwPo8zSfcVjrcNblVX9L2/XZ7KKA78YWeXujoY39RTPr9B7e+T9nfjfoF7X\nMCat\r\n=oDPP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-0d53374-1601223880112_1601223935495_0.41463954108662304","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-ded541c-1601224095454":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-ded541c-1601224095454","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-ded541c-1601224095454","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"454257a88357bde567692fbb8ce0752dee1efdeb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-ded541c-1601224095454.tgz","fileCount":7,"integrity":"sha512-1JRXm9g/pD8H8+nImfy6YhOqrQGfan4vYKj7Nm+EmZh6q8rJpcASbgvKl29kekgzkMNkMczenBaC5RP3YMHcLg==","signatures":[{"sig":"MEUCIQD9bV/wOfxcYhqJUPQCjELiywt64JEHNCZc2dStzXJkYAIgD+Lxb26Y10kFAt1cbFOy0fnre162bs73T02jJut2OwU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcL3OCRA9TVsSAnZWagAAe1MP/0kSlOksg0GOPf+0SkYy\nMWsJ/OjJ8C1qX3529my6kdk+Umzh1hszB9Z+9+BcxcNFrOzRQbCF293IRLml\nY4MFjIoCf4gQPQGW+7hx5erX3KsXFHNMXvn2pQ1EVU4E5HaHmc7+rRZYEQe3\n0kKprWqujlvu5WgVN8vhGhTVaJ0f8NUFHwZw7gjDp6pR8YcIKu1j0nSbUPA7\nO2NKLEZqmzwzYoBl4aMdJ03UrAmvuvmmdGzwJgahGFXmZyj0GdHR/01CzbBx\nCdukmXGw7lLyp6qDHMbGwrH7RuvSW9tGjSUfeBK2z/ufBdYa7NARjhCzfJ3Y\nJEPDIN8DtLj53d+SWQdstYP7U8+iy3Qj77ZLhaOX1DAJRHk5G4VFMhP6Swju\n9l71eGc/5rNhGjKWgiBpVGvYuQZfvVGaWNgpYcmQ9NTL6vAPaKgGK2hImnCC\n62GCWOs6jN47ywrga99wNWqwq6+YqmYM/RBo0AbrN3YXJBiiu3QGxanokldn\nOWlq7ZR4T0jUHmYgGZO0Ymm8ODJFBLaQuzbviP6a/0gZbRT2IOWOzY4FD6dL\ni1B/gai0ezcs/S8/uO8xEfMW0jV7fDTtboSsndy7PPFomaoqRk4HMulWaLqr\npsPleOsGXTMDY28uOEr1jEFl4YK4rqq3YzqZqAXBdnDxESIgynqm5OEc8XDD\nDJbN\r\n=Lii0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.1","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-ded541c-1601224095454_1601224142212_0.6344668950473435","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-44c8e71-1601351193815":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-44c8e71-1601351193815","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-44c8e71-1601351193815","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d9f6555217647a8441d26f38bbfc50b47f3b32d7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-44c8e71-1601351193815.tgz","fileCount":7,"integrity":"sha512-aSVi8AXIKqymZwA8stnRLAYX4BrBcBqDkA8UCexbpclab6BgtLufZMfttQm7dYiVbEMeJZGLrXuQ+bi3q1glTg==","signatures":[{"sig":"MEQCIFECZMpo9uISQZXz22CCaMTgZQWKKJzJHapB1i0lBNefAiArjWbQNvYZo/mgejXYHqT+N5k+zzHSiBa5lMeljxD7Ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcq5HCRA9TVsSAnZWagAAWjEQAKKEIfMBNVSE1q1Zcyf2\n617Qqs5qcz0nYPcRV0AL22z533hxjCPLyNF+sAPJpOsjAPa+CJXJyd1ViAaM\nR9vGgGEXF8UF40Lt5VGMV1n+TQRmUKEHQ6VTcHw/TEv3ELw1DUBKhpZpPb/h\n4yK05QGnEPt0zCVtpt+C21m3Pda5xS23Yn5kf0T8Cefq6HPnJFe7qvYsXHsb\nBJRaGZwagumamYnVNKlMNtS7Ad48Gj5AEe5M4vAIWhNvOKnJdX28fTxGJiQp\nuzcT0WPX9a+ZiNvu+SjBhtlo8TDuPoogqnR/bvqtTz4wMe9xcV2gEpDyUfIq\nvKRpFwEQoUjeVbbk1KMZ/wSfClTmVFdD4cp11ez9gYecBEEuX25EAel4T24v\nCbcCMoz5iL+kdv1RdTFRC43hFDWjEtWLOKWA/9dkYhDTAohxdYsHE305gbga\nptoUWjwhJmDDl04lnUaOu0zvvCtmCgHeiU4IhF+WK/7MaAsrpJIWTMWJHKAg\n9b4jx02Lp4BPQXIMCCnaT75cx6uGbIQUyeC9spYdxXGyE9OE3DOG4JyFzx7e\nF3oNaYO0j7HADO4+jGsloVIi2kgKSzkTzopM+zePz/tSGau7+NvCCh5lLaZP\nyLESmpumgOLVupDcmtnYRTL1ggrEJMB7q1MXc4YDUA4F/JFYXOx5W+i1LEf6\nXTRd\r\n=oWuC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-44c8e71-1601351193815_1601351238539_0.46615128213453905","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-44c8e71-1601351192886":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-44c8e71-1601351192886","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-44c8e71-1601351192886","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"50653aa91140125c5b691636290c087c48f6d78c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-44c8e71-1601351192886.tgz","fileCount":7,"integrity":"sha512-B3Awjm+5mbO0IiXGfLG8/u+LJ5fw93p1X3BK+t7rLY3sS2H6RCYLZsl2fH3+47jaT33LfTAZQqGc/zJeI2FddA==","signatures":[{"sig":"MEUCIQCxweA4yXB2uCV/D4vQSChpcfncVn2/lbglGw452cUw6wIgTJUig7rSLUtgG5GVRktYSsmD3e9W71quXrCV3xXS9OM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcq5VCRA9TVsSAnZWagAAbecP/RIbLGHmKasWkYwVgdU+\n3ncLjfiki29dyQfooKIkBJF23rivcNtD6rcrGuCm8RP/hk8yVOmD5iqVqgGS\nUobtX9QdjyWUuRvRskxpZewdy4TmWFzwpBy0XA1v75BIdzf2JFMEgesxuN6v\nveJsHt++HZ+lbTo7y3sfZn2iuenvgQpi25DOgswUjSWF/o0hVKGyB9tlMFfn\nOMEqNGScmS+dJQdRF117CA8UgI+HlHmW/Lh1mjWpblpptdWbpoKJCQOrLTwm\ns3QLKqAKDlWqQgw16jLNlespwyNMD4HNKHJcTF72NJ8J8HKVxe4QIyV9Enys\nfc6pymlgT91Lp2U02Z3S9fG806J6DX9dVaL8qFC/tNeh2fmO2poc1b3RUIFW\nk3E+KajcyViSRespL0EoF6CYfmCD2CuG3lu48rP6xl6ed4iAp7ATHxRsoGXY\nScKkejUGOFPWAFIuaKeXbLAkjFn92NEQ/iXav5/mWEO1RAYW9sKisiey/6Uw\nnZeSAwZO6bOQoIhujJwNlayDs5ht/q+TOTHikUSlsEylnCZARBBi+b0iGmr4\nNNo84nMgWMi1RkKpMMd1kzI3Yg+LrNesc1IJZpG2Rby/i5PJ3h+XoEyM3X+7\nZWf9Mk5XwzlWKwuH+9OLXdoVERjRfXbR1m1bQpmKOxeJGZROQmqV1xvsVgkb\nd/u4\r\n=Udm8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.0","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-44c8e71-1601351192886_1601351253142_0.6611470746735073","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-d38b46e-1601460820199":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-d38b46e-1601460820199","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-d38b46e-1601460820199","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0ead39db42881b457d57e8725547242348416f18","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-d38b46e-1601460820199.tgz","fileCount":7,"integrity":"sha512-PiA49LsH8Vif3vRoqvCenrCrj1uuDfwX+4Ps108r6XsE/5zAdRB4HIuBIJ+vWZRGpTPsPPc27o4can8F8mvPFA==","signatures":[{"sig":"MEYCIQCdCA8ul2bOTKdlGLktuYtdc3Bpa5ZfLqNbVENNp1EmIAIhAKc1iPeBmvC3Lz9d6Yzir6zWPU9pCzLLLco02AR6SAmU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdFqPCRA9TVsSAnZWagAAuQUP+QGgtKfSXzv1OVlEaBGG\nhTzgCTnxyRabFTxzJq45t19N221GKyQ0AB8or5HQmljGpv+TD/cSdmpn9aoV\njpkh0lQm4dB4JtDuV1eOd8dm8PhAyf493UvMEVWqqIDvUvJUjv4RALJJUNif\n/OFQXH97h0jtvBjVbbIKPzF0p5kJGHzWvJnolhj1ZC37hGei+DFGLNxL6mjz\nX4TcTd8qPtQ8+XvZswUuX2/IdhfHvKc6UEtQ3yPwLnPjq2amdsf/9hI6CtUa\nlT8jSmNl6nfPJKqLq5S8WNmD/6YZpvZi/JMNZ85xp3OyCVzJ+XsBvSoWOBj0\nGlNb7pg+YVysOjO2M16ZtjXWlMo6b+f+95FBbvthaaYg51zpqgGo3UD4hG3s\nwXhnQUg1svKjCqsiDWaj8DAVHtKJbIlLTXuvPQHumx8PSnS4F3o1LoPWGC1a\n1tn7q9zb7g+E4HrWEH00G+UALByrXo8z7P8y5tmUoVGpuj/fZ8QVDuTqjZsi\nHZlC83s2kBThnppiXt/vK1N4xH2zBrxrg7hl8824SAsqxNJGW6NTCmvBlk7m\nzvDo63/Ih10bpOl4G+9OmxpucoeG82972BdNQbIy74kXfSe5LHw+21BL0YXs\nxPbR8QAjTnSoEPdtwrGLo2ja5i2l4bXqnw/p7tWNyCRoDSl9cB/i+SKB3asK\n6BZE\r\n=OLH0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-d38b46e-1601460820199_1601460878490_0.7441883950119703","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-d38b46e-1601460822878":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-d38b46e-1601460822878","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-d38b46e-1601460822878","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"76c6700ede7a8e242870e685f18775be6e9409fd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-d38b46e-1601460822878.tgz","fileCount":7,"integrity":"sha512-XTc7csMQwnTZtJ8vAqR2x08EDY+4Wk1SS2GsBx3qs2uAz28DTLR+ncVREmPZS2OJUDIQGxTMVifPEscL/ZkvRg==","signatures":[{"sig":"MEYCIQDlNZ6c5E3hRRkMTnkiZwv5btyCEqrX5OY3dLUEDBU5KQIhAJ9IPP9nszbXl+1EjadW4djCroTktEthOSpwkIQztG8H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdFqeCRA9TVsSAnZWagAANKsP/AizMgCzj58g8VrIBTvG\ncQ3hqXvVUEz6NvVA8S3Wggc2Y8as8ciKeBwuQ6rPRqJCtDQNBy+FHzK4i1E0\ngyqXUoPgOh8D0wets4C36JQoBBDpwqyKjOmUur7Cf9WsYenYslOHQs+kn4qv\n3dMQudikIfNtg/N39ulqvt5The12JymHa7CCJCCxnhrDiSbTn7tRPnRb8F8K\nJ8lf1ltFCxU+EgKV7fWEJ4maC8jS7HmS/D2nnirXukRNLqt8pkt+RiQBkGdt\nVZ0SIj45lzfNztHlMPNLsq5FWfAnoi6mHGOAm5Jk1hImhb/GVosylO91rc9A\nWgAyCHY6nFqfPvtPYAc/qQ6M/d63RcoZbAnWiDMnppZYPLRP4AwmA81a390H\nswtVFnI7SP2q743OiOgBcT4h7SFKPrA6BVkbjJeMKnJjsIyH/60GxPlSfE2Y\n2hIkeFt6IxVBk1bW4E3oejsG0P+PT19OKoSuTBLPctwEX07eHwWm35QBo+iy\nZyzx5+56TbqDz2bhMly8Oi0W+gUs7EeIit87e73Jt6iELlevnqm9Tfx/Ivv8\n84phS9j5LShYI+zsBJTJCqaNPEXLRPlQf2jrlWBVLihPwTo0/jKS10jJ+c7V\ntDYybotQVh9UsBq9suUgKMpwA3chY8UiCvi/TrMIQ6QNPZAbqsxyWFmwI+MJ\ncL/6\r\n=uk/j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-d38b46e-1601460822878_1601460894201_0.2666871819083414","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-915a674-1601948324889":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-915a674-1601948324889","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-915a674-1601948324889","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"19684af3936e59bb659b1237b0c6a78e110eab0d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-915a674-1601948324889.tgz","fileCount":7,"integrity":"sha512-vGFnHRkC8waCP2elJXZ6QpaHUBghZgyMsga7+sIjrPrHO+jLUmcnC8ojaUFecSziBEjdJAQOQDlxLaFbkmtUPQ==","signatures":[{"sig":"MEYCIQDFBSn8XkKa5krmQZrj4ThnH02f18/WggN9dK8ACk5xFgIhALHeuMeyz9LWQqVs3HHK+21Ufl/i3npUKR7AafDfdw0X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe8rYCRA9TVsSAnZWagAAelEP/0r2FXPppMJ36e2RE/on\nTVOzCVaRy1EzvSs6AWPT8b/Gvs/pEJjVfsggGA0Kh0MGwtsAOOkpEPFCzWtb\ndbxb41cOt6zHyWhvhYx+kWAXYugzOd049UUxj8mIVqhBQlOptCNq84ABefey\n+bq70Q7TrSj5Xo0y7jO/+3ZuahxCXtAPxv5lRTW0dXrmSODlDGfm95ChB8zB\nMyxd9GNug+buOxRHjJLSghTGg1BNMbT/XX4kR/7U+Ae+xOGr37MeSCHx6sbH\naO+/AWuKEDubhxil40h+ESRLDKK6ORmk4WqPZNURGjeA4cxD8c9h27DVUDAZ\nDi73EPdI3t4llzWiB9AyxLcHEICjxXgH4tgUvIWzlZ+s/oAsTRxjfd+Jx3Bm\n0Aqi1hVZMZ/L+SvI9kTQucvT5CKtnpqGsRxF3SSVDWCRQF3l4GNLbC8NBkEo\ntZjfo9n91QWnfNTwegOXkQaDppfS4m341JYg5sPpqnKJ5IhX8RZa8cLGzVwa\nmCq/Q48CK36XGD8gcq15DwYLPGVsGdIYoG9Ng/EQPOEJrYkjHsTaPCBBXjXD\nN6V+4plZ61+nzi+l68M52kruu+4njIukp1D0ic3pVVovAga/f3JhwbSsSHjd\n1EMu8JRznMMq9n3NMp3MfBJ8d6wkVh58QwjWr98IQqXBJLaSBUyYw229WL5x\nBwxb\r\n=tuTp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-915a674-1601948324889_1601948375789_0.8399451037007908","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-915a674-1601948323816":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-915a674-1601948323816","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-915a674-1601948323816","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb97c96bcba1f5038b9880eb0904fcbd39f558f5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-915a674-1601948323816.tgz","fileCount":7,"integrity":"sha512-SDc+wudaOpZXe41u4R0T6pbpOt5iWYCS1YbCnptqjdDILqd3sSvd4xE0QPVxsQaZV3ES4qamnz5an+PmXMl/8Q==","signatures":[{"sig":"MEQCIA44WmbSJ8/GXt9Z/pfOrEVB9IXvOaBqNjQa8q1pC9bhAiBWn8m5BxNn5UNB+YuXt9qH3RvH6MDxT4GzHRQECVsjVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfe8rnCRA9TVsSAnZWagAAn8AQAIIXx2FmD7zGbrepluta\n4RXMPu7BhnvvcqAia+0CXPP0ujr7NzEQ6Ir7Tgs/5R8rCYtTZh2AXBl9j+uI\nrvH1fHju2YZcl70uvMGKZh7Yf2MmHO+9FZmfi1FWpOyE6IzY6vWdfBHZDG71\nM0kWdPc3wrLF8eSazAI/PV+bH12orPerI+baUxj4wxqO5WCSKZ+oR66L8F9b\n9ovRrbMvBJXVnqDjOTJzoey6uQeKSTLTOZ92GodRhVTp/YZNy8QnB/WH3lKx\nebXjo9EnBJdLcWtplVSCnEgbMTrcF2q+zzdVydUeKZT1WjXIWcixvfsYztS3\nqVE/Xdw9Zn7p6fN/uGB73cvUjHVbFrmpYph5iROTXYl049Q68NC7pQ3WcxKF\nLoGm6g9bGrMRv8TZbq60KLMGpEVR3OPXS1NktT2QQoMdzCE03CGp1YiGBXkh\ngHNMgxnyHt6qZHRYqAVgHFLJP57Vx1W49DHzHamf2txKKvv705kRJZ0KB3OA\nrMdWyAuakGvZBvJB0h2Y1SGZkFjhl1qQpGCqFOmPRGotSuKfEBhV33IijnQy\nINb/9k9h3cLcvVoEVDrzGY7Rkb+0BJ/DxDr8npauwuitS8yS9iRD2K8yjuhl\noir0pLsXOnq5DARHnkf5l43T50T/0PieSJVf8ScCLOdxBA/bK65G+0F6I/32\nBSob\r\n=kccC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-915a674-1601948323816_1601948391036_0.028566188410953597","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-8d54663-1602072932516":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-8d54663-1602072932516","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-8d54663-1602072932516","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c77d8a45d11a7fd7cffca8d12bb3a2bd36716faa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-8d54663-1602072932516.tgz","fileCount":7,"integrity":"sha512-eDnBetLck1U5Ms0DfZv0nt65xcpFE6LgmN/bBfujfb5sho6FNs2BXTzIk10bgMgN7IPdv7w51K5sUPp0wcp7+w==","signatures":[{"sig":"MEUCIQCCkSP2bVDJRUh0tHq3J39p9liuoJo6MDm5eYHD0GtkDQIgP/jYJETpWMYUsuPGOh1ipzShhEvrNmJhlyeA1jnFX5s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffbGdCRA9TVsSAnZWagAA4ekP/2S7jFOh9LGS9Q4+Bo3B\nnW6RTds8LQAj5MV2MUciaVMTGV1OLd5T+DdCgoprwdBkZAOITlmFYlBmxkBb\nWccY3OcCcWehkEOmdEHXDJV3Wo4BctunXR3IdOAJwVrVYSUuPl/Vu/2VmDN5\naj2DvtcNcLHdwZUWA4OeX6FYVDz5gNTrzo45HeoQlmtudY6LlIFVuzmRfOsP\n3rQNS21zdYQ8ZHG3K6BzpHPOT/4GDOF7ep6m294LN8Fan0vPqcujfvQDlM3A\nkPoRlI5VmkvIEr5+GS6K2ljrfJNJyKPBjKDOB4sRcg/JxQEUeKW5rVbZQBt1\no9WjHlYmvAngMr9o8KL3hb4tmgYMJf0ltTMj3qQ3yphWK/t4mWhs6KkHXCY/\nYlhgEfkl0derbsfnGDuXe2uh5YkxyMaYyYY0WwaLrrcIe1Lwj0S/FBwASkNB\nk5IG6NfFcxo0M12wycPbAj5rBqJJQX1PjaXCwAm1BK9uzkrnW3exrrk1OHGa\nd6NJg7GOap2zk/+d/sUhniVli5Napmi32KNly9T8dIdKlgU4h1NvYJHD2/8B\ncNP3JqbZBL04YGFPa9W65Ca8wG4Imdz65tGrdgbC5iW49bzDjt0SMiOp801q\nA2sv4cXxccC1bfmtEzZFLJ4a21h4eKyYqk8dhEVv71LH8Jqy+RRG/ueKgHsv\n71h/\r\n=fJ7w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-8d54663-1602072932516_1602072989020_0.45942836489074756","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-8d54663-1602072932537":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-8d54663-1602072932537","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-8d54663-1602072932537","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"252b90dadc8a2a0746cfd53e99aa26d24ba50523","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-8d54663-1602072932537.tgz","fileCount":7,"integrity":"sha512-XmJ8jja4NevMEz88xkzad6n0VtSHkA0FZ+xUnA7IlmS7fFrM2YgQH9o4Xxf7KqdCVqFVuCSf4/Qh1YbP9KJhGw==","signatures":[{"sig":"MEYCIQCZyHo6d2owxkNr7qV6CBZXSJAcCbChiEBOSTlICFDzTAIhAOh7oNDGRAq1yKqkFO33BtNFnt1JcfYBldA2Pp9ndUDf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffbGtCRA9TVsSAnZWagAAkZYP/jT14VNsegqZN0QSG+y0\nHdgloaV09CdYUDc+h23HiHKb899F5F6swI0PQIIyIDE58gFx66LGN08r3mvR\nJefoqRm2qfNTYMBWMwQo8LK0i8qSKPuXTmlikaBR0eEszkkzaCYd8MzBVRPQ\n5n9XixrNFCpWaFet5CXxTZ7muRfN5L8YMcMN1k9zdnCxxC6Cgs6P0ZkKjqwQ\nMU9wx/PsoOdWDbiwvqSRSEIKCxOalQntchnwwqflc3/v3qHfSqZLKHWsOhf2\nJJWrMbg8wrm/x+FPkA8+i8XE0Qsr8wdErsWum9u7D9eSWfQf+5UvdhZWQy9D\nA9F4Uae1rAaz9Se5Pi4gfNqFe5lixz8VQ95qTARatnDeZZUqn4E7CWPlGu2W\nVJd+CqYhYsQFIItHxDUy6Gq3UZwaHAEqAkntixidmTp/BuyygAXD5bBMIn6y\nAmwyLcc4lvzQLkZaTF5xGUZLwiWirqynNLM4WN9SYZ0olxozVx8ERlZua2Zf\nrZYsgQInmXWHgeKwoeu/QUpDZUVZ8LXuId9e2kW9ty6JeHiGGPwsO1WPucx1\ncBq48MCtacLtmFarNRMNMvWhJjmfmT7wdY0BEo5EdfyyQOtwLgk6iENbVsIf\nwvWn+TN6aTZCb7DnMMBm9BUd4QwZMgdV4cD2meSmAcTimFulE1alSAg+cOlH\njb8D\r\n=IGk1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-8d54663-1602072932537_1602073004687_0.771046222714971","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-aa8ac9d-1602073408052":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-aa8ac9d-1602073408052","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-aa8ac9d-1602073408052","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0d4284d3d6f637133ee64b4855980da5406942e3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-aa8ac9d-1602073408052.tgz","fileCount":7,"integrity":"sha512-3Kroh1CN8JkTmqdnENRrBg2udX6OtFLfYxnA9dyzJFiDip/ALaesCkqavLmgqjuiUAnGFIr31wqCEWLIH2MGrA==","signatures":[{"sig":"MEYCIQCZN5qSWmdpHPdmJ+ljz0epaMk8x+Xo93orhPx9saPHhAIhAMGf1MfdWQMfJMoN+3Xkl21ECRvO4GaxdsOqGr3M9SSo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffbN7CRA9TVsSAnZWagAAmzkP/2ksCORS7Fyn1iD5AU/c\nz/sJtcvNvTE+GwMheFYM2qbDOU4555FoLXufao2Q1rxbT/siX3CuF6yaH4A2\n7mvzqOTjqjJitAnlA/yuVQL9cELmFfZYVMkPheboLbcH+WSXS9G91shezOYw\nNE2KPy6G7fQKvgg9y0o7WR4c+h1ZCw/2TuG6HOfsPvFDQpL13ctDRA3l3xW/\n4hMdVrds+GmwN8h3z0qUGOpnhdS3rDhUipUugke/pcIiOnqQL13CW1xsWZ3E\nIIhhuCEfklNgmuZQdCeDkFKNyiaH1AYq96JDskJkNR0cCRTWZ2XvJ0j2Qpdz\nSGPZGksnzv+pCtvpZfwijiokJWu172r005KA/spYG+HgvlHzdWhRtwijiJK7\n/9SdPbgfdkA5smvfUjj0++6p+2VCgSxQfFVlX+WMVUm36QR/TsbAEyq8Xzzn\n8hWTiqCilIfGtgr3j5AqQ8vd6TrlPCA08Il8wDvU0JJ5e2+HCscnFtIG9tq5\nMtAOvo27MfXQvv3EiEqjJNJ7Dyr2Y7/xBGdMh9dSsXIbjP02XA8CmvN/xD/i\nHmhXjNtzVfNaP4e4dFhYOI8g2EVoXutEG7NLCTrZDzUZVEFvCdr2ORFpCfUW\nDsGYzm1fpKUhZ+mdBixiDbGqJ3+EanBhw3yloe4a4QmATpbssumWcK0rCmZy\ncLgt\r\n=kQIX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-aa8ac9d-1602073408052_1602073467273_0.9104734830917629","host":"s3://npm-registry-packages"}},"0.1.1-beta.2-canary-56e9547-1602074706867":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.2-canary-56e9547-1602074706867","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.2-canary-56e9547-1602074706867","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fe96b500eb2ea8d9a06a77064f1f07f7139bf962","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.2-canary-56e9547-1602074706867.tgz","fileCount":7,"integrity":"sha512-60SxPvTkZ8W1d0dXP3vjJMEWlKJXOk0cyVCj+brSdsSW8bD7wt9KS3Z5IqtcfWXfAXQmyUVOMtRQ3TLtKKq8iA==","signatures":[{"sig":"MEYCIQDaPrCsmcvE0LQQu4aq/uhQ2xMY4m/pl1mlMVDk1wv2UQIhAIkkonpdX1bwJuZvzGxAqOxNZR5W6J86zV+6mSbzk/gN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffbiWCRA9TVsSAnZWagAAKw4P/A5wX/eRw++z7wrHMDNh\nK44Sv53uDb/oHc6lPNOGCP9ALXoIiII4L62cmR9KbYbrLkDlkdRK0oROWnAk\nqUzd+Yq2heT9y1p4jYeilpe9L7wjOcdUntf5iXI+w39T03f54hvJJ515eAII\n0Ss1KowufGte3vb7U0A4So/AS6xm6bdTI6qFsGxiO43NLhdnJ8euLpETz1EG\nEAy2ejnghfoa+Q9RrQF+j62Um8laKZYAsOv1+BmKBbIkDE19WM0eD+55asAz\ncZzudo3w6MjcikGdv+vs6TgrFaaTw/RnQudPKf00dVYnt8pYBby0YBLa4pda\nuz+iow33UteL/2Uzo2Gwy6sq0O0aWmr0TSfOXDFHXQDR4O0IaxKAffGg4FNp\nimmYG/m0b5he79h6mTcrxKCLJYirVcfTAQ2/UmAV4DYQ8Wg1v5uTYJmWH2K9\nhl6s5J1U2WpOHz/8QCAA3q3OYC0D/dwxd52RPiVZmDOCCtHXjD7tzioe6Ijv\nQ0UrHPykkQ2Hbm2zkYjWUv6ibfAf32SlgME0L7CXwRprpxEutrrQYzTukcnD\n9HIfLw2E92Hqhgl9Ee4fzVpGXvfyVDI4liVS5/eFprGy10EFt8hHIRqTqUn8\n9q7qMA5Gi7Rh9njaq1B5CGwKU6Xz+q+K9Do/VNzQ6J89ETlZ/7rjhzzwmTag\nqHnw\r\n=rYCC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.2-canary-56e9547-1602074706867_1602074773793_0.9287617366121295","host":"s3://npm-registry-packages"}},"0.1.1-beta.3":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7fa9404e7057c672a1f1a27cf1f596f4b67a4165","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3.tgz","fileCount":7,"integrity":"sha512-HFF9wdadQNo96YSdwoAt/JlxnSKfmmseXi/0qPrtZqYjuK/+W+sla7bhmCIGzMkvZhUHxC/mMnIFo1QQ1+8t3w==","signatures":[{"sig":"MEQCIA81+i4bcH8bVtgTwusnoROk4aQBsEC2e+jdUss5/8W3AiAlfsOFFy3aeulq941oHTFfjqNEKWIz0TFeoijYiCH0GQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffblZCRA9TVsSAnZWagAAm94QAIsrmnC4XDxSpNOOs+Go\nAiOg1d8D13NIhjFaK0Hbx2vOoQhMSSQot0M25kF2cDlmDRsBk6degF/ra2Mf\n2kuDpFMEtweaNOhtuaOsTKNJFdK8OAVyHlJ6w5D+p++qrzqgmxuO4GUKux61\nsC7MEtVobE7ZFpRdWeQLPckqIMQRd5IahrcS9+dSkan69ubOeCcwcyWYRrpz\ntbt7yr2qIeA1utI99H2jKqvGUJJuDRQta2YC132qVSB7St+4D90nW94Fdlng\neFDJ+u3nnSMZEJsTBnvnaAVPfdeL95Ntvgbuv2ypUUPiJKR5/eQzX2N+kRhw\n8ubbOWm8VeDSWMdpu224xOB1t13K/9320XU1blQvxoxOeeSW9nFf51h/y0c7\nb0pIxNXl40Aca873zX4JjQr4SVG+3lRoGzyskF9cd06ljSR/yM548cmlw5ai\nHgfHTtQTaz0UamSjwJub/Y9URURnzq+Ize7/CZU53ni6oAzpkqJBHKuRgtYo\nrsOxDN9TX8DbO8iVAuGBaVH3UnNKgcVdTZbCbdmEn8bjp1+miB4b4oFnLDjX\niJt8rGA4SPcWU4cblTBoMVpfTxUXvVoygIjC0OSbvEcsSpQXgjM5arjJIK5q\nMs9Yq4L8/yljPLKleWitvHMbUOg6pQ9Ptr35Ruu3CGa0HDSyYExT/TonEgID\n2LFo\r\n=C/HC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.0","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3_1602074969456_0.0751893086009181","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-73b6e46-1602085156961":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-73b6e46-1602085156961","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-73b6e46-1602085156961","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1b1bbfae0c61ed3751540c24ab3f3c4f674be0be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-73b6e46-1602085156961.tgz","fileCount":7,"integrity":"sha512-+n2vAK4TlMHrzxbefLrfAK+XkGSVDdvV+O9ETzJWSZbjAm8zo1dOJn6bPn6+4FSPPrFs+LSSKqSipwOKSdoceA==","signatures":[{"sig":"MEQCIBeh5KE5Cpe/exr4yTYmjoIljA4/4FpRSSA6eqi87ZRtAiBRe92FHnKlna5eZvzOcgH3MGDN54hy+OwUXlYE752kGA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffeFhCRA9TVsSAnZWagAA2cEQAIUKgqbPhO4YKGC2cESg\nU0OMfkru+fKn1QpMAx/LrxVxuaPlyCsMEhtSG3aSf7UOpOwWB68Nck1U08qa\ngc/Gg7RTlcbraTNj6Z0bTHL7CXmkwrt1SwfDwtFZwRoHW0S7XfUS/jpRSnsw\nRk1IQX/6BGTh7VamhGSC0KpYlvNCMD+YezE0wAd48yg9aDasn2zFHuwEFM9R\n+1oNYZsZAqOxo9sHMaAuh+oS6dmZbE6ddtK7AITTRiGFUAP3LpYJkRvgvFlA\nPVKstnUYwiPUbb8aHXEFlS5s9VCjqWpte6Sn3INwZkGPtHi4AAlhpCT4rWO7\n8SFFPZFTGcTumKkuXyesw9wl/sKhUGbUsaWb8F9ONLDZoqhTONZatBEwNz1W\npIbg8/k/S119OVgWOZVNArqYRDVP60ikfZ05KtXnokxI6YvyIYrG8EX6j9yD\nIZEjwU2JeubZjlEx/MB9f1Ifs4rUDfSf3yz2FYgNovYpuTO3Y8LnzBi7ef5d\ndRwxuGOHFaSv0w8UHbRjapSWkjrRDbQHE7qus/szsRDia9Mko6u3XcP7WVKp\ni1VIp1A3bX2oGPQ22z3k6PR+4ool52KyalEnaRE073I4bqfbqDudYjUU/1/x\n7hPYejBzYBL5e4Bp3WicEIil/cjvBoUtViStfGS+9Rb5LRh5u1EdM8M0uG7M\nTYxx\r\n=nxmP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-73b6e46-1602085156961_1602085216836_0.5466303982670262","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-73b6e46-1602085156348":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-73b6e46-1602085156348","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-73b6e46-1602085156348","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2f4703bbdc54e781730f3ac83b49d1591637a70d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-73b6e46-1602085156348.tgz","fileCount":7,"integrity":"sha512-wYD1ITsVQaG8NXkno+XhyL6REecUETUEOxxX7p0nrSW8txOOCxNYyjE/UcCr9xPinCf0e85zZ8tXBiGCv6wfXw==","signatures":[{"sig":"MEQCIFpbVN2bxlF9OJL2szP4lsHbrbzP6TkArJ67ZfgqlBjuAiAaUzOxPaDa9ZlcM2s+fOz/0+rqynd0M7vqkeRVfcypLQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffeFvCRA9TVsSAnZWagAAiyUP/21UOLFjUCymt2oCMay0\nKsGAii53VHfURMTG/JE9ff8VL71yBHZ/d6dDo7ifb2k7C3FPMo68NBHBslJj\nKjRjtvK7TU98ZrdA4my+Ibdc1fMoHGK/53TEc4pf7maQfNLJq4diFL4Ga9wC\n0VfMpQ8vn40q9F/OcmZjhFo0nwVwyUi/GBTUS9HYz3e0mkbr4NX9uLnwunP/\nKW0WQUrdYVCutToi29ODNiZNEM19v+hmY//95JkzyazUkFfh8ephmLvxViim\n0WXbjsGiQbSQoHMt/MWvkn5mK7GlR5iyj2dtwUa5bFm0EQiWuddemn8Ti/p/\nJHqQlgdWnpTRkg82gDhM6jmdARlbI8128+H7xLM+GArhGllDgF0GhFwaPYfQ\nolmEeyIx9u4sPaCi170CNDbHSNxYI24sIIDRh0BQYjjlnIyyGQTkLttk8sA0\nz34iP09Id2kIt0fSReC92hcvzHXKghAbkQLwba1hoQXrTVQ1O5U7IFQtFFEb\n9hmbFCH9xpSVnAtZJnkYImhBtsGfNL+8GveykcqE5k0JiYKoqnic4CPsyfjO\nBiA1P1sUV6Xybe4eH/Cf4VFKPyMTWzkkTUY/NvFGSW3hNcBlPuibSuLC7UNo\nCZntHl68r9747CzNyiVQ2zxizSTqQ6nipOoatppTdnPuAq0Cj4IpbbddnTT4\nTSmc\r\n=PvLx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.1","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-73b6e46-1602085156348_1602085231179_0.767449438489695","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-6d96f99-1602101765926":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-6d96f99-1602101765926","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-6d96f99-1602101765926","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"75eea43c15f28998c6d4e2285127bc31d300c1d5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-6d96f99-1602101765926.tgz","fileCount":7,"integrity":"sha512-ymm1C2Lkbffv/HnFolvlFO8ZvR/KI3p4amKYxRNJKbc//MCflCrMy4rol2Pu34YVYRoAiLjLSoP5YgvLAcgVUA==","signatures":[{"sig":"MEYCIQDM5jn79iewwyMjpN5p5rLxyFtw+TKEAdkkuUHGmBhXwAIhAKDnFeIMsOFGUosK1lCuUCVw6AbEuwikSJaWZveCoE2J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffiJFCRA9TVsSAnZWagAAptYQAKJ5IuXCrH0V8XNLnFxo\nlUpqRH7RJMxLheWoUTSUzFWYHwJiXVIp+blZuZGfU63du4d0qAWrre93x9F4\n/l1mq22IxhSSZJqpRpIvEYyfSfQNBIhscF36tBdR0Iiy2qyAERyGzy5b+fPY\nz4k7UUHGrZSsHezQnGLaGQcYVDpi4Yj9Bcg7GO2GDB7q7uk6glQI2gDNkhTm\nx2OtP9HEtjafNkGjp3iLLQ09c7Va+OM2RjJZ1F+0lD+tbQDXXpXgR+qwLRVG\naZ2QBG35sXON55HzLQ6c98+ExqpqoF5Y+TOiRdDpy+Qh/CNcmvT9vT+v9sR7\nps3ija8BOgd6sbSGheBMVOkCmwwZEFnpNPy4d4lkpTH2BNKeLN2f2QHDnALB\nOM5cK8RXG1hD3vlm7BsLc5aYRvr2rSm4FolHzXnEuXkwnG202fKwZDNX2whK\n4y+yYN3eU1SCKciNUjmUumgK+v8j8/WEw+40ux7yUapalTsajaPrD6Iu03ZA\nf8oJlzqnLhVB0X1ToQDjm5c4R65sfKCMzutcnNARSw9j+bwIJ9MxKvRkiHi5\nqtJWRLl2i8Y5ZrrpFMcsX16X03iuoUYpPPSJl9Xh+svVwxHfUWAG4jteSNPC\n+CGnNkfrzY2heobZ1zyHbNg+/xxHYTufpQC8Ei5yYrPSOHVFkFiLI7AzJLr6\nKmds\r\n=UAsH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.2","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-6d96f99-1602101765926_1602101829455_0.6275570836724391","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-6d96f99-1602101769196":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-6d96f99-1602101769196","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-6d96f99-1602101769196","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"23b1446cf7a7f9bd40e285bfb579023653a32dc3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-6d96f99-1602101769196.tgz","fileCount":7,"integrity":"sha512-p030S+iEuHmtylLumQwUp9+454osaXLOCsbKT6owMuvyfiOAs7A57Ja5sTLzSi2c3+zXnGvAQFh8UkBh4xPxFg==","signatures":[{"sig":"MEUCIQCGvV2gH2NmZ34iWmu/8SIdP/EX1J0LG+3ef4ADVp7E9wIgHolRUjBJxChDwum7PN3MogUBSt0hDWgqUuttbQkyQPk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffiJaCRA9TVsSAnZWagAA1oIP/27Dg0a7JfiDEyryEffe\n6ULKzWj18SQLkeZ+/X+4JuGLMqZM85Qcjx4TwIJDuKEmldtha1e2lQb2+2kI\nu1rTuWOfvb2oI35RmEgUiaC0TuP4wxoemirmMjr+hub5hqA6Cosh15BPl9Cn\nf+9fave+ih2IXmtO1hyL71Iyr3s0tjSJufUgnypKYaAefPHm3rFL6iI3m/pH\nQTapNpLJNh8ICanfLf+HVyINn253xbNpNS4QOClljPbhGxwjWYLvN30MaV2r\n1GJtYpoyWOmy9k4fNs3XWt5yKsf54sslYxDRJCYA1dgmXQKupKbW4M/PnJsW\nVkzZ0KVsZK+eGp63mltCpjMrKLSzwOk4HhGj2thz15LTnqMewZxuYH3FZAWF\nDHjQjH3swujE4KOXnEQNwNgPkBjopThsMtGUzGDVxdQ60HBMId/UNcryjzLY\nqdljSLJwmqetFBdmA7ejodFB914p874JCPss2RaI5hQ72WwA/rtO3gIYssIq\nP1pIbcL8DHO2dbp/ctx0UZz+s7lAaMFDXrood0OY3awYkWUG7wMRpETh+/mf\nwc0SicG/Poz+ybx7GJbBAWuw6tkHT1gEJjK5Fx77XUV70hQWLLleoNAbtNtO\n2+qHKaREU+CDKmIPAWZJSN4ZUyTuxU03Ii6yWrvV4wTTkQwxdpL9fsYLgXTE\ny+Pt\r\n=+aUZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.2","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-6d96f99-1602101769196_1602101849545_0.0011017127430890117","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-98208df-1602116174194":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-98208df-1602116174194","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-98208df-1602116174194","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb30e4a9c0ec35d02dfe47b55ae2ba537c4950da","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-98208df-1602116174194.tgz","fileCount":7,"integrity":"sha512-afAwm9fPzg/gxxo/rdhixlgJ03YxKwKaq5dQIkV0XME8N7xKoywYHV8ckdt81OaQxeOJrLzQTZdE6qJZG2pSzA==","signatures":[{"sig":"MEUCIByMJDUqN03jsFkGrzq92us1yjFDEi+CiFwHDMqVq6F8AiEA7w8yvIzEVHfXykwRTeFKFzeeHrLhWEg9RPklPRCuHvM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfflqPCRA9TVsSAnZWagAAyPoP/3vB8J34ZlQEEwnfQFCr\nY25zIYG0IEZQDwSv6TK8Ejg3DBIzYH2SQPjdWfXIjvOTqWj60UOJmoAHVz8W\nhB3rzZwkzcaYBtYCjjhOR1sl0C8wA8cle3g8xvjJiZxxqVgIBXTBH8cVynL9\nK8cvU5bxcW6GnSQ1WfgoMWVUupJ3Qn2n9NL3tD7jN6WS5DuNepwAHww2JtDh\nphdEUFDfJBdfTSlNO/xo3gE3sphxlAzMON4lo50JeJU9t4xkFlyWIkmJEhMo\nISDP7fFEhnb2wkNPmBnuqDwCn4mFbq3JONZoC32zsJeQfKJYJVPjHuTMHi+j\nVhUSFbk0Y7T/87KPzkvDJC8dMCFlNYiVZyBPUjZsbO9hRsZUsHdS8y7yZBCB\nowpP3jUQ62mXUrtwOYDsTce9kKvyXWOvOxXc57oMJ0x8YDGIzoEtDk99BRaS\ncn/BijFig3ItauQCFjmN/ZS7CI55LdVuT3+//ulTisGd+wp+G+A74TAZ919f\n35p7+HarSMTg9ghBzi6YMGu39TFsvuHKR92ATnmt1ARF45K+mO+LlqSv/ck8\n/BG3LtIPbqLUVcext5lckHi2wuqVJ2TAfGPOJpXF69QtZPlj7KD/VODaNfGw\n6okvZH8uFoFu29PA4p+a6yO3WtCD2s+bkW+xd+VgwP8I2QPUYw/6oPdJEanp\nhz7D\r\n=mYsE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.2","eslint":"^7.10.0","rollup":"^2.26.9","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-98208df-1602116174194_1602116238742_0.3290135797901612","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-dd72d9e-1602241818417":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-dd72d9e-1602241818417","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-dd72d9e-1602241818417","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"098ef6c88ff189de2a02a752b056ebe4b72d7fcc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-dd72d9e-1602241818417.tgz","fileCount":7,"integrity":"sha512-qTB+1OBCBkhkU2BiiqaErX6BRWAfzL47e2986LuNrUtINC8mIb34rpnFfLbrJPW3UnsJqfDcLgmWBEW3C3WVRQ==","signatures":[{"sig":"MEYCIQC4Mk2cTlFLrvV/930ZD2lNxfjszqHBL0mVuRkgfR9xogIhAJLFE0+AnFFzZCWKSiv1+MWbd1cCtD2IMeGlIFPi4vGu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgEVWCRA9TVsSAnZWagAAO+sP/i9EL6xe0ipsN5yXp2FQ\nKScTXV3w6RZ1LHndaeeZsymuwvvNAxVHtQeJUZhikG1MJaf58sb1Z/LmdRlB\nbEVQDZqLd7LJdm5sVozPQGLxF7oPVxEnYyIE5dWAzGtHqETrTVIH73gRmwJt\nNjF3zg1aXbhZZ90jlZssK9VTrjpxmJzl4952cqiA6lJgKhPOTSKnJbloDQ2Y\nXRzgzBTqR01aIEiWKJqJ9qTTDRqFICqvyQSL7Xcrk4sZh2xD4ncadVK8z8uX\nw3bWYZZ0cCwOS4b/BUzdyimhZVZEHrGgxLgWkofLEw7dE9sHp6gje/sZs6hC\nrRwseUFZLw4Oy9t7FQLzlEoWd20FLk8b2x6bPrrLw4uiT75pinivvwWHEFz7\nngsYutniD0ZnzvUDWUdpwtPRZqp8PKodH/KCS2BuvvPAFjT6W2RfZ+sYMWI8\nqJMQGoG0lpF39KnerYgDJ6xpSsHgxTnKxHgYoT33ghPvfYs+1ctoSS8aJ7u+\n2NoroxRtWkL38EJg5FQQupLoQTVw4KVOG6Iirn/WYwEknVBxyUV6iSIrl7CL\n1PbEdnUlGipqSFUvxPn13Yd2/F4zKsWTA5FrQP71HHSFWOH5HSCNSyL8YcV8\n856yiI7wcv8D2nVbC2MsHBDYqVmKgkyu5WLp+Wj9uw1/q4E5mkTrLn9KmnEy\n0/xC\r\n=anoF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.2","eslint":"^7.10.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-dd72d9e-1602241818417_1602241877943_0.3907393779827286","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-dd72d9e-1602241814455":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-dd72d9e-1602241814455","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-dd72d9e-1602241814455","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c0750c9667f548fce05306590e87a88f4c180267","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-dd72d9e-1602241814455.tgz","fileCount":7,"integrity":"sha512-wYgY15ZrP3zgMRX9kBmrxGa4340fL9SHnJBmV2qWAFteKQrQrqEU9KY+dBT75cS4J734Ki55wK4sMKU+jojwrw==","signatures":[{"sig":"MEYCIQCCtHIJD0kJjRB33FCWd+RYA68vu3fyxvmZIRMegWsZVwIhALIUunAquboi7FtzCKu6CCK1SXiEP1QAuw+QrM8vD/JZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgEVmCRA9TVsSAnZWagAASNYP/1UdDI0Imp5W4CLeMJ+q\n/Z+hfkJKC9XCPK5pVRAmvg35aeGq598oBEOrzIrS9FUnjnlm5YSOcfuIKtc0\nXwFQDu4kH8sS7BcNyHp+EoqNn+YTO0lyVHl2Cs0Nltg2hXJE53u2W/qJFr8o\nrDIRzGUJ/zSTpJOlCN+J2YFhA/9MJ3q8lcecf+EpL06AwBIoHBwKTCccM4sp\nSRbe0RIu4UpansYnukqbPCZvgUy+kYCO4piSHhtjaGx0R8GbuOGwhDHZNH6u\nGHIWeyK53cqjxNnFDmQzflkHhnh+UaeLnExMF84YXhZXvILgm7Kl38F1x8tC\n619RAAedT0nKruFCsJ+h8azePf2bUpbeJlbZZmVKLCtDX2dBNu/Tx0oI1zvX\nIgiOU/W7dwWC7lNEjpeSsbHankzodRgesXodDj+SuYNcP33T9W+HFj5Ux6C9\nlRfNQR8iL8bqynQTuAnWvxBcs4hbY2ywWDeGZd/Lj1cAxzh+p/D0ClP7ntnj\nVuap6c/BYrL59eBHIY0SYcopPK/Nzn5aFhjoDtWkjAWzxgDZt4qFqjwqMBXg\nX453OErm32zkdPd+UOhq383//Ir6Lt54D0jjJUMydz1D0H9Vw789fH/eQM0k\n8YlbXZRScdg8+OeEEqsh0F9Yyl1tBpVKjF2taFizlYPYq7BESPPZLSEWp7tl\nIRuL\r\n=tWT/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.2","eslint":"^7.10.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-dd72d9e-1602241814455_1602241893734_0.7194057622974912","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-ca49ec3-1602417970933":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-ca49ec3-1602417970933","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-ca49ec3-1602417970933","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7eb797d7571ab3f8c8415bfc69e69691a44ce6a0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-ca49ec3-1602417970933.tgz","fileCount":7,"integrity":"sha512-3KeklKPI2dqkECeCElW16hEsbtx8edXk1hyzRCx42w6D6aIUr8B+d1vpyj+sMF5ArCR8Tk0v/4SIZ1SyCqfFmw==","signatures":[{"sig":"MEYCIQD93XwytkyrFOzTQOEIDuW1ytvGDKyqkbbPJWbVz9LZsQIhAIcrUPNbis9wtmjE+Bic75Cv3w9IWhfLW52AogRivbHi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgvVrCRA9TVsSAnZWagAAGdgQAIoU47lom9UKoOr48PZz\n4H2QSdBwg5PAV7fQaCjZj7YN/Y6FeQBemCsk/TdNREMbfHZJI2cOlWvJOpED\nrn6UFhfl56ff70QDgB1X2xWe0EQqWg7BraeG5Cv3DRLqarpndoObMQl9lq7d\nbrMqq3S5KVh+PJtXBlTT8VZxmaOHZ1o4XQMxHi1X0NfLx1d/tmIQ6CMOtvgi\nC/3mYnQUbGErpTyHwOWsOC3DTOCE0DQGMhadZJq4t0Py1fAc25U56u1C6lKu\n1ZFAbyU75NQmWGXSKZyh469sTLB4pKZuywEDd/VguBmVY531X2h84Z6l09mp\n0VW6O1JlUDEz54mWsKv2lPR+jIwI5A3L8pODAMdXNmSLWgA3BnaEfvXEuzKp\nI+q9HMRMt2S1/oRFTjG7luSHbnYXfVc+2+jWELpjusWGrJOjlCHoysCvA3kz\nr+rAGsbj6b0pyjSNWrX9ht3HE7e6SKuy0CjSyyY5Fs7hG6Mi/u1SzJblg/0p\nbmLPeK6WL84hUSi+/WSEHR0J0Jpg/lxlmUCtEr3mYWogqmgr4vaaO6gt2Z0h\n5IJ8scklXlRnV/n3jz4xxsV5L0dlqogazbMUZna+YD4eYE5Lj9642HGJbq4N\nszDNVOAIlxR8Wv920T/9QC+M7wZ5QYfb5GIb1uQYDGUw1q+FBECAWc2c5Ze6\nilaT\r\n=o3qX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.2","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-ca49ec3-1602417970933_1602418026781_0.13267089867583182","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-ca49ec3-1602417975162":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-ca49ec3-1602417975162","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-ca49ec3-1602417975162","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"96f439ca34ec8007d0a23cef76e2c0ca73a4290a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-ca49ec3-1602417975162.tgz","fileCount":7,"integrity":"sha512-3XVwQtrROmjR8L+OuaKqbVxRZ6X51SV0zpIXNRpSr4+CizeI0gMnhiMoIQQkmO/Xd6aC9ln0MaTes0jCNN+MLw==","signatures":[{"sig":"MEYCIQCWI9WTEusM8w2J24ox9STWDVs8X1zQ2XlFF5GmxMTxnQIhAJ6hxmSsg/aoR9K74JNkgX2qiLx3SpB55sGPL72OvJ3c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgvV8CRA9TVsSAnZWagAANgwP/igy5zKZqoOdzbrZynb/\nS4BqjsrwU08JmUxStui14YKHN6tOoFly113cnLAqwTsCUtyKyh3l1t2H7yzI\nyU0NxfhM15EDUf4I/NSvaPxB/zBddHLXnFIEY3jMBl9Q1MeEt/cRaKYjXngE\nc2hIQNOjr0Dj5z5J8eQRz08ankQ/C65vseTf4FFfpenRaZFG3GOA5Qb+djn4\nBog8E+sNko4B3INhtq4wqWjtwuErH06RMe+OTn46ZOykxaC0xIhfAMP6zCCd\n9NahvoRgvmurS5kxVpmzFGKorz7PFui6/m6JoA+MUupWIXKx+FrMLiC7ARnn\nQ4CfIC+HuakhLNqnAEg/3tqnjhkxJO7Q9Jg3gzg5v5o2dJnueDzBd+qd3UoW\nXkmmwPr1QcgxPjIUGQjAOa7tI8EFdszfgo/UPyvAObBa7dbn7YzXgJX8XLV+\nUWjj7dBFimA5cqVMxGf5nGRa+W+A0rLL1rrx3Ywucu1slQ5qmxW6d4mE3OxF\nN1ny0hOXqDaW2aO2q4G3KCw0Uwn9yxOttHtB9hhINw4qIbaoVYDdhkp4Tkhz\nNaaWIBRuEK0ODYLm7vgeYw4e1ULN3cKJGAFanSgGxJpFeUH7HxK0E3GvUEsn\niwn90fXyA7FVXIDsXAK2qYXz8JICfRCrbbb8t1wnulZFVYCbdVer7/9PTxZt\n4brh\r\n=z/oN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.2","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-ca49ec3-1602417975162_1602418044007_0.5379081466216551","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f1d0e3e-1602424101500":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f1d0e3e-1602424101500","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f1d0e3e-1602424101500","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bb819588d752cb06857991950b3642d11cf42481","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f1d0e3e-1602424101500.tgz","fileCount":7,"integrity":"sha512-x/tvgbPZiENUNQapOAErbbNqCUHknJT85w3sgSm6sFK7A/OzElnBrhi43Tdg/7X+DnbcZdAt8hKBnK+PtYmMzw==","signatures":[{"sig":"MEUCICrXpruRq/4Er7eBp91OtIi1WM4mrk9Yz60mm0a+YcOZAiEAkg84aJR5CSRorQF2pmj/F3Yc3z5ITMwK+DTBG+Vrtg4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgw1fCRA9TVsSAnZWagAAS8cP/j/QCQDo5GDUSgxwoD7Z\nIz1CjxZzYVsLd/YZmwR4BcO6BdpWTN0/wof3POaKSGnBKiOqybz9w/1zRc2D\nxL0inqPtD9IRXztF6iFf698Hi42439zTG6wXOuYEmjdTp51e/oFSb2SAao/b\nqou9n8O0IIryi4W10SJs+BxPAA1gPiB3jKQl81CKXpry6u8JVmHNPqEONl01\nsFaSvuvS7MkVkd3MFyAqL1l2aI6/RKCMvjUTFRfrGcFc6CDmLEBN5IObrqFj\nuT2Hi4CUBBgKSqIS0v4NH7k729lLceaBf4laYbYgA4M1hWWuEVYyFA8FDNpz\nZUdnFrBpjMAap8d4ieO8GM4kp3xHLggYb7ViuYqbzMlswM8Po+3E4A9SGia9\nHczKLXtWFcVUXa1iP2zcRdW8VbJLfoKrKnkbZ/yPOH6Z3J9nyCefWs/P7eHP\nb9vm8MGAWARCi8sYF95k1oxq6f9lCv3eAUliZiAcs648hGRFN0mg+Tt5oBp5\nhqmoBYCDMfj3HSZNc2u1GvhSzh/PnGUtQ43nzueELsS98cc1De2OYX59KP4j\nggvAL+AkfDDGKORb+X3RnNle9pciXr8CkDdpI8PR2e2VLLHp0tbT+qCKA5/h\nryo+z3yemmdlpMaWv4z6a8ZBP70HZZ5Azlk0Kn6TH0XU+TbHkPtPsRH7VrnE\np2Sg\r\n=Y59Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f1d0e3e-1602424101500_1602424158760_0.7971246639874123","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f1d0e3e-1602424105587":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f1d0e3e-1602424105587","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f1d0e3e-1602424105587","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"aead2013bb5f5f940adea5e7816c5225e94142f8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f1d0e3e-1602424105587.tgz","fileCount":7,"integrity":"sha512-0q6QX551n3YK8P5m6PXUQ98Gl6Tpch00bXYVcUAJwqM2kmZZOxS66y0xEOZ2Wk3+Y5fk5woS5ufFLIFwXPMsFw==","signatures":[{"sig":"MEUCIGEEjVJQKvfIg8A8r+uNJPvm9edMkqi0p+toZ6iogoMfAiEAkOJtN91LDG9mgzBCGAzj5JX9kM7FkcblAy4xv02nIfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgw1pCRA9TVsSAnZWagAARDoP/jj0xl87RIsvBNcMqL1V\nuH6LNTLtt77V1JSrtbpx1/qHFeYYB8pOgR5KJLOZJH28aV4vS/oEZwZZFTe5\nC/RUWwPV6Aptpu2Mqxa46wTnIiOmjMh4UA2G0IgRnKi8IcWkWr8WNs+QIqX5\nieZO8+AgceizcwplalqcGBGg5oMaIq45ktU8Y0xWSPAqTFq4jiw4mGH7yhds\ncviqLJAXAJIN+aJ8N27R26zd+ck9q2B4n1WR2B7gxrMLysAeHei6Zvc/Hyjp\n3yJR+PjWFlp8Bb/5E40xCtN6ub19lBEAx1uyFSIQcwzy5SF515642EVwEtZj\nnLq4Rj3ZFz7QUi75bPAgADj6OW6JZkYBXsr6Xgk5Vf27Y1yeUfDahtOX0RPc\nfReYFnBfiOe+65Bm+td/3Gj7q8DwxcrpnKoK7ILuJrvKh+9cjxeVfC3P5++E\noksgV3w46TGQGQSTA30NME906cCZXN6Gc7+SjQvUM3+G+3MSbARYxxMmoVWD\ngzhDNzR8blNwONdIoGRKo61kryR8qjQQ2QikC2xclX35jgGnLw1A6BYzX4KV\nXKJjmsmfv+DgV8zkgXv0+NMmaERODR62QOuznnY3jHiScQM7U+bBTM4ZawEl\nIrPMjMxam48ubrXjvz9kSG9I2NzBrjZrAQtf+U9wr+vTLjmu5UhvbcglL889\nu4AQ\r\n=OJMc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.2","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f1d0e3e-1602424105587_1602424169396_0.9451335069693583","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f0875fa-1602439535491":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f0875fa-1602439535491","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f0875fa-1602439535491","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"501eaab0d01fdb3e7ca23f3ec2fe8beadd5f43be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f0875fa-1602439535491.tgz","fileCount":7,"integrity":"sha512-0lbVeXk+VTbBDFCKh3theRirJrXCmdoHc8tOrjpJIVBYFGlPBbsCgBLok+lGqVAlEf0xhgbBKSF/+nCyoGhybQ==","signatures":[{"sig":"MEYCIQConFJSRevCoUcxuKymqtfReE96TGSZhlJTt/JMfC1V8gIhAJBGm7zlW4Ln3jidqYNqAZkfI9YvBE2IBOv0bDjIWYnX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfg0miCRA9TVsSAnZWagAAS9cP/j/lMSZFIZLvMj+yaCp6\nTFwMyk2qGX0rgEwl5ydGD5d/U8w3M4esuMcipG4RfTgwtZI/DxntfNSvvzvp\nbGNMABLVo9y6AwRA1M7PODI8vMHy7gAVuRUhcx905Nx1Heq5HM+1wYfFtPYn\n1VplEF/VLTjr5GAKhu2rhAKzEenF/hwtkmLNQ3I9sargu3byu+Ztt4FVyStp\n1V1vi5c0GYv6CF0Jap3M/OEH0GOEm/opz2NqjqB4NkOVpfaw/e4MupW4cZQa\nr+lCkT1kRtB7FSxhld2Uu5aVrp9QTKkqLOOFT2UaHTR+Mgo0oI82OD4uWNmI\nwtZs3AJtrphJGMGCfM52CljycTHxyvURWd8voOw1mzklUzBeptAbtUMcZKSR\nHG9BzOkYlvjX5Q3Vn0s9cNAPHiVkpGVt30bS0z0U63a7q4N9mjk8NH2t675J\nmaNZ56GNJFazWA+/gYyjFnFjSIAtuwO4X+anj3E4AEuPB9wJv8oDStUZmK7H\n8wGMya1a9pN2fIodyd3lADEX/uYy0a0DCw1loRIC3GHqip3K14Re+E2fTKVB\nBlM2BSeaPqLmmadbhXd3koWORwWReHAcizQoiyDWx4o7OI24ufnkjl7RCpEK\nPfrRJld6PhZLUs5iK/sE25qX0TyUei9RQmjakyQtdh/gnDTc+icI0asDTKBN\nzoYF\r\n=iiEB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f0875fa-1602439535491_1602439586048_0.43965533865883955","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f0875fa-1602439534490":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f0875fa-1602439534490","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f0875fa-1602439534490","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"da2789f8818c0e568296c9a13c518039f8e06d95","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f0875fa-1602439534490.tgz","fileCount":7,"integrity":"sha512-5EMFQZnZMmQ4CRIRNTGEhvOQW6I+pZ9HYPPrab/NTFfhEn3HSA6qJBgIGwRWyBOIRwCgWF1YwY70Ctk4fpnsOw==","signatures":[{"sig":"MEUCIQCOuDQjA1xPfRQs1Xfuw/a+DprfqlXb3PkJ6gUuN86ZdgIgHy6CVWAD4Gg/3uGHN5KShOrsbVzZ9TNbXv0j2Cw+SKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfg0mrCRA9TVsSAnZWagAABisQAI2AaETHDXa/SXlA719q\n7RLs20pZHKxfG0idNJLkjUkudcYNIdm1mYYzixWF6u+FNqQs7oEaIKO0u4/A\nfkl1me4o+c+yj/qIwjBQJcINzaNwSCvkxKjYexUMGF50tbLTexJ7rrV92S+Q\nTJL4MYrT+q+KBbPwoaDsLGdVl45eA/3oiDSdBtoO5dfx5ocH87CxF8/w/CwG\nq9AsvqAGiIafXZgIA1FtOR+/aZGPFp1KCQzL4k9qEYuJe3heB4VLOv5Oohd+\nPlCRZAki0CAgHrgBPYtAkEd/x4Ya+LMNCC84Lbgl5/33GbMF0UzmZwqcBpGh\nEC6WmKHLS1T7Bcfy5KPrkwr26aAiA5UHGveUieoODaGV7pSFDE3PlDiahZaR\nLAdjFKbr6JY4GjY6/CTnbC//TTbX2P3y252Q/rNe5SAkZsZbFqlPlM5blZIq\ncZM6UcpfLO87CbtUs40FoJyRF2RKMbsJ8P2ZlQ0mx27vkB/JlunuRX+r0ky4\nYyNQ1njuLiMx5oA4RUCQhWbYAY4kyicZhDinNFubuCDALIMjFE1x4W/m2Mch\nYKRpMs8Vu/hc5ygTKm6MSJq8HOm1PgkvpfCR63znjBiMIoG7G7QcHkoiz71l\n/VfXZY9GBORFleUxNeU9h+JvYH1P54QlYslPA3emfDqEQ0lv4cpURFL8kmu+\nmbb2\r\n=ouSF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f0875fa-1602439534490_1602439594909_0.6278708120667125","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-9e36b69-1602572823804":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-9e36b69-1602572823804","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-9e36b69-1602572823804","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"69650d22e9891d57434ad25d2ba01d36e805372b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-9e36b69-1602572823804.tgz","fileCount":7,"integrity":"sha512-NxIzQGD1QXgL3a07+fxYKEL1m7vpCHuatnJDvB5CwTRj7LO5AmxUN9yaP6AkP6JDt4QsDHLrlinAzNeosAQWUw==","signatures":[{"sig":"MEUCIQD08hPg4TRIumZQH4BQslDhB1UP35AOecss/bNjLcmAYgIgDm/Cy2VNmfrbHxuW+r8fSoJAPV4yduh21C5gE9Wnq5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhVJMCRA9TVsSAnZWagAAK6QP/2kN2dLIqMcgQe132oA+\nhK0p3T1Uf0qQxupeO2pHLGZD1rmUvAFqj7tJ7IKafv0mkwNgrTxMgpuezBp4\nPQAiNUf9r9zX6m0khZNLYAwjNXMg9tSQrnGrsqJCnwGgoRwMZyut7Yon5WZw\nseO4iDki981zx+u9w8opvMczktQFFcFqhdb6mnyT49NpvOooU6Q6k6V+w4Mr\n4Taj6XqOup13qAsSgO7kirg7Ml00p9PEnL2MKbNdL6SdQkB8fVV64RC144FA\nYH7BhU41Y/cGPJbqdxLlJ1vRZ4OWpnpUPkmNrRQ7uFPOYFmVC84qyQ5Cvak0\nzosz34Lmd7XDewIUYnqoBWjMTEIb25M35ph3SPrhMQj17AXpOZpWjjE1uRbr\nmDliEhQzPmkaKr/XEBN3BkXTye9QibqMvIh/h0cvFapeoOmnAbvk73A2zG+f\nT6en80mOgB8c+dMmmuUKtuLs/Ver66xEIe5QqNgmaRudG1tdJQe7nbF5l3+K\nPwQVJjhrTXvwS51lemybaED8fa3d1Bnsg6n5DVZFQmghPOiWLdlB9W2koarr\n9smEcqNYGyxFLUDa3oLKQOvLAZQRrnJEamCubS2d20p/E15ppMkSWiht8c4m\nPpAeMtW07X+gel1CfZBzO9l/UkmbA3aO40Arx5tzlKxBxPy+mjQjZW9wD6/D\nkv79\r\n=IsFD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-9e36b69-1602572823804_1602572876375_0.6661079287240981","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-9e36b69-1602572825586":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-9e36b69-1602572825586","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-9e36b69-1602572825586","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"98c621453a8eee9c3d70b4f0c8f12cd4e58d7b5d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-9e36b69-1602572825586.tgz","fileCount":7,"integrity":"sha512-VgMAl53qnpDtbmC6Kssu+qmX1NUoJ619oX7xSxKmsiNBZEyakvbKtbULOyH5fZ/7rXI7qkdqkEQdXUbEx7ooqA==","signatures":[{"sig":"MEUCIQC9qXdyJPzkNXO9cP0QULG75MtPA2r4Oh09k9KuL0ffBAIgeuzz0AIOOyj8ouAwFAhEJdtVYjwgV8lJeEw2T825e8M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhVJfCRA9TVsSAnZWagAAf2gQAKJpKh9Ao8peU/m0HNvz\ne+IBPmIW6LMojKckf24gwv0f9bnjAoLyW9mzXzJtUlrr6kSSsYJ7s3IuhMgv\n/KhDs7Uwy9BEDiU0dQ6llM0AM/sQBnZuoFsHmNa7BWF3BHP2J7L1jH6W/iLY\nUrxjhlTWyJLsENxCILUBFWKWTTtxTn0eXTQE7fFS1L63CdaAXV5q4rVXMXzk\nmCLLQyn/jaR5eMbQ9sW7p0coe5U2YWdpV02tq1PbHIIsWXHO77vpi/wN6eVk\nsn4yG92ZDFpoPdLZyIZ5RJyRt4bbd1aeLwtzQiV1d9yXSUZeyUWJFUZ+EIUG\nhYhB9sbHWkss22RFNPSpKtF5Jwr9aN1MlqDE7Gx1r5PTmiIGvbrA2PoHNfji\nrmUsGu6EPbz5lS5MspbEpqOzsTxTflRgvBHcxMXMZX3BktRvaC8l1cafAF7o\nJn4L1IUCoymoOhXJqhFq3XIDdep3U3TL+2LOID+u0lRvtyagNrRQ9J1oAsev\n9gWRCqF69h273dbYsQk9Xl35pvuRdOtPQml/hVhbfJ7yQ4lsZCR75+gCsCcd\nuZ4dSC/KV1YqR42z9yqCpDdvWzD+bYxf0F3dVWZq/WM1dBUeLxuhj+SSpsci\nvsorXvMzDgGvqnKON2jkmxZuJQfqOAD41ekYh4ZOKyQ2BpvI09w1X5XPpsM8\nczQ/\r\n=QEgT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.29.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-9e36b69-1602572825586_1602572894732_0.12103771199223567","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-a9ee258-1602694618057":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-a9ee258-1602694618057","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-a9ee258-1602694618057","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"04467b1bc72df8da806b0ade6ea2c5cec97eaf91","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-a9ee258-1602694618057.tgz","fileCount":7,"integrity":"sha512-BAzuasIog4yUVLbwDA14aAe9VJqhuJYJXnwG9b4ptznd84Pd8bZOXHUZSrZwgMf2njtgAKNl6+zifInWfR8xQg==","signatures":[{"sig":"MEUCICtKq5P2Ccl5MCil0hZAju150d0UOAehS/xVKmYAwwqoAiEAp+b5dIb5xTz7qmyFeWA50h3qugHL2+aamUCt9MttNSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhy4OCRA9TVsSAnZWagAADCUP/1otJh46UHn5DoB0gfoX\nXkK89TpMrFSSq4gJtpumJ8ZFNd8hW7UX5ruhmjV9pb/JecDn+ip95vbJqKi8\nBB8ZAhgOT4/8Cyfd4qtekQWcKURN1ND1U/9Br6LNGlI7/5IwOrHPbilw7Fl7\n2qxRw9uBENE4x2u5bbVeXnfQb8TU9ZmKQq7FKkZskAhUnz+E086VXstk4xzr\nB48NQYpUnPM3sdsR/rhgYbVbB6F4JYroqi4mKLta2yArR5iQGVqzMCljCuSS\n5vsCKZYApjikhN+z1PeGkhbsmnM21uo4s8d8YMbbr5HttkI5R0tn0bpNGCAj\ntf8f2qWaR7Rv1H+HE2Q/3JWp49LbZk9JSJ6dHU3qMjUytx/KArMuHFHbgS9j\nH4TGoFM4AEf2CPYnt/tJUisHq+N7fZuNqQCObiF03bXu0MO7OTInR21soHvU\nF7lmjV2xSZT1n8WFdNrYIp/d+PVHJfaXI3wmMVM1thoJDeoX2L/y7IMP3RHo\nap/XoKMhWRw9vBgn9ERFCh2myi7rctnpXLgQuMyZBg4X4CmL4lX+uwgj0VC+\nfgunLcqKMvS6PyPbQqelR3hNezvNl5cfThwrwehhqFogra4pC/33ZbfWVu7H\n4TtO8GFPC2+GTaJwnBBsuvwnlWsUn+RGmiFX3LRhiDOfchnekqV4A7gRE+GP\nrpeO\r\n=tNpH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-a9ee258-1602694618057_1602694670092_0.9477405176724756","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-a9ee258-1602694618957":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-a9ee258-1602694618957","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-a9ee258-1602694618957","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b285de0a006ca012268526f52468c9d12fce43e7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-a9ee258-1602694618957.tgz","fileCount":7,"integrity":"sha512-kyXoOmwEROzpROUgOwqzFymU1kvScQ5np+CNt3ZSLZJUrsUqnfVNbmluqE/f/RgX8JZEEy7ScQ6PHai14G0wLA==","signatures":[{"sig":"MEUCIQDF3rMwI50p0FmuSLPXu1FvZgMM9coV4u5xYyDh5MgXTAIgCYaYhyuKCIH1lEqTWKyilbEUvmGAo3WcwCFDlH/iquw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhy4eCRA9TVsSAnZWagAA0/IP/jRLjHkBeLvO0gAM4+3u\nMhTrSXLHQ3w5s7PCns5eMA1silozdqH23W/+VyTSlpqDU8LczRgE7eQMEbLE\nEkM4jry03lG6kWsh61xlmgyPFIWzr9WfPfVcaY1AQTLgI/eKjwmx6P/jyPq0\nZYmhQX7HwTxxFCr29kB2Hovz0BqQR2dLOhAbaC7XIuu1MbOre61XqRwpJW5n\n+c0KayIYfCPZCR3fD1xCMyKSrBFJn5h2oalRPRPRtX/zOhqzLHwTe94Xb20Y\n2pKcZCJ3C+SFjoiAuzmCUSpDjMzYwjwbinAMuUz/XD/KWS07sUZ2+RzcdOWl\nvl7nTjCXixmMvOjnYnyo6W/QH0+AzPTZdkb6ugdBzLYjKKYfu4ZtfuWmilcE\nYJ3tybbH3mMIKbzomN0Oduv9pANmjcz4nAJRAuDJUvWLVPZk4UN5QCDHLIVN\nBcuwWwNUouZdpTlv4hC4z2wv9F8krWimkpbge+cdhMK2tTyYPca11SI7dCoQ\nic4uT8ZwJr6+6y8xx7YK9o4R5MJX9UmuJSuoMTACGWkoqmOySgZMcZBgIl9m\nZEuvB3+bf5DhiCjV5EZ/OWG+0nKMCbxmN5FiJHt+lLItJoW3fo8l0XeGsljj\n/pMOVCVSrpIOi1RGGroO7gPlT6Z0b4McJ7NfeblEeaE3TZdRrkFCMWhjDg2A\nL4rp\r\n=kY5P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-a9ee258-1602694618957_1602694686081_0.7677546982847576","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-3eae580-1602713709909":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-3eae580-1602713709909","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-3eae580-1602713709909","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0d41473f4daa894e543b9e7e7c682120c8098083","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-3eae580-1602713709909.tgz","fileCount":7,"integrity":"sha512-8qeR+fOMobNjbazw7OmAVq2TXPVq7cb4hrBDLBEVdLgSwbNBGKgBCo+wOzhogolgiZOC6yyHk/I2HuJoVM/nhQ==","signatures":[{"sig":"MEYCIQDEvf5S+X9kMp4ZZfe2w3bRFw75EplUfvd4AQR/Y/7t8QIhAKNQfk9w7UFpiyeyaqrFkseqcA7Bj5eidWCSr/24h8MQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfh3icCRA9TVsSAnZWagAApbkQAJ0xsUoMYyghCyLbKDm3\nfaF/maeNm7lSmM7wJhi3mLHnaH4LLXqo3FA5hN8oGSIwfolz0zEuZubbGt6V\nw+g9wzWkj3thBkFx0jyfLYhQJ77Ap8hEK+z38HsILXU2yfO1zRr8x2LLdv11\n4Wf+XG+yHpoGTxRUABw34piHbtFQ4ojNWo3Oh39lG2OhaLbWeWro8cvh9ID2\nsHBdmY27G7zoV3djlsKLFCIeZ26PdH4TkpbBLuv5wXb6i736vc6vpx6InV0t\n+DOhJfIe8gXQL8hOj8v8ysydZ1nmj7G1vYRzyV0AI2eQPJfe/xx3UACmIsHv\nlbEtTjOXCawjl1GiK7Ok7FHHZcTKwvH0LaBZu0GmH0fngZBnl4aLVynjwxAQ\noOlNmGhoD0uUMu5p5XP0ghEQB8WvrhcQNtmB6N5Ys2xDorxMCt+68Ig5zIgm\nHVTYUjSrSrGkCwKQer8j2Dn0HH7XPB0BIPgzhKMh1EoLrKjbHDUPPCcLrr+d\nqFl6grC9y15ig6qK498k9NTm9dgalx9wqBctwZFqRZv5a8ZCF47H4EZRGRrp\nfvXnZyaQ0asQFryeKwdL0w66WZkZurTeFs6SBRFxbfCMNkEWztDCr9QunymQ\nkaHAyMio1TLBdxV2EkNm+bjyW9MTP9rjgLgRK2QMgks7ZxsAC77ytYOb1i0H\n9Oe3\r\n=IQlk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-3eae580-1602713709909_1602713756300_0.8932449732123251","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-78cd9e1-1602797373398":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-78cd9e1-1602797373398","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-78cd9e1-1602797373398","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dd07a95804bc7eee021cc3c65de37d40eefdb158","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-78cd9e1-1602797373398.tgz","fileCount":7,"integrity":"sha512-Oc+9CcI9yn/AINvAXQqXifgcE0ZJdBMA7pLP/KOhyakDaIVEMCADq9+ZxnwHd4xpNAGiW9n/Ki8qoUCPNbx3bQ==","signatures":[{"sig":"MEQCIDks1MCqkZqSnkLQ+DBFZcLY0svgbGiAriISnCwi4IZpAiBToyDXmjMG5I+ms3HVVrckMS7M6L+i1b9sBf6Lrj5QOA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiL98CRA9TVsSAnZWagAALRAP/1oABRiElF0qyAtpbe4O\nGAFtteW4QaT2l99jZgpFW+jEanUArgAsrRyWUlkX0IWOMfPndlMkvX4Mbzai\nlx1bC8oirWkOOmJqsDtEvqkzGwjITgJvQal9xF200zejSk8MoZWnFky4enz3\n+kXonx/Z70428gDJF2Kiyf57NjspqQaU7xOUUphwYjW+kYgOAG1ttwE8ILfZ\nX4gR4YjpjjCS6E3ic/436KuaGi15LTJ11FAMqmZpQ2AJpC6A1Pq+1krHMeTI\n6gnYSdu9UNk13ea3XcBoGgcrpv4zlP86C3ylbUJb+WG/tFEbctkza6KiSKBo\npyr9sYFJdN2g3+IsdFuBWWPYzsG0WVz6fANZRz0tqAvS3NZqQ5aGBWG2PCz6\nM70VXLr5LiilC8GRlQLWFIRdtVcvGNhfFaZayQ+6LpFJfr+HNXclhB6rEzfr\n+k9b6CK+nS2FgkBLDE13GedMSaFR34kT/zMdd6Yk8awab66pUs+hY/rFSFuP\ndqhMMxTAs2F2fhGgxAuP6t5V8/4ZkjTzlbWOaqflN2paSe09zMf+bA24Kyn5\n0dKwb0W0CuBDavlj7hQIwWJ4Ce0rS1sjC8cCQErkYpoRgr4u/GYyBSBQLvFe\nsrhLF/9tRkY402IWb0w3fcqDe5FtmlLXF5pzmYBpYDAVkGhy83iglUJ7ilRl\nG2q7\r\n=LivI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-78cd9e1-1602797373398_1602797436294_0.024322979397808142","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-78cd9e1-1602797374727":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-78cd9e1-1602797374727","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-78cd9e1-1602797374727","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8e07b811ed889f765e75a97658e592cd92c18ec3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-78cd9e1-1602797374727.tgz","fileCount":7,"integrity":"sha512-kY8sl973guMORLg/wRLXsplc3U4fl5lEFimpqu5D2A1yrPd/YDQ2lUegG/9LEQ9ob5pQyYfsraFCs38p5wxtGw==","signatures":[{"sig":"MEQCIDzQkyb9BhEVu96593t9H+9Oqx/p6qdv8dLmaZN0i9d3AiAD+PjYg9q7fAtiCHFNUovKcqu8shujeY5E415468NHGA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiL+BCRA9TVsSAnZWagAAcXgP/3G2Ti+HiwOL8lWz4AIC\nv7RRieakaSJEglP8rS3wmeLsFBAtyHDgLPf03jCyFws92rnuizXsB2hw1DbA\n367z6q2ILq20ckUQUThxd/+Eg0ANEC0MP1WScvq56NxBRA76DSbWhqAYd7bw\nxXIB7qZF8+8kC7aLVlLeC8UkWMIN17DfwEaEfM8g3RkMnf2oefgSSzHxFNFg\nI6QuV+GGjJF46OLRqA8lyBCNRZl9+cCEy7wpQn8ZCuxf9sjoitEWf8VGcyXD\nJ/MDbb8hd6Mlcv7qDrGLs4PKQH/+Yl7hNVMo9aWUa3Siye/ZaTqtPyTr3Kjc\nq4VQIK3cHPTpzQvaJlq+EXYFCdV2avb0PzTuQigO92gpBk3WjTUebSq7gCr+\nMAhI5zbaMQSMMigCciCKiCfLDiLB4MwKAKYyDPswBZ+EKj9llNRN7GtgP83F\nrEpg8sZaV2+iGn1FKjnbA74xruN+FokRnM/lqdgvA/41bNWOIbv1aODc6GPC\nflc2HUxSYAQdUB7KkO0fj/bMFUR6njfVkHy+4XwCEZqA6S3pPZF7R5+y5paP\nj/CLEHGLEUTZa+pe5NbBVeMRkRmkhtftJ0vwmqumYX0a6Ohe8kBz2qCbgAKN\nnHBASTuJnHq11uUdcAbt5a/VKIf2phr3m0EIT1Aa8OOu0/I6wH8PhL0UXNQm\nnSiC\r\n=9EqM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.0.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-78cd9e1-1602797374727_1602797441468_0.2438745658160637","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1f22ad0-1602798006274":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1f22ad0-1602798006274","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1f22ad0-1602798006274","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a79a478a874be61a681564d8e48ed7f054aa3b91","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1f22ad0-1602798006274.tgz","fileCount":7,"integrity":"sha512-mozh+x/hZ+HDBQGEI/0ACh5P8pbDWWNDXg7ZE/WGuYmlwe1cE+en2R2mzdbdsRdnAqN9YATFa45nlRcBTXVNbw==","signatures":[{"sig":"MEUCIA9r3h/ShUK8LevCFWyM8ndC37ZE/57IEnCKV4sfSPB9AiEApP0lpk5AiDm7ukv+D3WKTqEk0LvQsoS6ZrHK6MyqdWw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiMHqCRA9TVsSAnZWagAAXpIP/jtUWCCokrjT9itdSzEh\nWCKTUhEkzA6fg2A95RBrQ3evNlZS8CF5y+s/YLGKJsjI+NBaBNIguBgcLTqD\nkPUQLSQm68I4Ywgk0pmQV6NMmKRU3aZjBYqRXZmbowhp951hpZg/MvKcuHxs\nVrHO1s4QV2Eekof55GckFgvAa4/6R5SNaQlIjbKUHU+Mg/Peh0oK+Ls1rn97\n5mgW/L4nXOyO533EDaSyRBT0Ebg+eh7tKnjIy90CQXh/Wie5XtEQGtRX8t0q\ngZIJzcWlDU7GRoeCcruNcXU5iwurr9nJX3rT7r4ObP5y8ZiUbhcrNGOLSAUN\ncVmOfZR7pi8LDG4V0QP8QEEUOpP2dgK5/metgXtjRPOmNmJrnRHvjoZ77gKp\n55k5X9xrRSRk8esw1YuK22NGxm9N8gEVOkNJlpprF655Kl/1NnA/wc00XiSl\ntJWbbicP6PvAONQOy3rXncSpiulkUFV6DB+5AZap2SWtNxIgERC2gqoPUxsp\nLPVtpHmKeLZ1FrAzdQ7A748kacf3EgekN+zL38KZ0vuui7SKA9wiZ/7Qg6mw\ncanlkFOqKxAi8c9YvCknswYhfm/GL4i9Iwc0FSF+YA48nlDx/rUUUGKBYdQj\njSTzfUKBYQlwF2U3wW2njHCLmvk65x/9fmb56f3FOsqB2Zy6SY7pZPeNUhRm\n9dTg\r\n=wQ7E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1f22ad0-1602798006274_1602798058064_0.6918404405167671","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1f22ad0-1602798007027":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1f22ad0-1602798007027","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1f22ad0-1602798007027","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9bf91eba126d709b0ef102d3ef73cb2c4ee4c4ea","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1f22ad0-1602798007027.tgz","fileCount":7,"integrity":"sha512-Htje/FwmB9ZoZ56nC9ltlJy5+h19sSYnCBDjtM5gkjxawSsZU4qLU25dvxhQbr/qne5V2ddZj8Os8Ssq6+MxYg==","signatures":[{"sig":"MEUCIQCms/aWHksLLEQXmH1oqAyMTqPXIQkupqYDeea+EuTwtQIgYDXYPCSj36HVOXkeeSkg97zHQPvgd6zehJTkP2d615M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiMHyCRA9TVsSAnZWagAADyEP/jtLAmJs303Ecgk9k61A\nkA16ddR6mGSQ0nK1txK7iHQNnytqZ75a6bV4FNsOufp7BQRO33XUZX5TFWaU\nFl5kygollwTkpBp1NZn/1YMV2jfoUZ7ehnOlb81xJAzxZXRGparcSnSSMKbt\nxHsv67xKnrif2toXxu6upifwcJNVlugX6lR+0i/PgiUcAHzoj/ZMRus7VYko\nwtFHb8iUS+Tx//EnQ3BB+hi/XGuJyjyhcvz9lwiMFHD3r5CdZZHySzB7Pnyo\nT1tr+2MrrWr9j8/23G21leqyW6RRqcFcf2CX5dg2o1yIieayDByKL+mUODd2\nxXiQjh/I2JVJVz2WqQ1sHzpxuZbd0/gS26iXdNbyps0+il62ug41ed3A/KhK\n/8/tFWWNY+SBlCUVeFXzfXQSSQijYMgSvHcqab1VYee87Y0zIXrrEorWEuXf\nMhRz9KS9ye+tnVtoX99EwMbIU2x4waCwc+vlr8PN6d7HytIhrlMvmUzPVL1V\nHi3UcKW8sWx2pd2jJR3AJLuEBQRaZ0vaE6bCAaIYxY47QhsvP9xV1hiVYOeG\nb280c8hdGdj1YmPFTV6sYXtjPHDV/YqPdgt+Le5icP5k3n6fM1RTaJBBsTVS\nDHcNB61I2CDfNYyT+ZRZqpFMK5zzyPAMQu+GqFG3xF/awjustWtGRh/tC02D\nRPOZ\r\n=cAQ6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.13.1","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.13.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1f22ad0-1602798007027_1602798066368_0.12055153768105575","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-4d8d840-1602813797186":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-4d8d840-1602813797186","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-4d8d840-1602813797186","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b8094f63f1563fd746ea2c5811d33faed4ecee27","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-4d8d840-1602813797186.tgz","fileCount":7,"integrity":"sha512-yzrwOvi1gkPGyZujwP+8sclgMzw5/FYriBb/jQCAejzNoPUn8fSXJ8O132hBF1OaI+25SvCanuZNFyrdg7dT0w==","signatures":[{"sig":"MEUCID3XtB0rcw6EGW8pioc1XfnMazBM7Adi2DXsUrAKH1wCAiEAxGSys5KLrwL+bmRoh6k1fdUF28llKU+1MxhOS/x0pQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiP+VCRA9TVsSAnZWagAAbXQQAJk4yxBJbu5hv9EU6/Jh\nQ5dltEUsqOjIOrP+fl5PT/GeM0zPfJFbePH9itlaetvFevIZEYHu9vII+Gj/\nrCLob7++EcN7nSMK5aHQ4/WAfTWYiKsr/ruP04pqYPIGieNtXFief+G1uAfR\n3kZJHxaxHTDvKUZLykbqoKT4u3yAiXkbMAcjtfnqdf/QUhYG7KAtfDO0qIMt\nwCn5C9xKxYyuxGJaSbvWnzciXSl9f8k1BKMjPAZBFXI9PZHY/iUM98sWa/1d\nuD9cnYucocFQ/cAmLdRUgzOBhWF90gZR/WeoG/6Hh2+tjlgkUDmp/YzUFvdg\ntABIJZaxRWzooYrDh143yvjlpzrb5Wqiy1Ds+OptHeceBm8hK+HEsomRGWiM\nbTByfeG04yQePLyQKvWNX6gavMASjPyYcrXW5lkuCb/49dFdDAFU8ZWYs28W\nnANjd0ipY9M7MXwsc6/RFRYd57eYyAHJC7uosoQFlAnidlPmy+EodQ/f6MOV\njBgaD2QjtYBLM0JVYMec0AZGLBpRGHtaVfYsiynjVel28BXQ4cUve++UCl/I\nZ2FmMxpG1YBIvksTlNmRoXh0qwNXvVpLmfmhB/0TTywOsaRPRkxYKat8V/ZI\njzfk+pjONv+y/iiPUp/T3C5QoYXtTvjW0Ud2vjthVnPmPGlYmNvM/3fGhYhr\nHxxI\r\n=f2Cg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-4d8d840-1602813797186_1602813844583_0.8544106530774869","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-4d8d840-1602813800435":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-4d8d840-1602813800435","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-4d8d840-1602813800435","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"16e93f27779060535cb9406d7c3c247ff4ca5965","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-4d8d840-1602813800435.tgz","fileCount":7,"integrity":"sha512-0FoDbx02sRklHYIqUF9lY1v0WUs3eYUb4YddpAttkR/vjvOL9PklIkL4Z9iVxhwc3IO++Bf5CzqIsq6vPqijqg==","signatures":[{"sig":"MEQCIFBRMLp8M5Y4HF9mToEo2sViUCfyJhduepYqvCh6v0wmAiBsnrv9cezS30Fqx7i8iqKpkf0k4Z6JQrLkrb6JLaDYYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24461,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiP+hCRA9TVsSAnZWagAA2PkP/jyg36tlhMs3UZLbykp3\nVujzRXeX8kRn7jfmRtV/smVdxc7kFJCbKJDAlgOm+id4iexb+hhCDF/X10HH\nEt4ckXM9E4KRPvjXtN66gJNt4jSw7KSo4TDGIsPxIRAGmwKCcpIvfSCydFDz\niIo3mbaPjtcXs6o53URraXXkjTHPFekN/7eyBxQ4m9v5TVzBDDKInZP+oG23\ndYj4otEeFJJJa97b55GyqOSOGRgwliguckSDPS0LzOj5pTohbr+4nB3Rg56X\nKXBzoe8ODxTHZB8tVNKGboELzM+KXNNCHfXzezx+vdOW2Pzn8an9iS5wR54M\n/LIuAsl9uw2jjKBt2mln2ItkuqGKxeINUe/PKlc9kxFegwJBV2O3Gmp+5c3s\nZ6gVCYvnHOLSUpJanxJTGiVcrzlBKW8iGDAvhZvPd1yuN+WNFIAVat/EIqDZ\nXZBiDDzU4uIP7Ggw070WMxCWIwtsqG2T8GVClez2ikjvRm/VR9KdfAlGHJO7\nPEEeeArQXXwNZLSvykVFD6t9DcuU9aAJVdVcDgAcVcUTWZ45yv6pwjkzOzQc\nqg6P/fMESVZgwXOpLgsqPsMKJtzN2DG91A1ilgpchI29sVqJT1ognZ3SXj9A\n6CFD6O9nZyQPKF+1b3I2U8TnejNSptYFfcsShDrfrj34Do4cK2P6KY5wQFXd\ng0Bv\r\n=Gsnu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.0.0","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-4d8d840-1602813800435_1602813856673_0.1651427356977997","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-8b79721-1602829845850":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-8b79721-1602829845850","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-8b79721-1602829845850","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"692dfc9555e24841091191ed53ef6a848a56f5a1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-8b79721-1602829845850.tgz","fileCount":7,"integrity":"sha512-lY1fU8viPUJ0VhNXHBQG3zKFbcgk5nRvbbUHa45tnRllzSPc9WIo6Yt73ilzoTKd0sJxAqN8AUvlICgHxnJxgw==","signatures":[{"sig":"MEQCIG56WhlLDGceqlMuEB9+UaimXHI6WyWYg1BwWhgsrFYvAiAkqSfaP+GIUFH6mi3AjJCZXy1Tql3WTbGy7WKCEKMe/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiT5NCRA9TVsSAnZWagAA/msQAI0NiSiiDo8yPmIKsN5q\nkVS9zSJxYOEGNgtSktqunSd1ghnqZIosDBrw68WWD4e6J5jnZWZ0Te2fpuKX\n/OuPzQhY5kSdCBw3HI6J71kYJwIBqGb6xybhd3jKda7JzIQpaBV6kLxpETSf\nm+qLolgYkzEgfTMxpzs+z87edZhIwOFAD5C+BD5H7giG7U6DCz/lyS1u/2Gf\neuTo+1GR1cDkaY7O7FGPwDpTG6wcctzXCfYjIpNi0FEPG4Lg/F2qXOkmU9J9\n4wpyjiBWKp6PLGVwm2GczRjKtmaDlFxwJoRtep6/fCkjZWQuGNIumGy/EeMI\nZWkA11eB0rieqIqtJws+da6+JWu5hN8xZZMx0oQYo2VmYWxEi66VXTMe7mRT\neb/ZIB2n0V1+XtrvNVQi4OVwM3O8IunAwi+bO4HLVYjI+O6ytgdMUFr7uAM2\nEtLUz+U9NVqqj1/Ph7KsidKLelLBBSH0khY6DNEnH48Df3LXBkLorW/HBGZg\nkueIG/8JF1w3SKEIr4+wE62GedvnhMoo64iZDaDGJN4q++8k8/bZCKf4yIge\nV85ENYxReuqjU+Nc6WcFVahI/oZWUbsuyJY//hTEvkwdmtv44hI6UPyGrGoR\nANxeD/8DkaWF4jnG8J8xH4laJXPIs0nFcJ3nXKxMpJfZNGXjsqoxhiOIhwSg\nqDh7\r\n=YdTp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-8b79721-1602829845850_1602829901088_0.34883379644027523","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-07463af-1602919018085":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-07463af-1602919018085","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-07463af-1602919018085","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4e714f717cab3a56a6022974f13ecbc93734d823","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-07463af-1602919018085.tgz","fileCount":7,"integrity":"sha512-fgVAMcNxR9P38krRuvYcWKgr9blnYlyteagZkdNN+q9YDXALKBe2MdV3GD9ZvEKWV+Uz2doIZL859WIgX2H5bw==","signatures":[{"sig":"MEUCIQD0mP2aQb0dl2eTRMlMAGZGhH2qDmBOJQZkdzlthYhVSwIgQUZMJgaSEiitmBSodkBGYFXsX4zin8Hb87jYJS4BBRY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfipqeCRA9TVsSAnZWagAAW0QP/0Ft66utrCgDz9taJWo5\nugwYn2jNeCVGW5VB3abHiFvtjqoL/vj8IC4mZbSGPK61CZ6N6Kb4/lF7NHrN\nYEqUT3ZV/cmKmF/kBtsCDgoU79C/Y0YwP8xMADxdsrcr7bxSuzvaVV71lo52\nrOVC6/EcvLlo5WfSNH16HA9k36ZfYc/MUDW1cu6mkk9LOsTmpeQFW7k0Og2q\n/V1z0eE70ffbdsWnXaDAy2BhojYciYNraEzUzbJD/i4tyDUvxVSvpBIYclls\nfdY0fD5MYFDjjyydhRsbJJTlE/CqhbVMOTb93KTS+euZWuiOkLIj+T5v7Bci\n9TwYh9n4BJyyr+0Xc+cjW52r5tv+3MVYoV1NdlXeWPaegn8SQQWDYutipFyH\nzPSWf453yveWm7XxxWr3umlyxjbe/hcko9WVjld0RFPmgEnY6/+A1a4EqVlV\nKxfgbnnN+4bAHKKHKfXkt520EmTYfkYEkGSebEo1IU5Pp8afGTnGUGwAvJna\no6tQpTr1sxCPA51tfTju4VcPUEtehlOs/FqW9WAzMOqkqHbjanypcT5lWP2V\n9h/+Wd2lZ5wJlgSciaKLUb6SfWaV+f7pUNzZz6ybfwmtqnLHhoU72O5r2XM9\nHzY9RkZtgvskYUg9FJ9gxN79N0ZBuw7Ut/ngok3ZFM9Qkn1sHB+wEoX6jtiv\nea5z\r\n=56KG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-07463af-1602919018085_1602919069778_0.7566104702723584","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-07463af-1602919016614":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-07463af-1602919016614","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-07463af-1602919016614","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"99890d95d5dedab2a4ea9912e7588bcd2c8ae438","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-07463af-1602919016614.tgz","fileCount":7,"integrity":"sha512-4wBq47qmbDpCoTI/uFbrrf1XFefg6rI2t7SktC/DB89eCgTz1/CJe0cF1LjMejt9Ttho8TIqc+t8VWykqWE6fw==","signatures":[{"sig":"MEQCIGGQumBscUK7cjx/92dAytPGdIz4tYa84YC70jRCZ/S9AiAqtHWN6xthsKjA9C8W8Jvc3gOOqitb68OambhM0PmEyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfipqlCRA9TVsSAnZWagAAUgQQAJHtyi+SJDb/Ip1xjNrh\nWs6gF+0Ni4hUHDm1BlqChzqA7Mt5+/2e5i0Ig0/ZtGyznIYK0w96ZQ7aFIvZ\nQxI4LhfLT0Zmdjgy7mJJl/0Xz2umcuNHXIJ+j7JffqCOBBJXNFdQ5nmmUd/H\nSrslcbzaC6jm94WoF7B8n8LIwrDhmZWTl6pDvBU2/teI9Y+QzgjaZ2a3dDnP\nT+0XF3J739GaRd83HmaidOphdLdDlaXUbtnthP9p4P69R91kp0K22h9DFc8m\n6+etiC/nrQcrVKcj4UsxB+B5+HDBV04nQmHwCy4oy1n3R4rPdPm1sE/PFxIz\nZDOD0i7gmkzovasHuqrdE7CxB20wHtC5igHsoLXJB2ZVZQQ8LbwY2VMvicbA\n5tndHZHzqeCORJL1ftP/Kn9j7gK7SuppZa7m00j1op3kOzEqTDBqmBEspX5z\nqtgkG/mZuLL3osQwFB/HUKs6CCmLeVPqsdV9fXUz4tLKqtQCl90M3unpfhR5\nwHpDwolAWoRBcPHYszGMhsJIn08XG5U8K1VdAIhQbVsXGbnfp9/81fpn4xPG\nyyqYpKSS50sov+JTUs+TUJkJ3CDvJoacllDE5RKCNue/CHD5jk/jIymygrsJ\nmYlSHB5gd3jOjhhY3oeuJvnYwCEi/gbi6B8dBoGwqPZ0pemgAknEnZTLRmWv\n0UNi\r\n=91YN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-07463af-1602919016614_1602919076868_0.07547907145090749","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-7d155d4-1603034415391":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-7d155d4-1603034415391","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-7d155d4-1603034415391","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e68cc2608779835e3d3918b61044a8ecf683456a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-7d155d4-1603034415391.tgz","fileCount":7,"integrity":"sha512-59NH4ecnEO+RAUczS4QEzEwCx59lsnnHnF9Phuve9+GZaqZ59rCdmxeFIbiwuvMTLb9Sog6GPRiKPg8ITDVN6g==","signatures":[{"sig":"MEUCIQCiseh6L0w9PdkARMuWiasJDUO63zM5NK1T4P5lZIicIAIgC494MphZ2OTcQxfQqLM/xG/odaBjz+oRtC/PfxmRAW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjF1qCRA9TVsSAnZWagAAkgIP/iPQ3eIWsaooaNaC0s+l\nJHVgOK2dPeh/GXetxpKcn6oTAdM473fciY7m2Ro0bpddxtKnNOunW8rS8zM8\nEqlLhD0Vf4QqpwHdrThNoAupfqUz3bvvW69pQsRlWT1Zhlm7YwPG76M1Nh0H\nKFWHHK/iltff0Y3C/vg/hqOZw+GX29lrFEcdEMJZItcwUJlF2rEX9PbnU2mq\nfj9mkcT8eb4JrdUINiDSBzK/48ra/frAZIRxD9C7Sz/tx9ibt1v2b+IyZna8\noVRMp9atxLvOHaNPmzic0lwZvW6tVUqDFKYxiVSGxLUOwLbZ+P6r3EX8+0+L\n2oEc2n81O5RFFfhGzhIJUKAQEDCazvlRvZkR7EoJHBqf8DPUZoEPJWXTzMC4\n2YwncG03JKpOjoHPIkaMmRkzz2ORJMXaNGL9YeiwPIMdIXkQSb+FC80uhXC5\nU/2ozeDb9tWygbzjCdSa0b1TEuS4AX0y74BYx9228aAnW1BlHiaM/uPSlUQk\nuzuoXwIvNVzpfoWPk8c9xvnR0vvvcNpd/3VchfurA6ee38OH/F9Tnp0pO49s\nt9y8MuuSPSmcRS+kfZcqCIEI+y582rSdsZDVFCNNfe6gDAVfVHo9zJ/aTRiQ\n7fzkHpidtb9Xc1mVhUiejvG6qrzJl5Lx/tQrrPICoMxLlJHwl1KSSd94VUHQ\n/rTf\r\n=eEOu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-7d155d4-1603034415391_1603034474303_0.5046770184369878","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-7d155d4-1603034417197":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-7d155d4-1603034417197","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-7d155d4-1603034417197","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1684bc6980ff8f1b5a7f253559cf79e3b6a7fa55","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-7d155d4-1603034417197.tgz","fileCount":7,"integrity":"sha512-8jAXHxufzFv4r3KYOFNu1yyJ9D4cZqwR2rxLtfSO0tPW41ZBom8S7bouzPtl9Vn4jLp9XUiNX1CgcEEPCn25iQ==","signatures":[{"sig":"MEQCIH4KNdkGUfGZ7VdSJ2tvo4FBB2Is4bGN/KiJ6dtzdrcFAiAqmBwsmQiM6ODYepRpLHat+u9txHOqPqxQT2jKXtkOLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjF15CRA9TVsSAnZWagAAM4IP/RDXNHlJFNUjijnEgNH8\noXSXEokrUZV/f/HUGC5Lcwco1yTIsWZTGc9AAA8ZjEt3vIJ50SP5kpRawViV\nii4m1u0+DjRT0XUHJf77faSn0uKXS1Bcr91BwCHmak3bfzIjbTbdEj6kFq+K\nwUfNCO0AovW7M8oJGE2qdav3ztXccj8i5TMhPnzFxQcqxdWlduCPKNNqMF4p\nHcGntzrABJ3NRe118nX/5WYo8dBbVihyrAOp34vghen+ej537TjE1kzGLlg8\nlG2d+37ApQjrf4Z4j/OWCv9uxi4/64dygpvEJ/iOMB2P/ieu89aSZEE0ISRS\nU/X2A/QipFxF1K4TT8WDhXh5tywjwfgdhZb/LD6k56+C2lLfDhQoAbjSXyjX\nD20DscJqpmeK8oUyil/AYB5vJtGFi2GtqdG76Y91+DNAqYL5md0NORhAOOOZ\n/oOounoRq4krJzfjQ9B3keaXskxisCFlY/6gFZcuHSvvM9v94SKL2v/nXKYT\ngrNbrbP1JUcfB49M5Mngi56WsHewEpemVJK8RU75xgcuEl/U1JueiIzx6jhK\nWwVEW8UlRgYDf13oUSTCxotPOJId+o/SxM6Cxghu965Qxfmf3ooL6hwYBWyA\nZ26AzjtP6wjUN8Mlo2To0xdFoA/BpqFOj2ul8onUngn2Zr0E3//VtaE+LBzE\njRE4\r\n=4b8B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.30.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-7d155d4-1603034417197_1603034489174_0.01580090244577126","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-322e40a-1603059290368":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-322e40a-1603059290368","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-322e40a-1603059290368","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"56d8a95a592ba3042e3629d1279bbffa4b97530d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-322e40a-1603059290368.tgz","fileCount":7,"integrity":"sha512-ogb04XUf2kLyZUMYp83FRTNbFx2GOMj0pNhBcZkCADvgYWsj2IHLF78BDxXGmpcbUo5oIuyCKyZpn2H1mA9PJA==","signatures":[{"sig":"MEQCIF7pm38H8O5IlfX0Aew4izJNNQvCW/lH/Q9jya4VrqG7AiA4/4bx4HdbWUSDiWYmoXx+VbN7DCwXMnmDSdos2is7cA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjL6RCRA9TVsSAnZWagAA4/EP/3O+zombHddF0P0ztgP7\nyGAclt3cKYhfSnF3APBaF2xD7tDxweM4bopL87NtyOcOI5LztyKHXTOtraaO\nPZSuVsxP+YbXT9HIll8P3fxL5xQdmDz7yHwIHOofsKoJiqCDrdaNDD2A9K7Z\nRPtePVD0y+FVWhwDS3rlGN0o6rL2tOpD04aBzq4T8rm/oFX84KSH/YHruBBq\nbYErGfsPfu4RGu0dQugWiSQKPJMoAsYJ8LBtFFKucn9eZjvNA9R/let+UNts\n5UFw5AMhdUFuUCKKUxRIVlyfmCDTcw3JUpMiusNR2J+FyjrMLL3n/06dPaJQ\n/gdlJmtDH/qhqzQMm7/CVMvVd0swqwMjDt2LojmhdmiRvZDq1Q3RQUbDPPrm\nF3MIVfs9UpG4ZWtw/emyNuwmuXWpWESUyDCnkws+S9BJXnLP7TnKIWN8q88z\n2qWGZnDKJjgKnJfiGt+HO5qtf7xWtt3i4uQpTPJ1CrTAp3rBPk8yrZ/G2vBH\nMkwk/wKPyg0SNBbaTmY3Tgi67hxotFuAVTnbHexw9nnum3XY++rZ+kH6bSaE\nXY5ln4ZKFm2sho6PUSGtUqWvI+bT/EkZpgTD+3rnCM76MDUCNBB6TqzSSAbM\nlDR0TSlLPvXB2v5K986Y0WpGpeXHl9X+tOYMe5GZs3lIEEtpIUXZyo1+f6Ep\nbRHO\r\n=eoga\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.27.3","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-322e40a-1603059290368_1603059344744_0.18065453182761582","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-19aaa33-1603093538558":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-19aaa33-1603093538558","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-19aaa33-1603093538558","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b9452b78c3a1f1c35d741eb208bffc31e02bff6b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-19aaa33-1603093538558.tgz","fileCount":7,"integrity":"sha512-ViXsWDLci/L9ie63Mcs9j3ktYyTLpzybUGE08bB5rlJmwUtEmfKHEv/cCaG2zmwjIEx0aHasb8zhmP03iwphKA==","signatures":[{"sig":"MEQCIF6MkS+sHbsf9QlzMzLO61KPmP4BfINJB9Ln9prvXr0ZAiBjQbCfFeZMFLSut4myBLAC8OJLvS2CKQy//f2ZeaR5UQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjURjCRA9TVsSAnZWagAAyygQAJyMDBmf973aPLO2p4C1\nrJarZXblUr15Wwydkhu/XGRi/ZpCxjZwKiykW+o06unKmZn3++YRQBl5Mwqi\nhvf3lblWdeYRxwKezGm8M7VXurMw06lV0yKG7F8ePl8tOUMNDCAC71/SNV11\nQX73T4nHRo6Qo3o5R/VFkxGTK36Uhm+j5Fu3mnGJ00YlmNqjF159g3gfAuLY\nhqBfAsfwORnZ5PQ0SJXQRPA3BWOs5vWDY5d6De2ccvFSrg69aErbot2gfhvZ\nFmUuBvLVnUyWqXYI5c4E8oQ8OrBSXamQIwSCFCkA8BM6tMbZLEyNAIzB5qPO\n7SfCKmWqGl91jJDVIIvQp2MAQtH/W+km3Kr6vqmJZ8s+BPssZ5Wo2d0/km5i\nAsCqWEoYYTMVda3bgR21uRZscfWfynQXKKF06VnFO+No6uUbMUsTDM8l+2Dz\nat4ePZw1b3xewixO/xot98pJnHSEWikQoIbzluFCLp1sNRamqcQcMqWrbpGR\nAJNVNFrFI8t7SUSp2cROMCQyMv71rAlMtRMEbna8DQhbeI8AysIWgDZfzm+b\nKKQDnbhyQHm7l+UL55upxuWwlxdvZPqLjgTfbC7Og2HK7sHD2eGQApIE0xpY\ndUsOHtAd8as1ACaQPfN1dmvNmhKg+PM3svSl1MBWxnXd/LuErcNVVJZ8JHcH\nKKxN\r\n=zSA3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.5.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-19aaa33-1603093538558_1603093602940_0.5749410692618664","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-aae989f-1603177524207":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-aae989f-1603177524207","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-aae989f-1603177524207","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"911b0d2014323a87de6604a4dd4bd5667a9d5b8a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-aae989f-1603177524207.tgz","fileCount":7,"integrity":"sha512-6wRarZ68mA3L16zhaSEvjFFOPIz3Zu4P8nvjGRrwspEbk/2ueKnI+Cswx5JGbWB0vBBn/0Dmu6x54LQi0kE2vw==","signatures":[{"sig":"MEUCIQDO126GDYO7haHh4eOGd+Eln5UwPni/w1KXU8mrBfjfHgIgOKKj3mfKV5E6DwHcVhD4cok5Nnhr+C+7EqtDV5L4VIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjoxnCRA9TVsSAnZWagAAx98QAJt6Hb7J83llC3INLYH2\nI4SiMdiUPjXO3IZRbGDfL3gSXQvsUeZGoxGSReuJVRX3Hc71BgNV5ww0WJny\n/pLiHyNBYru35XwVnb7wX2tpJN6hy7bybe+kO1c6Wi6vlWjh/fHYx7MPtM/c\nHXoKiRNSLHmgkevDzR2xK9R0s1/XEZ0I8SlzxXnZryAT+mPWryKDVjIe7CH/\n+xfMbnaAG+5fLlHxWKNTT2ktWpt7Enlmk8sKMZCVIGB3sufJN8pL7VlipuFS\nbhfKioE6B2Plwkfb2+jPqYj0J69MW3yk66yrK9SiPaoRdNe/jSGFfO/HAR/G\ntiaMVLuMIdirxayczFhe6oxAK0IJLjsfwK9W+ne021aetTeRejOfa9ijwGZB\nxEZrJOnVYWfn0mCpEvhsHWotoRXEx2x1lRNcvGRB0MiOz/rFTFRPg+k1pbXC\nA7oZs4D/mfuiDKoDNy0CRHtmSKX8vfjIn0p3tD04ypP3sILpOR0i3s/H3rq9\nP5heqKXLxY5pwsvKZ06iAaSxaVK/VT8xCp/X71kmruYm+86MAKfpb/zw7PEQ\nw4RuMLa/0VpQNk0vsVwLh5yi5/qRT8ZLlf4u4eyQWa84MT73oOU2tN7cCbo6\nbRuTIvqcW4WFQUXoGUseI52O32PDEIAqXbrzot/aVkHOpeOhSOWGSZAgD84i\nbl9b\r\n=IGOG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-aae989f-1603177524207_1603177574522_0.9434467458430258","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-09ad371-1603177526176":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-09ad371-1603177526176","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-09ad371-1603177526176","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"07e4da19fb168487cd723d02ddf9c4f41dc0ab4c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-09ad371-1603177526176.tgz","fileCount":7,"integrity":"sha512-99vorDog25ffmDik7/2sxXt41I1DukVXCLUrjusJdfYzJzMaxyAAISy4p88gow+YvBqe5tBhyWPmtv9Cstxzfw==","signatures":[{"sig":"MEYCIQCbue4mzHi/oeuM96BHH2aUcg1cRKYS5ecNSxgYNScgEwIhAMpMrwBMCu+HQSQenXsiVY8MXwFhkE4FOYEnRPW3zSR7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjoxyCRA9TVsSAnZWagAAXRUQAIG/ZUf4U//aajc+KuD0\nWjwk7ne43O1Yux0vbiTcneHwlQfNqpAs54q2yKoLR3y5jhxP920QZskGhF1b\n8DQCOkMNpLMVLu6yne3Np5ZAS95+HU+ddy8Ge/HUoJycNj6fHpzC9AzBHURN\nvRcHmfjalDbzKetQ3D7qPDqRKESREoC7EypwONG5t7dJCBr88SG+raQHL1Rg\nPnDhIZOvx9adBMGX+KhQ+YxzTQE/LqdpHsgA72m+kgQWar6xSgcigH7EFdLP\nduKihx7Wa9a+cPcIUeETzd7d+Lw0YHbaRClwGDMZpXDXW1SOuzihlFLF5Xau\nf27L22ms0olC+3gq8dtIjBXVDrwNdJcaibS6O6xhXGxIU4Sb4Z4mViOw03EY\nBKby3LdS4kksiK/yOqKdtzYpxrGCvxsnTVk8+o8tgYtHcbMouifTBHtj2Iaj\nS0g6pEFIZz35WI3mu87ygtZuotBO8DQvt2Zi12y8jWw04T2IiwbPg72O1Acs\nq+W0xPameI+nDhS1R0fiLoCqh8R6GRe//m7HFMnGUkao55hNmzWwUQJG5nVU\nw6KYIETM05h1AfauYFvzGi+Jlu8JlAm7eVWugoHom3MeE85U+XSeGibNlEpE\n9eG8fj3sjYUFyVkR9UGl12ylJr2kvg1P3Abfi3HsxVpm/IuZ2FMZL/sHQhny\nc2O4\r\n=kqiW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.14","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-09ad371-1603177526176_1603177586512_0.1414957775352641","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-079e0ed-1603293609542":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-079e0ed-1603293609542","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-079e0ed-1603293609542","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a67962ade4d62593f3c78550c7f8dc07b9f6843a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-079e0ed-1603293609542.tgz","fileCount":7,"integrity":"sha512-RFvKtU5qlQ4fvnIxkq2BQUfyS1MoBMRgvUNbXBiFc20xmIZfEg/mMjf+HaK80auaEltWnBSkcphnr0sxjh3wBA==","signatures":[{"sig":"MEQCIBpAyEgUKuQYZSffEqoiC6SDV6jFX1Ob/uZCa+TXkfjuAiBRLnQQ0Iw9pzlr1IU0C/3iAe3pW2QaMpS7J1XRH6idCw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkFHiCRA9TVsSAnZWagAAGn0QAJ3qvA/t6QVnkvvuLbOk\n6kBjZHC2/3iJE99jEwTSxiBkwbr0/pazNxa00X7m8VriMwm6CQZ2nMfvH6dV\nMmH8pSFbA8/VNs9FG4ACeB1nXqGNDrgyJESPQwh35g5mn1S2juRyLWfNX7Rn\nXkdMuxGpHyQJrag4D4kgAx/Ynrm7CModuV3tpEoYOeu1OnXT1tYs7Qw2a8NA\n++Smwn6BIjBTdsy+uFlPSb80BC4Ddmb+elSeqWGUQJoaMCQejzIGG6bM199/\nmE2hW2K2FEPjSdOOMx/rx/B05Lr/r2U9rX2cJdKT95hng6b9ZjX1ZZKRFlr7\nY8DpWSCnh0pLQo2FIDLRoezUbA1VB/F4AJjgqFDegodOXCPjNzOX3v6P4bzd\n5TUyMY0k8y2apRQQgSfFu2QlXn8fEvKaIJWBJcXYuiDIPlNZqYrJCFaF1Z7o\nWIiWY5/9VTj+d75YNI5p96Sap7OJwjoIJaAalgh3wQYbjYftGnv30kUJftuf\nQ/a+DOjrSCD0XiMGzLdapUXWQg7IKD8phNUBWw6oABbPmjsTUg3ToGJkBCPl\nu7tWLxRXbBEmgZ1afKjZX6TPYTqNgzDEfc3lo1RLCA6mrIyK2LrlgAR9iR97\n1v2qB5QT2Yo04sOLP7z9AQ/wzDmQ3AlluPKk+DChE3eGoTdUuw9wjaA6tK6+\ndpxV\r\n=YIJI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-079e0ed-1603293609542_1603293665482_0.409456083066861","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-079e0ed-1603293610805":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-079e0ed-1603293610805","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-079e0ed-1603293610805","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3f33e9219c1513c01a364178bd7737a76ecfb969","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-079e0ed-1603293610805.tgz","fileCount":7,"integrity":"sha512-LJCmRnsuvi6DLton/ek7fO64Spw68C1gec5P/KvSGygDyJYB8jPUubezBDIjvqrqZj8hlGiqwjNwRqkZazon4Q==","signatures":[{"sig":"MEUCIQD+9350/MuSlBt44mHVwLxMYKBJDTkBcmVtxVhpx+9+YgIgL7KmX6jcEXEQL8LQciE4BTt2Sw0O+sJFyagyze5Vk+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkFH0CRA9TVsSAnZWagAAyPYQAJq9lC3m6a7L0e3kCtR1\n7tIZ1PWjM7LVNtXw6aFtd88aQSG0NeuBNkvPW+DjStHhwALP4naSPJ+TYuts\nVBiUkMNa9YOJ+JB7ezJopLerWhSL65xaC+QzOhfl4x32KSzVU+V1gQnsHTGx\nebUtlmE3a98dBsvXlgwuGmCLs+pFaypiEPG1tPL1DpqEPe5i0zwyrNZssHaq\neaoutmc5KZ/rfanCVgzG40c72y5awXA0ugjqRtbdqhLh5YUN1mYW/srHOKZ3\nHcPG9Vqf3eJTszjX5QEoSfFqvVZ812vS6Qdw48qrfMByfaNYudET2rv2RZl7\nmNW1WDvmrslzn3qCpd0N7PS3gQuvMxr/xj7iVRaSvL7K1caHmvgfrqGrj+Qv\nj8svIY12go10Eu6jOx0AVX7oNZ9uygg2aek4qIfSK7wKh0WPunbo0wmyh86x\nqCw0cMZYDpas+2mPzxJy5p3a7IeA2odigYGC1GVmi/Wxzk+21pwmf3BISee9\nO/P0pn2+xZ76ALxtxaGn+w5jNaVTOq2Z4wsQYmWNfAYMnU2jLVsq7FMl1JTK\nvrzNrkFYmK9RrqjN4Cz9tVgGn6/M9gXV8EiFGAOpEJ6N0rbRvz/ASRx6Daq7\nArO+IMH5xv6fKVg0B96RvAWJBXwqNSyzDtnyO7WS/Rn5qNrqBZTv0rZSBjJz\nsmv2\r\n=wTsw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.13.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-079e0ed-1603293610805_1603293683571_0.2728274118548235","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-ce1667f-1603337857087":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-ce1667f-1603337857087","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-ce1667f-1603337857087","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7e4e205483b1ded10439435f2699930c7dde74e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-ce1667f-1603337857087.tgz","fileCount":7,"integrity":"sha512-jK3L1OOSua65fCAN0CTENXBqAxa1Ybd/5g66xZzb13ajdiEzkkoYXWdEd1mhO1g0VaFmD0u8dh8UuKVULCLz1A==","signatures":[{"sig":"MEYCIQDHWDVhGaMAZHFpLeiZ35AcyoBnSBCZ34jSmfw1EAzFiAIhAIgtgDGKpTM5rgp6oQ/h8eleuT0XHruSGc2pmPeUi4ry","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkP6yCRA9TVsSAnZWagAAIncQAJ+05yDV+AvXSzxQmsUA\nJFCd9fKs2aX1fiYyQJh2ZJxFr7N1daVh3X/EdJSHwoEwq1L0faybNX46O+IR\ncwwD+XDAQdmSVfXIA0dUuZvDFJSzuZitg7fM64fddsWiI0tNht1bE1ZhNEE2\n3yT/m2kLOP4sMZuD6S62sp5AhmjAr2eIQ0d+GXVEFZGUYrSa6yBHv+durQah\n/NmVhYbavrzxmIh3qCZ7+xdh/g1vLKPnuAoHSgV2QtiGo4fBPZ7vA9SDOaR+\nmWjKJ4R6QBol2HNSzK9RtXhTMAZNLXXQoaWAIsJDv40okpun+dBkegQoaLe5\n/pXrqupt66SL34hil9Kdcv8QCTYenyRhReT0vmimqcLpU6oJAcKyb3AdTbv1\nAbzWL1MoHbD5Se6idcZiIQIgtm5dnOsujo/KLJgVuZ/96sPPnKobGCUs4zjO\nfAw0CZsjXlAxH3uxpCm5xTv7aO5hfu7KTVRSLVEa9pW4KirpNWeJY4TDTYEe\nyjw7x1B3kvb04cyj15yQAvPEQs/YVkDv/nBL7EGR4vShHZWsZVdlVrPE7grP\nIzTHv32SnMtbXnwubYIhx3QJUxRx5OpFqVSt0b2gMunS8azHRlB3wcjYV+K3\nyiLiMFD+/FSD6zj4wYHG+3Fd4KTIgFb/fOc+7VM2zj/BxgwjUgKmd8QRWpQ6\nVSzO\r\n=nSJm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-ce1667f-1603337857087_1603337906209_0.02144385671273774","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-ce1667f-1603337860474":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-ce1667f-1603337860474","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-ce1667f-1603337860474","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3ab15f068d80684a2593a975947305f2f5028afb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-ce1667f-1603337860474.tgz","fileCount":7,"integrity":"sha512-ckTP2EqgdXjjbH3kPdWIYKtb8DB3hCz0f00CE7TEo/F49Kr+Colhtb34KKfdRQsDFN3wOL2iZziwje8eblLWDQ==","signatures":[{"sig":"MEYCIQDwEfyq0welDnwW643qUcGysxFAffdhKWxAwVhE0vLE0wIhAK9bT2sMgCWA8fgJIVAJcp6T1Wa6VB4lmIt41lPyvWLW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkP64CRA9TVsSAnZWagAA13wP/RoNmgIxPcqJZ8foV+JX\n3G+4HQggWsmy3GvcPSOhVV64YHjqSYcyCMnFgO7LjtfnK0Tazsb6IWnlj+YK\nS51AnkhBJ3XHy4uPn/O5E4JPNHVbypfYFkOMr2OtXI9/tbaV0OayqaqNm3R4\nS8/Hp5U5/3V4qrA6MmsxCz5LwKthPFMTTJAepBSUXfGMK42NdOFIeV1g/Z3O\nl4d0qDYw5A0WSceoOw4a9iBOR6LdbiDJf1cskbACngfvTXlX42PBWfq2Jm7X\nPD5v2baVPSUM7XIsSeyykEQwRv1McXEQc+4GxDQPorFOLbeLObAc08Dk2wnw\nv9r36ggfXvgxT3UpNL6yZx6SI5ae3CkE/sRU/OQpFx5vUVQGXW20P6+jWjwD\nUF68FqATxRpjkeTCXNfASvKzLw2ik8m2IK19b4RtUhY0cZCK6TunTw85gM0l\nWOaZRE3hHxG75nYSq0oYj7HAupzFrDuMwDBHH2l3cLgh+Ijrp0KKOnrwhhue\niyAlcsMknFD7djtfO7H+ZDtwbCEmLR10w54+G+CGH1ucRULn7gDzjVX6Axyc\ncWEKwQpOPcNXMc+zJfju7slntp3+vrPEEG2fTx3y1nNM5wbxigPaaTecfqGi\n0ZIvoEshcqzl1LA1hAjtdqcgdOWEvWFmocIe+GSOzbGy6uyc+SrBpRY9Ib5y\nbvPY\r\n=onnO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.0","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-ce1667f-1603337860474_1603337911876_0.2694577813654424","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f301ea0-1603355725855":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f301ea0-1603355725855","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f301ea0-1603355725855","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a6a826c0e86934b3e14b52ad61daf0b8c863e546","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f301ea0-1603355725855.tgz","fileCount":7,"integrity":"sha512-ruqreZaUUn70/GLrM7WMXI1PDb0GP18RRMespXCIXtdgJ19Z7YiH5jVjF9LB8rXhAFvpH/5N+ctb9S7YtoGOpg==","signatures":[{"sig":"MEUCIQDaNCTvjIonFjUp5meB9Yc1iXqhB27may8O1HZZt7SrgAIgARScSSDFFvYr6UYW9GkqSE/rsTWkSPMMMvNn0kPRdjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkUSHCRA9TVsSAnZWagAAJPYP/iM128wP3/R6rT+4EiUZ\nurdMQzaJqlwL52+CFJ6yhT8fHl6ChExduHBkyxvXkk4rzsX+MIhUgu57nZMN\nHg37aJnPldMqZv2OYEloLJzNETTdY9yZqLoBI1NYEFqEitiL493HcOQ6uq7d\nCdAEUKQUXEcmTGesCoIekhDCEGgKzASZ6Zqvvi8vfbWdKEp8ra/hCnWv/Smd\naS1/xnNu8ng2MZ2skD8f6mIISjVaBApTUE+xHeMmIudsONT6nRT4lB9Ntqgy\neHsLfeq3ZAtlQX5iPDj5srSPyjhFtDJFjf3wE4L1HQxk96d0Tbbj2HjUR0Wz\nm7PRE9Ap55QXDpFjKkbNoAptG47nXNYINOmbzLBgQQqiukjyItoJHeULazjF\n5ZQWEfm6gPfWtCSfAy3OGJrVtbag+Od3CW/QTj55tRWj4K9MwFTYzwIkuI0z\n0Uoxsx7TubFZ9UfwYcQsZSiAdhPo7kIIjFcLxsopOR4t/c9+mS+p8huBIFFt\n958O8SXemOoZgZ6bO0af8j1qIdVsLg1RRlgJHAL5BpCQrS9EotZh4EzOK0UN\nUCuwQ2kP6wycjzE8tnc72EAk/N5B5TixQgT3siSuHM4rsm4MkXvWy3u2QsNB\nH+N+zOubLHqVrilujEorsAfjoZP0184giBy0fHkbjEfdjyFD6X+r9Jy8cAWh\ngqI7\r\n=e6Ih\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f301ea0-1603355725855_1603355782965_0.3003825327547338","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f301ea0-1603355729974":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f301ea0-1603355729974","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f301ea0-1603355729974","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7ea1f7f0a4930a801cb963f8c7eb265531a46606","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f301ea0-1603355729974.tgz","fileCount":7,"integrity":"sha512-kw9DO0eE0iEMo7UuSIzowO7dzWYSnNkP2o7tYbSafr2wRvvi/+mbMDRXemuNKqZRT4jTcksEsekqxAxKrCQaUg==","signatures":[{"sig":"MEYCIQDyWYw0CzLkryjKrM6stpYqowJrMXUZHqYXGDELEGVCdQIhAOEr9QX6jgjNEe3CMt/cNIsNzYuXV5jtYAsRd6p7kqBO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkUSPCRA9TVsSAnZWagAArHEP/iCIwx2ETk6iaaghttwA\n9EyK8jTlIWcv2V9P/PZ2ObhaWwvhbK0j0XFVqckW/AD+qNLLKIiCeKDsWGpz\nMOJaQTt/3HRc9RC69PSB6++3PVkDQe4g5OoAz0QZt3QLMEOsQs5LnUKCGAJs\nT9HQQugJoz9B2F3ZNqPk4z4ij+WBVWmYMMwY+UcXOKeLJbcyBBn/AM6jYOod\n4C/s8QCcyYToeAdh9p7BObQ/nvs3X0+MRwKcG5sWATRmo0GAC9n3heRdRJZT\nbDnYRGkedgwSFDljqoqHWDWsJh1kNdBy0aTzPw2GXHW0urOoL0Jr5kjAJgj+\n4PM4Zt+T9gYl5dkBeCf23EF4JKN17Y7DrzbKHhYQtguWnY+L7BOOQ54mpjXP\n4+DUuENkhdFFmjztrStBPdAGodOt4HZy9NYZpbOCDEkTo0ZGfyW87g7zjgTE\nc5p4JOswyNY2vQ1OvfQKDJwGMV/TQ1LIaxzfJIsN+neJwtDij6PNBAujr0Pe\nDzjwBmrsHSlMpqePuAFIUatM5YWzVw/Q/LEbtfoNw5rIdP8hE1DVFbnIMD3F\nc8MwTl0DaTT6VOYKjuqqcFae34sOTScc0l8ntE8ag+Ls8o4P3vIvWmeRgNVy\n/veMy+oX8Wx8mJvJk1XkEs/kuFatBtRFaDsINs+Mf5ix8qNNNNZBRd2M5ww+\ne2j2\r\n=q26Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.1","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f301ea0-1603355729974_1603355791024_0.448708461466206","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-e1963ab-1603548376304":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-e1963ab-1603548376304","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-e1963ab-1603548376304","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"07896c0091efadacb493459023bfb61e471eaa08","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-e1963ab-1603548376304.tgz","fileCount":7,"integrity":"sha512-TD6fUDJyoH0NFUsqWTHDxd7i3SFD7vV6Us7pWwydaExJ64UmB968c0IdEUxQ0KDzNUkrvgbWk0L9VHaGhYQmwA==","signatures":[{"sig":"MEUCIEoHX7XxirnIqUDodFpN9uJ8Cfv612hvlq+5RVmokFNDAiEA5AJsXfGfjjXP+mHdyKumDvvy+3Pa3WlN+B6mV5Rwh7w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflDUQCRA9TVsSAnZWagAAa9kP/2QDKD1RsRz/NCvslM5n\nrLdQXmey81G6Ndqs2K1b4tFzbIwOn0xuTfEe1VFy605vZ9d997EvyVaclA4v\n3K/cuoLjuCbNsXhHBGviJMfgP17kZ43u8qVhGHsGus2BePWPWWxjNQeCebx2\nbXaH/jBFkKg6Jls18VWq/waGKSCIsGXC49rnHSkY9gW9Laol+Eqy2m742ekZ\nccV0DLnnKmVxjXvpVv6S0p0MQ0YwwCa75NzMicgMR/+4kQZiFX4ahEXR1OeQ\nr2npLf3EO8b0YDfY8K86ofPwHpvaiJV+XssJCyZdHI5do9ncDztTAgNaxnwQ\nFRjTYSPiLEqrXSFg2Mr2AiayV3m+WqS+Ov4kFz9d75rp0XsbkodEUf34NCxY\n04Apa2IPB+Zvm7y2jAjDRZKhKSQVKL3E6hvLDtYYbxdPJdyV3P9cxVU9sn64\n0OXV9NBHmg4go7Gira3NdV9sQ6D8TH9MhvliFovw5WbKXwBl7V3/+Dk3vxgP\nbHsxxOQ2Vh6NIRd4aoEW3pSyXw1gfty2o2rJa5wVznXdyUQWciQwioR7uOYS\nU9TmOo9oxx1oznm4vU2mr4bpIeIT2va0uJHeP5rYmIpjkqxhhTBl/qwCRAHa\nCKQmjPLFN8ARilBAhB0v4azHSPqz/i2ZXPkgVJ8OoaT9JHhnzrS9JNMDc4p9\nhvvo\r\n=rVg+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-e1963ab-1603548376304_1603548431967_0.3680828814278201","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-e1963ab-1603548379847":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-e1963ab-1603548379847","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-e1963ab-1603548379847","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4ff214003c4a625fd405c0beb2aaf60298e99faa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-e1963ab-1603548379847.tgz","fileCount":7,"integrity":"sha512-Ivpx91MyPQyEb3jqCFo78cXj9BtSTvru5Ppz2wEVfLpjjy23HmoXJ4402LYETDDOb7j5eESreVWGnCLQeSMy7Q==","signatures":[{"sig":"MEQCIFs0+xrJdTdoKLUWIfm4yBSQer0CK2a0YxcaZavfvHSNAiAiGrxzR93PQB6eJwdx8CSOSzfLp/gNu+e9rereXSNQrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflDUnCRA9TVsSAnZWagAAoZQP/iFebGcHu9LWYY5qKveE\nbcDU3/3ACYZQNqCtaX7jpj6y5YrL58XDICoyNGN+E+2ngy5veGBr2mqup+XC\nTRmeLkmZCwBLURk1E/PjW3E8k1LWZmjjrjMR2dd7q8KS46Aq/nAo0disvsL6\nTsxFjEz4g6SiBBE/DulL83gwviUpzSjATGaTP5ftt4LcSZcq/Eo6S0bzM8HE\ndGdgJhdo2A53Wabk+uJXTnS22NICuq6nm0MRUi1NE+lWMrYbWYItWVr6MVd6\n0P9j0oJ4dHJXPSjtfEDwh7Y2TVrxloe3n95wq3/k5LCSH9ubmk3+eSfb72WW\nr5ZNKc6eU80++csoVW+IRIjmhlsgQfCOtvkQPPmlaDbQGCW8QOUX6yNqJwp5\neBFclTnzgpp7SwKe4cFtLYmUwZFJacNQmVIGKV0TOYwK5LWOFMFg6LXZ+v2p\nYh5VuSw2pBukODyrgKKE5GyUFuXZ0EX4Wy0pTbFlJbc0IEjfpyNtJaauDMRm\noSiRiGO/uXZgkovOtVnh5u8zEg811WGtP4BYd78PsGUk+odN5VE6a2XnjLUr\nEZiRmK/cf6coMvamaf8xlBOev0qB4+oYZoU0kkwKrDI94ZnhuFHZ4H99gffa\nnGY9tpJ78iFeoQndpQ9iz4UJxV7xAfHsT3oq6FoBpRceN+VCuk3eW0wokm41\nwqWc\r\n=w6ia\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.0","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-e1963ab-1603548379847_1603548454558_0.7457770437651081","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-50878b7-1603615864263":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-50878b7-1603615864263","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-50878b7-1603615864263","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6aefb03741cc1e0a31d37631c2ee44cce590916e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-50878b7-1603615864263.tgz","fileCount":7,"integrity":"sha512-HFTKPdTVg6TCx3Ut6hgxc/Z+uKE3oggTWnLUagY1UfC6cPUACV3agrvr7rf8IOKVZPUCJDzdO9XRSsKoZ6uB+Q==","signatures":[{"sig":"MEUCIQDiQ83GzpEq8oJeRqPFa/qxMidJSUtn4JuVBfgk+qtcMQIgIilavGdoEBhUXeDqQTBdOFksfSG88p0m+p/xm6z+HiA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflTyoCRA9TVsSAnZWagAAP84P/3AfWl0qi0/RtXn3Cd4j\nsHwQi4sU6LwngQUHeT4LkAMmvGPHvn8E/RexYuVIbtTjMbEmwfgOWn/unSE9\n5VBuMnA3r9yyFDgTt/Z/xmZFhqmUOjIFIRU2u7xAWL1175uNA81GrfBzXnso\neiJzy1cVITY+YBzU0qw0xzXZ5MtaJIRlJWLsrnR8LZ/bJtt/idjINrjFeKzd\nTg9NRdU/+X7QV2RkJB5dxlK2IHRK053WkLBV1snwvVzSXSPPpFRvUq+i2Vzh\n4aCCPS0OIzNa4Go7V8acWgmMdfrz9/ZzBt4EoQd158yUfL8hJQxSPfwMQp09\nwD+e4kXJpJAwh9hjrmVhhZ1ZhEGZ5rDWO8YJeEkHwgAKYt5+qOmkJ6BE01GI\nIAmQapFYk1RCHbuOTs/WvkVTEUMOSYEKAKtkVUZwZX3/BQgA2MXx+rICYcsc\nglN7uSB7Z76mPMb7+RcqDW/67LPv6rsuLNx/5yN8l5Cti3BdkPzZZSHmqNe4\nSI8jYIbTHkmNZAnV3dVrgqNpKew38eHcK0QvKQHVkXiKmuqXikQcuiO7TvW+\nnE/yvIMzBrmhaJURYdYrm6ZSjWN7IdaFf9+YPgxs+v9OL7Zf2wsoQwkZSpxk\nhZkei59dKd52HPGxUn5SQrZNc1+wwg5dOuYVLqP0NLRqmf/g0KNNO0JzgTVV\nqs2e\r\n=1X32\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-50878b7-1603615864263_1603615912189_0.44639414414268663","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-50878b7-1603615866420":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-50878b7-1603615866420","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-50878b7-1603615866420","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"241d0e698c80452f14acca38038b42c4bae281e2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-50878b7-1603615866420.tgz","fileCount":7,"integrity":"sha512-+SadswPPGQ5fnOo1/ArMpzDst/ICckhlA5O2YqXFi5uCH6IfSjiTaOn7IYsMB6SsGy5W3BEyLNr4OUTL738qEA==","signatures":[{"sig":"MEUCIQDMcxUdKxThsRBrZSvypR/rLheCN+nX4sXQPQJiVipT9wIgaR6qqrQp+FXpYQyHHR6mrPqi9a7/g4X7VX1BLgbiw/s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflTy2CRA9TVsSAnZWagAAkhAQAI2hHenKQo1RTvUBqJRO\n3x0rYPtzIB4nQ838DlPYCyraRgcdam94yqjI0xXechXL9122JOKzoThMdORi\nI5fqGspRamIWMUw6D/YJGlpvXsLd35QQLhU2YINHAPue+Zs8YImSHZtdD/lm\npkwqj2HyuWc+pOfaEyyTXMAn7VXi/JsJJJUZNJxTzD+fD14YGE7IhDo/wB53\nJZ9LJ9TMnLLUroTnY5wsZs1rP+s4N/rSXbvDmEKRDoQk1NzXrFe+GyT9HEg5\nDZgoIpmozpHALmRonPh5hV/zgouYvzUdjdl8quH0EGYSrQlB6urnz1oEz3M1\nIV16FN7aBzuYC7Q4Yqup/X5+XsuJ4funmXwolipCSV07cRnXAXa6BKeqjMvy\nWcrq4nL2ql+Ibrbj3hrnHHb8f9lpdXvoFUGhR2TEiOBR9d6VtM+5bvcBi+91\nuB/QSQEzl6ptwVNGZEo0cQwfmPicnkBC1zJahxKfDTvYy13PKUCbuQ1mdVx1\nsMea/6eh0jb7os1HE5rTjH1VFYGP2r+sanH1U1ARAboJpP/o0NE/l5avmDVh\nzne2CRMWTNa0RqE5g/hDpMAKtDgPRFm7KCaZqLUQSIwUzS+cNkVMKEKZtsKR\nk33tLjV87ANsSumwpv+N4MNxX2QcnHVvR1kAz9g+FfPRyc3lsCuS+ATWG0nv\nj/2g\r\n=BIl7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.1","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-50878b7-1603615866420_1603615926292_0.46051615198860496","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f7c8397-1603635414441":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f7c8397-1603635414441","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f7c8397-1603635414441","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7dd73aca907fec79c6cea65212dd4ccf8084de29","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f7c8397-1603635414441.tgz","fileCount":7,"integrity":"sha512-uvFw5UAh524IIFWz4/90iDS6CPG0GAo3TAX9nC/ga54UEBYVpQRyQKj3v/daq7ttMaYT1ncSoOHgI+G0oE7VDA==","signatures":[{"sig":"MEUCIAuxEDFkFP2BjXDo+GFpJQVC2yojCxIOMbKbRrVtdTGuAiEA+AdgSoR/8+Qi/HNir786Flm2UHBeT/uIev1ACgENISQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflYkPCRA9TVsSAnZWagAAy1AP/1z+RssfRZPYkhOnW2Vs\n+xHEvpYBqTQ1hYa3GE+34AoZAwCtZaqQuEeW9DdYjdaKWVF5bHauRwVJsbad\nYyiahZSDesEW4xnd0AzhLE+nZ23gSMN9Rk+2F1fp3CYxEYGNH2zu2ubHqGzi\nHKD7Hhnbv1rL6txWIqJJWlPvtDWVwzg8FDigG1DWnt01XzZc2EKNzqSmhXAj\nB3ygbqEOejDpXNa24cng3O4/S5CGsjR/8hPra0/f8V4px4jkj4TaA7+ug9ZL\ngKzKf+HAT2zdUkHGQLZ7kCg2Hi6wf4bhu8Sztgp1Lf9+J+BTjilHPsfU42IG\nqRSvHsnmOtsbKgaXtslbD0HX3wTh0Oaf1svelCe2SwalWmxhG163WJy4HgX6\n3qmYwHpXO+/yZhQ2zA2lNg0VIry7pLEqwW+fjQmYpygk7KiflHXR28Lcu7+o\nLbeTlNb/HwFpsSqyWB0rWh4f3WwDbvkQivaFREbKHxy/dljfAOdi1z6jw+RK\nfgOKbu9hzXykhLX4KFFwgX41IXHxwu30s8bhmlJGm07ibHS8j2eFQg9i7rok\nxCN6mB5JTEYbFJwpIT5HUkR1Sf8Ohix9w0SN4kCGBtWPtlqPuaWj/ulBi99d\n5w2pCL6XjmBCdUe7o6m7rnAjHmrTJ1eO9aBXWyJhWoBN31ZmCZ04GuxSpocc\nTIUI\r\n=joSg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.2","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f7c8397-1603635414441_1603635470927_0.09149774977667913","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-f7c8397-1603635421089":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-f7c8397-1603635421089","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-f7c8397-1603635421089","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"376f351dff2684bb6e09ad31f2d05f68d9da20cd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-f7c8397-1603635421089.tgz","fileCount":7,"integrity":"sha512-LDGOa/qLNB1OhrbVWeiEJYn56JAI/YO60llXGRf0BFbnBQBMJh4+245G1qEPCl7awrQynOHmovOQXn3uSRgOOg==","signatures":[{"sig":"MEQCIHe90S8BIz/oxAcv32r4Gi0W/u0MlldJpKM2NwZ7s83pAiBmsDwqIyxbkP3ggT9EveJCnl1cUKsDoEaffH9PKjRG3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflYkbCRA9TVsSAnZWagAA1okP/0P+ZbRy+mcbYAzXx3gF\nfG7LPIWH1cMwUkysJ3W4d5J+SAbDVWaAVzd8dqRI2d/gbr+dOIBuS+/hKT5F\ng2ONSJY2sMUjBwmc/ZF0PLiVQN4ZzHdL1w3uRy1cDX06iq8A3VkHchcuZBkW\ntsq1YNCkYB/7f1U773DqvZqPaqKEG52a+Bzw8t4MyD5DGUGxaz49oPvyUN8f\nn5OLArw8wuY5oknZkEpD2TciC/laTvwMmE8ORio0Z33g3N7x4RyDNAMyAYBq\nu67AEfpUCtdb7yGLHCdqn+2E+zzgmwEeUW4p1TaLVsjo9TeMuOqlzBFS26Sm\nFesc9Wr3Sd4bBWfv9kOmIgSzMqaQUoeL9Upawm5pUT/WvtfPcqwAxY6P7QE2\nhvIlEup7EdcI/uFFDUuDHuXFHXuW6wcuwxZO/bDIpKB96HrxRszlwAL0VY/t\n5AFzZt4yi5Ngl99Zq93UhHRQUeIw6MITJQKKlwN2Lmnfc9Z9MM0ddRTteske\nUTIJFjEpIdyQZHVmcpaKAYlhSppbtjEyvllPz8wpKaBxYzPXXOKPP8uGL2p7\nQuCgVSYDd30SakY83rhIcETLmuAuNWJvGNLAGJpalMtuBfFbSQQh5iNV1pOl\nXjQSySeEqW1ckxhdzC0/+3iAAGP3NCTuyg5nSveSZ6I9EB0dIYgAgfRLS+1R\nFtey\r\n=inpH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.2","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-f7c8397-1603635421089_1603635482752_0.15121353812650584","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-0be0d59-1603645565239":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-0be0d59-1603645565239","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-0be0d59-1603645565239","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2639679fbca4227d674936b035d213f5b5cf041","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-0be0d59-1603645565239.tgz","fileCount":7,"integrity":"sha512-xk4defSNeD6ZLKcLKYalTnE5m3avWAmuC3/9xafIYbNPWu19GcpC2bGiI2Gq/apKDumXWNJhU49E0NSYLN/EaQ==","signatures":[{"sig":"MEUCIQDJA8U7R+jS/KK/I8DIxMz9TvlEYv6XM/QfsrLCdTNHAQIgQqoqMhYIQJo7f/K1aKwc0R4YK3bwAJc31/DtqQlfLGQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflbC2CRA9TVsSAnZWagAAe8QP/AoXSBGzgRSzIwWAyufZ\nUNNi0eoc3Kos+Zt+thDqZi6BxGeb4IqtAvwjfkAaLqie//32A2PmJCal7+q4\nqU/mNCMy6RSAgXySua1GhYR2yE9kjm0syIi0b+zFX29OjATDyn2w2bPyfOuR\n8HGFd1VWItBSsvmCDa3Ls2cEtPZOAPB8erMvadWKGgGsIkW2nDrixjwJ4S6n\nXpkR3QqCyMP92C+YuDYLTclgNz2FKy0GwHcHn1xq43UJku5nB/iRfaXMYaZf\nLw8mTlV3eRyll8zf/5FFbruEfEPCto9HpMYaqv4UF2V3vZRMiKrCpFC+KLGl\n6I/o6Nu311Di4ZXbTgfnGDx9oSNQ5AzvsqKeOKBTW+LIa4qRUsac88kjHRMl\nYKEtmiSe6Sppx/uXfR1PUM3swLxQ2xJWbhY1x3L+uJd9tdDU+/8Hwh9qhPdi\ndAVHOlC8lrxleiQAe1wY8xLPNKLqf5FBqXb345aYTl26ARzOux+xaBGcAy5n\nuVH7l2yt/XkHkbtVdX8xqXDn8onlgmEwBMI3XCUxSgvKPKEKzky3N6efKzQW\nbKaG/W7kE6mtAOR7GSOOU84Cw942IJ9BmIK2h4i5Mf0t/diCiALacmlFZsfW\n6V6hpZFmeWmb/HZ22NKTyuj4l0vQ7+CcNmOv7aamlK88pkwwbqgsX1jhbav4\nSPz1\r\n=sNrj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.0","rollup":"^2.32.1","ts-jest":"^26.4.2","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-0be0d59-1603645565239_1603645622227_0.6738630793776212","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-0be0d59-1603645565945":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-0be0d59-1603645565945","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-0be0d59-1603645565945","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fd695777777478ae70048720cd56e88a99eaf7b9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-0be0d59-1603645565945.tgz","fileCount":7,"integrity":"sha512-L8C0zA+y3xJ5bY2jgOE0twZr5//r/Jg0y8V4fOt7jjTcaFuoOdaa1MV2jJXcSDDV115qw4QUvlh23jSpKoXp7w==","signatures":[{"sig":"MEUCIQC406Mn7RTOORHXr7ZrEWlFL/dPTYUhxF/6dpc1bHsp8AIgVLIS/FFA7+TOqhjLHf8s5AXi9pvzFh+DnmR2cchqmec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflbC/CRA9TVsSAnZWagAA0I0P/imce2USlgv70ga86UVS\nd5dTdiV/6vz+E4xoy+kQfdfmyIrrNqxEOPgy5gEvi32QVVmOyrdwE92kRO2T\nKaU/zyR0kF8xYA5WO/vhvkV/2DtiKVYYVB0HnIH2X10wH1KoeayKlw9eLowv\nbPILP5+4Vs4HYjEPQy6xdGnfow7wjAjx6t3No2wiVK+CSr0+dUsVI02de/bg\nVadHjBnV5x9PepDOmgmGBYW+1VcADJd6EZpRw8aCXaRoHE+UeL+cSMVsxIQJ\nxjPBfH0JDp0VkT62luCu9kkeGvIW6EMgQ2fDyZMmgKTxxl07+fOCO0caKlnm\nswdE9izdYXxRVXKAKt33tTgj1xAKwyzycei4MhdiA1EOZ3vIxPhKi8fzua7d\n+1fXesdt39cz7Q8FXjoWiqRcu6J7EeZ0TPSkQFbhcNSFhyopRB3Ky2b5Tpx3\nLjTjG9qE+3kgwWRcvNQgjgq9tOpmU3F0WmdbzPHPWRHol16z8DRspCG8gANd\nphjVBdLImz4WIU7nflXCfc5DpPymqYWlUNe9IfNQDdSLsnz5T/EEbwvmFLmW\nCskvX3h8YMlYLrkYda86LWoC1Z8lYo5XniM6jEYyL5OQi5YC3OPk3nZu9JQk\nRpmXhEnLbvvAakfunqyJJQmkJE1Bxc/A7C3tZwdQ3dXnDAxE9x7CPDreI2C0\nid3G\r\n=Kvkg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.0","rollup":"^2.32.1","ts-jest":"^26.4.2","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-0be0d59-1603645565945_1603645631027_0.8098391657714561","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-ba957e5-1603830469662":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-ba957e5-1603830469662","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-ba957e5-1603830469662","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ed617f0df5935e89b83078c181e802b68136ea07","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-ba957e5-1603830469662.tgz","fileCount":7,"integrity":"sha512-C9ZTBCpZMqIM7M35kEDD/Oz6L6cPSQWZvUJmo+ISq7e6AwyqGDpvFSlqh370qJqukRYmzZyqikFEHV5Yz9KlYA==","signatures":[{"sig":"MEQCIC8Oniab920YJWEw8UfiLurwUZy364cTl5ErZrxRGaQzAiBqP5owzyGuOUnZ0s7Xj5GW2Aq+xtS4QJgwH4uSZg0uwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmIL5CRA9TVsSAnZWagAA8P4QAIwZHneXJlJhArFsuROB\nc6nxlTLENWtjAtz0JAQCXGk82lboSsDSzSg0oHoei8uxby9lIqL48yk8/fGR\nZnTy8/T7zvMcTIJJX9zz0qBLRvpMe110tfPSYbfNGWPbGnnkjkidfKNIWjG6\nFiuqoEtvQ1EZO+iTj9qec8yiqZQCvIOvVJ12rJvKzAP6zszRcEu675G8Ee49\n+sGH7DjO1/Do9pXHmRdMyOZ/6C9LvzmMpB0JtBJ5aNPqBgyiW2X/ZmsYp0oO\nJIQDDsnPGFb+07rdix5oCQKONM8dOR3+Jm57Cfg2jmYTdq93EPpHKvHNVlGD\nhghHkbGyYwNM4cl+MgFatleVe5At1iFi7FeqlkSFV71aw40fctIh1/so4bNt\ntV8K11K9kY6ay/7FUtIZ3MP+L+eB2pgUXBraeJ99k6j9h7myCyYAMaD9j6kp\nPASwtOCJILOZc9FU2W635083z8MsU8tbNQeT5eoxH4VKuoGBPNuuF60ab8+s\nQqLACoIGILyr8GMFxk1aErK+tBkud6lCD7GyqZ9Xmd5fCtxbDg6R2/qX4XF1\nbgR5LWD23Bq6FIXF3nrT0S0gzqo9YyTjHX/RRBAlQq3eTwZaYBx/LQj7IEZr\nsuFbzMs5XrcVNijFKliSKqa+yeKm7NfhBWB88Few2bPOmqcDY5Nb2qYKTmvu\n0Oi3\r\n=djbu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-ba957e5-1603830469662_1603830521020_0.1290046011815571","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-ba957e5-1603830468750":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-ba957e5-1603830468750","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-ba957e5-1603830468750","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d685f3404c6e317b189d43abb4a17e98377a6e6a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-ba957e5-1603830468750.tgz","fileCount":7,"integrity":"sha512-HUEpMBqq5C4ga0fAVfJDCJN28zD4gZgHrNQeX3P1PnT6CE7EISY2fuwrW5Ifa+wUuVwrcy7UAo4/F3D08PV77w==","signatures":[{"sig":"MEUCIQCUe7G/xQEZlwkBXnGN44jxCw8Uxd5YegQIUArkHiV4MQIgc9sE5pzZiNKFEZ/96o/acoElrLXdLs1HgnrM/R0yN9M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmIMLCRA9TVsSAnZWagAA9JYP/RFRwcsuz6yce6NjBl99\nynNMDzhtiNUCPuwonhhKaACgB+vYU5d267gu7aezB5DmIVCYRNJICuYoYZR1\nQcX6kfP++7q48hiudz35tHKA6nqQ2SdkjzK1SobHs0m7sqx7QdAkrEca0FWD\nx6nCkjRMKNFuzU5Yeka/MdZVOblkcu6oScTMfYgjnCds+ZetQ2ahzBis6IkC\n48dvppaUuQhEB4G1730KmVJRCfEMnRtG/GIwYOOH3q91ENuQ25Yt1IZp6ULg\n+13cTQQv8vmq/aWpzBwzsXqUo+nOv1g0YjKcZ3BqYo3yg3Jzifv4o1VRoSwe\ncMX1XsVir8USXEoi7KSoxliTsG3RqVFNfUBmHa+cyJ+tH6WRLH3V+2ltwpHj\ni48a/igoS7W1pv/YbFDLbQdwAM1MWwWEV3KJVw8zhAyRynVYzegGHmQoOIvI\njpYQW29LvQzFSlnBTtyozC9Gt0IHM9rOC0y7V0cfumX98rJFJsNa88QIafsn\n591ipl+66LMiaGd/zE0QDHjLO3DP3mN3RObifUu3IFmFCyWZu/fYJlMHMHbO\nUrbh0CnqpE4SlfxFNYjaKVKTE2uMTIaJeb3bfK1uEKB3TsjIR1tMN4OD0vAj\nQaVFqz2Rvw1kwH069CgxHFNmvnKVT3OUDVeKpKJjRy2p3RVBPCplzy60nfQr\nGoj6\r\n=4CxH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.3","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-ba957e5-1603830468750_1603830538916_0.42592962426665393","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-66d97a7-1603838861183":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-66d97a7-1603838861183","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-66d97a7-1603838861183","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f02fca7581915394c02b5f55d3129547bc66a3f7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-66d97a7-1603838861183.tgz","fileCount":7,"integrity":"sha512-QFrxaQo1FEPYziZXvrZRdfFTAP+JNF3RHGRrKkAUeHBWlgbt2qED0TIlD9GLFN+bnSIiMuGuiV0vHgHRiTICqw==","signatures":[{"sig":"MEUCIAC3Kbc9sym8fNOUsIhQT5Q20X7xG0FwR2uHfJTXzfHFAiEAxIZGTwRTGfYGe8pRD4wsp7gQQfBYnJqNoirXDb9fXn8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmKPBCRA9TVsSAnZWagAAHkYP/Agmdge1LQJJteyYV+7t\nCxrFU6xwkR3JfTTXpHBBi/HbVyJ7hRn00kC65BzWnfctJwd8gIa3kbJsDhDF\nwEtPXcVR3MQ5A1zZ027VI9TgaI8zC8zsAdAtlyhtzTCP1wOthpwGh3lnU7ny\ncVXRwCpQY/xXN77a3u/9pd1Dn+dfB1aD/w8K5/SNZuvcCfAJXTXIatOdoUP6\ng+Iy0kOwPX42xqRur8CiOleUZQX0Db11a0dXhB02UkZfPyamxhxgx0+k0+Wq\nFKz64ohxz7vMxt71mpKzxancjT4JrouSo/UJIGlM1qlSUMScMfjv2/4sjDlY\nEl2sZyZLnUgVG4ZZJ8ufzVDB0/eNK9/V6EyZUG44Kf75PQfCEq4h7CdL9xrv\n1MZtcXjzyCcF1hJadoT/13x+3ED20mg2d6rfBrHTIFs+lpSucrYr/qz7VpO6\n4e02S2xPQlfc9WkzJZjJ/phIW4pNN4lqRBMb47wK+W0EQGf8tHx5FnZihPJ8\nSykdgQcl6q5/sSxPeh3040BzkZXfEz508xAJ4AlaqZGjkJW4SftmzuLI45iG\ndFApgny6nHA/CW3l0fWJGs76zF4ZFrNj6Zgnnh8elEx5H4l7eYC4LyIEmFkV\nHPcH+KM1nroP0pNUjzoDNRcMFNyJ9d+q3B+6nf26Kp5PTe3Zxs6MxXqtgOY7\nmwCI\r\n=xNyC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-66d97a7-1603838861183_1603838912626_0.606325640010962","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-66d97a7-1603838863279":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-66d97a7-1603838863279","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-66d97a7-1603838863279","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"150145edc6b6769a910746ac2b245a90bd35d2b6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-66d97a7-1603838863279.tgz","fileCount":7,"integrity":"sha512-NXj6n+H/NXdaHhzwM1IYtzRjSHmuHKZMO6BpNFhy3d2n5BQdGrjV3JZUW/v5TfqemN9lp3MAPJdYTtSopl/HOw==","signatures":[{"sig":"MEQCIBu4lhcV7folXu9ekFq/81cQdzZxDGHaUUxzD/T5jfyMAiASCKSeRh4xtMdqGdjp4ByAkWTe9ugbFN9w1JBb+fEaVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmKPSCRA9TVsSAnZWagAAZ6UP/3nvE4PGWSH3NMe5OMic\n/dFIpcblHvA20t7WKS7Bn3qWMLs0R7PV3tbqJXPk4ws3bIBe3O5TfS+LvtFQ\n2EtxTsQjG3vo748rNwrYCrGmPBb180hYYPC68hqchfw6vxgWcolcFfiFKa3l\nOQ7RHNefEmNoL3u68PWAaK62yViGo52KYYVA4xwJraMRxJmH/8OSFNCyd+wy\nMda2BFG6FTmKDr7T2125K5dUlhTqe2rFcaQeO6LN/HBAJm5dJCD2KJuC7Uzk\nsIbSYeaoDJGPDy0MvmHRP9My4M6I5V3ah2CT3wIz8CMxlb1Go8xa32Ck8zeO\nPDC870Jk4gslhvLSuZwHz8YZObY+9wvIhGrZwR/T6m9MS6j3qv01mXNQpYuo\nDVIi518Co5SOPjp+4Oz5oe/hr/uDIM339ihwFNgPjfz27rbXcH3DUwpVDrz3\nsYSPKR6A4k2ZA0vY0yfM/gOxXR8l5/TS7D+pckaJ2pHMZt6kB53rEb3z7VPG\n3Qt6jnyLM+BkaO/kQMIlnmpNR1SbxLjne0OoUSut/KsfXY2Xc4LaJZ8yzl95\nyrOl+6dRilMYg08ywsB1enetmaFL/ytLrxgpQDVJMJsXafHr5QBqZHzlyXuK\nH01fKzs9ElsqFWqtUoRAGDb+eNa/THl6mn7a3/C4UH/71EDzKt3oq976ixbf\n8zbZ\r\n=LDm6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-66d97a7-1603838863279_1603838929833_0.86076190295391","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-a819648-1603843155073":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-a819648-1603843155073","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-a819648-1603843155073","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cfe950f16934b6ef4c0dae1a28b75adcda9f51a2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-a819648-1603843155073.tgz","fileCount":7,"integrity":"sha512-vLlPqBrK2IgQKD6I6ohzhN39Ox8sNVPesr/7+vtvgQ0yCUokR2wMu3ZAE+PdaIDo/ZDjRabOoFdByHLFgJ3jEQ==","signatures":[{"sig":"MEUCIQDsC2IQTctU6JmPtFL5x7ZB2T0oSwOfg2OU/HpXf7lzlgIgQAvvqSWG8Dx16tg8ChNTI0AiHbWFtybNo2m7MbwknHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmLSFCRA9TVsSAnZWagAAhW0P/RqHWV6y0ewv0Vfu437E\ncwBpBhvj5SujWZhcXCnZFCj36CKUjewMIhpTA5dbhSTLVjRrr8snBHLchaVV\n2vzQvyQkZz0EQgow3QAYPp7Fh9mnz7mVk2WLM3artb30e1G0Q9+6Y5Cvj3MN\n/c5rIY39ZJ+8Z5Owi90MY239IGOWxrQZ2H4CHvFByTwUMyhGVriBeho3dsZt\nvUlC9pGi/VDKqOnytsPtas5Be3TtJiDRT01WfR40xh7wYLImrGjFPalUpw4Y\nYlUsJzP/fi7bdG7cWapF9Oc6jMwGDh8x5TEPf7HI/QFkY31e1Cny/pUNZDfM\naSxbg/gA3dM49uqSNwTbs8mz9WHYdUDr/nMnJSUg12dSMFswbIcK2WGjWs0a\nBsxINqexg62QXDLYGARGhxgKz6fEWQ7omNTTYcUUKxuZ0qwSCvBzgWf8yCbP\nORmyNBYmNORGwHlQTqhrFBdBe19oAP5q8PJULKr619b3E9/kXZ7Bpz7dCpGG\nBIJUStQu2fC2dcm71LbvlLBCjxv98tPBUpeRNmsOxtRzxdFWsBtN1I7wifWZ\nw+NWlxCbG5gCmhQzrQ3DMWMvYTpeMV9hViqtaDvEg6sYp8oyzOtxxA7xTL/h\n/PxbqZIE5gYsM+UYLiYay/+pIpjabqkiSvgcOD6pxPIgbfc43EiOWuKX3wCn\nATSb\r\n=xFtb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-a819648-1603843155073_1603843204888_0.552412959818638","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-a819648-1603843151765":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-a819648-1603843151765","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-a819648-1603843151765","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4ad5fadb14b502dc236ec9060feb3187c659a4f3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-a819648-1603843151765.tgz","fileCount":7,"integrity":"sha512-5maAAjSRs8hCF+1i0wIQxBgkcBYxGTO8w5pLh/Om3bAtPl5S7rOhN6MkhVtZW2yjzl9WrEBp+h7nazNcd6zm0g==","signatures":[{"sig":"MEUCIQDgAETR/a5JThzyA4k1/yHJOMarYq7JQfwMelh3MwHeHwIgetqZHW53ydKSAyEH2/BiQtJtqM/7GsjG+zw4evZqJJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmLSWCRA9TVsSAnZWagAAjlMP/jQ+nxvIoROo68UJ3iRz\ndaucgF0jBjMVm2g8OsodQwPwxEdalB/3gvRyPlDvBsJSG3LIFhL9iUN7DxAk\nHDzxTHwHboZkZiO9LlKjVBKasa/ipXrrUFVZdkk21MjNdOGuLZ5v8j20p5Vy\nbE2J9FfQ4YFkSwe0IzWHnIWk4QrW2WqdTEhUpTEQ2AD2xweBFCDnk9ydios2\nkXMoO8/f5XIZyw1ZRAVbHqmzANB3h+N/dpaWYKTmPZAINcN74PytDKtoI9vb\nAXSfiIEmaLNHy/2y4OkBQr8djwy7ZlT/qH5MzBPXPEQbsFKoapyc1jxrARjs\nklS++eMs02MNlZ4tg0x4Ms1EHDAEG23EJEUT3aY/ZP4YU9dJHVk0UwvOixLz\n/mTXe5jQNalxxqOtt/w+U2RJXlr3eF0t7aGRIUHW3LyaBzKL1/MOklS7Lql8\nVKDJocRu1lqOXioccrc3zvMtYl0PMCG6WZs2c7fZO2IuBGUsU5L9qtoA6qZx\ng1S9yFkLw3aRrAMC09IzxAPUD/z07HavGDDwSsrm7FEGEREp8bbiNj/O+8BX\nj9nwlCFlgmdvCJ35b8WlA7TBmpSe1LAsrbI7zdi9un4KqOrkxt5+F1eCKOy6\nhj+pJDZ0lYIBHhm45zSzzEYJsUwKAezPv48M5dLGQ6PvgX30vOWgRCyoB7J8\nigQN\r\n=VwQZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-a819648-1603843151765_1603843222021_0.35890887369792424","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-bfdf0cf-1603845337670":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-bfdf0cf-1603845337670","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-bfdf0cf-1603845337670","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"aa80209d38e2170a2507f76bf01fe8dda147c59a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-bfdf0cf-1603845337670.tgz","fileCount":7,"integrity":"sha512-RXneyo1kMBsqvP9/yw4bXPd2uTzDKkqBfOWZsO6JZoxZnM7TnFPAYNox/QFFqwu0nJT50doaHo69Ym/xui9dfg==","signatures":[{"sig":"MEUCICtl3jxdKqoxXi+k28rpILDBOL+nosWCarIR/iKKmm8gAiEA7lUMIfJ2jpinfXTkXQd6QcVNASUmLYqlqv6vCo4KGVg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmL0LCRA9TVsSAnZWagAAVEUP+wWbrZTeCIZVk7BIhoy3\nNBhyD9Mi/bQKVg3/veyjoCzs5kjSgk44uKCVCb950xYKCJsAgmr4iHq5ofqL\nzbSQhQ4q9usYISlyQZP6gCbiutmK5icdSkf2ghWM6hOgRyXHQ6x26PLyb6ZB\nHKSnUZrLoxTTIxgpCkhSPFxtNiSlHfoRn1BFoDQ0uYBsaeQ8TApMhz2zcZkX\n/IA3ehUmlc/HJb9WC/co1FAeMOPfGCCVSOBki3dctBYRt8kwHEX0T6W2SlWF\nryPVdn3fcAUCn8lVpwjd29Kf9vnsQ1flSrUUCWRUkeyVHJnvad65CvSv0DZO\notAfPkKi/iHJWRGBsRl8w+LY5yiL2vbisndc6vOYhCxmT0hxAUszhbfl1nQa\n2DGlTu1Nlq8SH1BlUnngvMnLoEJnPyESGVPQ+k22es0EIHtQnOjfs5PzCY+z\n6Pb4jEQlUIjrdMDfUm0w5D2K5xMexygbjIxvbKGCFTESjLYK7/aI7eJe9Mhy\nl+UWb1atTPmNcuZ1hBw9RPsyonxm+jQKWfH2XsZbwKfXTYPVjTA4V1nMzWGb\nRc1Wntq+6xWQM4wE02+DewA/+IngWIWHTxaLCMmMzVEuFUfEuW3Ju5vD5dvg\n+/E+b/6AXx1AiDELaB41q0997UW9mGQ1W7GfRJo93nUgIhQLY1TGaQJoYwPo\n+fQG\r\n=zbng\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-bfdf0cf-1603845337670_1603845387048_0.707825049322103","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-bfdf0cf-1603845337491":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-bfdf0cf-1603845337491","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-bfdf0cf-1603845337491","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8099cd54c84f9711474fae2d69b7c1a9a9158774","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-bfdf0cf-1603845337491.tgz","fileCount":7,"integrity":"sha512-6OsTm/xt5Lw0Y+M9Do0y2nLezbF6Xm5TmJsTQHKsd22MlNjThFs3YxEphUe6M5ewZKEH2xcqvoCp5wy4RlNJfQ==","signatures":[{"sig":"MEUCIDKMnA0QpESSddv3SfdzKofRlNOupMz6O1zLs6gWDZ9rAiEAusQ9tS6MHqmIEIUaSqoFllf5DCHY4tagHEIiclVYdYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmL0fCRA9TVsSAnZWagAAY10P/24YRGjnBSX4TDkwc6C3\nx5163Z6hrDeyuvnnGTK0rcETRNQh3pC1L4KyebALWDRqxe2IfU2GdqsrItiy\nYPsZ3xnevRDPR3ZvhgKOhbnNdZJ0uYP61f3bg41uYRg8HTiUMbxzQLOXfI9a\nK7G9mt3gEgMPFZHRavL89r/PK6nk8F5OQgGPHRbb4n0PnHdWykWhnEIn2+Yp\nPSAbk56botbNl8wdV7fYOxvlyHjnu57dvfJQQeBPvZtiRlGVKoFERWXf2lwI\nt1thv4cVDYxVIuy1yR57Qukuu4v8hp8wL1s0/3vLPk6RQpGdgrwXMnN1dMvJ\noxBPxrpxraOls7KeguGQGqe7rqysOPpFIiFphSEozbmu02PnbEWa+GKxzti6\niQOVOq4ZKnHDEvLjO+p8lUDfbHdy24AdDSYfIIZi16QFFF4iIbfLoKz1Empf\nS17mfVMsaUYyIijR6Gy7H/4zmMbrWlz7hW40/yC+3s5YECOLfShffosiNu1m\nTCdnXWNZyErQGTwgHfYNSdkHOEx+Ds4UaiOmA8Wh/nT7Oegmv8PuUTUSRKC4\nk9S2c/P0ZVm/ZjwZVZKeDFm+2Qz8q4lyt0GBpVXpi3aM9bXzqdImqMtTHzmM\nEqLSo6fMcMIMaUJk11qIdm4fmD9IHZhb8sCTnf2NY5o3Kgc0QfSviYXhHMHJ\nkPd/\r\n=irNi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-bfdf0cf-1603845337491_1603845406848_0.45191581147106374","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-b455a99-1603850840897":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-b455a99-1603850840897","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-b455a99-1603850840897","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb0b0c7e85f18ed9f80fe2e5c39a3a99d862af75","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-b455a99-1603850840897.tgz","fileCount":7,"integrity":"sha512-5QiOc7UGX3l40HuXNdeb+iypQVKQwwRUvrMS/fB/PueKmDXcyj6lB0FYZ9i9Dqxj8FeVA2Cu+ylu0F2+RaGcqg==","signatures":[{"sig":"MEYCIQDTlRE3Zup+6/IIRy254Y+iPAQWPJ5B05BhfqmGCw+EvAIhAKe7YtVMYRNFLf/3jHS7byXcSwA3SjA5hhow2qPm5E9d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmNKTCRA9TVsSAnZWagAAI08QAIZDO0OTtvIWFSKZyE1Z\nvaBlfqcFARRSe5KsFxH9Tor3nYPgDYDqVN6XNjCgzuQUmmujjaKLjKBbwBWH\nKl4EVrMEHcH2SNSkuOowKkwyhBezf52egvFRdr5N5DvWLB659C6E2azt/act\nQndWtB4XWxl55lhtJ4ZF93JTPjjceM1nG/jsKirfDa53C6eFHe6n5xC5R23C\nf+BrIeRque1z4ONsHBbJ+eU3JT2UayKYstGPDzqrQXna5DXnz2bizBpTPVZ/\n0gaeW2LcEUifZTIVJyOO/YgFYigRvHFJ0aQqBBfK7AslO2pQlLIty/4Qg3QU\nqtx0kmHhH6sWq124zNOx5Fahh/m26YTkxch3jR3vE5gThZ2XIW9bUJviMn/b\nslKl5lW66IVj/RkIsjg6gg23sLlOARanT9vREwxk5vl2axqW3uQ1yZiX3TBD\nPxaDKBo3NkvRK9Y7vfyQK8/q9hjf1QoE8xoRtmcaVPNVsB0O43ekNXkvfNwl\nWq32XH+PXQIb5ZlfBlqXawivj+gGvXPj6gJGy5JAlQ7Lm96vuqoYl0U3WfIc\njt7N8w/KAi9/hCK8Mm3DmsWdAnF83LToFTbeDuU0LwzaNb/6U9m7PAVHh6ed\nAkvj+fZShbEzV4aC1rQkc79uqinWl5RMGQviD0ph4o8TH9+8pKTnBgl78ZY1\nhT5i\r\n=hO9S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-b455a99-1603850840897_1603850898580_0.2988156959279431","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-efcae37-1603850841005":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-efcae37-1603850841005","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-efcae37-1603850841005","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f354975d0d78abb1d347acf7dd1fbe292349ad0f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-efcae37-1603850841005.tgz","fileCount":7,"integrity":"sha512-DpVVitXlIQ0G1q4eaS9N8Tlo3Xcla5A1yLRrUAc7lzuv8b+rZM4MJnifV2hS+cZva7q2plXNX4yFefH3//RwXg==","signatures":[{"sig":"MEUCIH5qRpDpDGxw4YHWyL4PhWXVhIHv9S50Fezl78VziKetAiEAx0JhqCG2i88AasgQuUxzU1bI+qCw4UqjVtT17enVswU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmNKdCRA9TVsSAnZWagAApg0P/RxdTtoaKZ37do4f3Gk6\nJBKnMNpVYwWe2q2VQYHklYl0cNiSd0d1CUjlYO3MY+7MK+tWFf2jHVKJ9eyO\noke5c+cuD1GNxA9/VCmqKplsNf2oBsXLe22Khdg2q3z87A5eHhY0P4eqLGnY\nFCyO5EfeK5znQzi5831z3Hp9uJ6adjZvyuALSFFzFLOAOc3B0JwPU2CyCA0j\nn2MiT2nIHCmUCyeNmXPMkCiCrrh1VMGUuQG0znkBVd4t/NyHipu/8fWgHP3k\nNOXbKm2Kn6/Dan9Ti/jVIjoJiRZ5W2NzkUvwzEf0hUEFxlYUKpbSVsMwG6dM\ntsh8kXba0FdFvz/42YvtaGNicM3rcWt8vc5LJU2p6ghnM0qw2T3LbGzHhpoO\n5O918VvhsPZfx2h2cbpKu67LrQWRSrvtb0W/UsZNNrInfKbUFrGKCXTzN1Us\ndweboM3sZ10Wrhuq2MAohJkB/YUkMphJfzAa0qvZtwq5HnsdJyJ4v1cV2LBs\n0N69LO+B6HlCOKrCr1xInLYA5+4/waZyDrgzREfQA/ilkP30UCMREal2vFh6\nKQ9Dyjxs8mvNJK21Yk6AYdTSrg4F/7iMDB3jnICsxDki6XrB7BbT8pvO4AqF\nFGnYdgWivJXnsr5HTz0fZiQE8A4Ao7xR+9W5ILGImCWLuQwe0TzDYhok90oL\nK3yb\r\n=vpah\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^15.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^9.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-efcae37-1603850841005_1603850908965_0.41934225114159895","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-c85f0bd-1603908818474":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-c85f0bd-1603908818474","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-c85f0bd-1603908818474","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5eedac766f63155614c29af07d802be6c34f120a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-c85f0bd-1603908818474.tgz","fileCount":7,"integrity":"sha512-o9tIFsakC6JBv/dw5sGhWyoilIBlMhAumIKt78egAL6tpix8pcDWtLB1ol3uWsX1/fb8PeEnARm5wCWtvz1tWQ==","signatures":[{"sig":"MEQCIC+y4IT+fv4rOFejegSYC70Ak1wS2XJIsxz/baQXcgkAAiAQwueSC13Fh6DHmLO+hWw4xEZRAF1AYAjalkYFZQuu8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmbUOCRA9TVsSAnZWagAARRAP/ip1ldV+s+LvNpQ3OPsV\n2NCFzI/SCh1cTLh2zQQq3PXksg8Vich3jR5gMFrMAk5qBZ3vLnbegVuLDMbx\nOfJHoG9gXM6gxzdYPfE19yAsxnQRQ5OMGFa/CckABApM5cG4VfqvRHP36CnT\n3YnGp3xxxcvWeVr8ugLeOPAkJRJO9O34SUXhmw8PcaPVpuWRLU24esB0GWra\nQeCfysLdF3gEzyrjuGTR9nLEJjRS3ksTIKDaFzcGCqFlcqamRIX4KT9J2B6x\nMkK8GC+t5KguodAKN8AKEZ7tsCTB6OLQWLc/ELFV803acTd/AeiJ2Aq1Dvdu\neO7Uzmyc4RwP9YXSseyK9OuQhISNN5qooS9GKiHs2Ro9lJslaFOBU1+UhiD4\nJUnDTAGSzVotbi9JZTzzCoHDpg1Vt9XqhUOOUYcioxmQFGxiw6jTJjMFnBJm\nq0DW9L/hcb/7skI8WnUCr2X7y7zoaZbONdi+ChVrhHKGYikWhjuIp/iq5afd\nnHextNoRnXaaXvH+RIkwNplNsjNVaBcxQZZVk7M9nrqX614TzuT/u112rzHT\ngvLm+j3f2aWUiZZqMCetPLrVr/GvPozwGHJ6VVZ5eSR3KihT91IrlBFoFVbC\nBjRCGZtB1LUvGZB7oyPPFKY1uMK4wb+xOFlxzFob2zcgyttxV6Kc4L3+TQN/\nKHXU\r\n=36fS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-c85f0bd-1603908818474_1603908877639_0.013686468125391205","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-9b1698c-1603952768991":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-9b1698c-1603952768991","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-9b1698c-1603952768991","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"020b6eb0a16f8318832a237c5d795e64e97e1590","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-9b1698c-1603952768991.tgz","fileCount":7,"integrity":"sha512-CJnMiHP8Bvdm1Q4NJxSGtkMWacUiLBPDMc5Ei44QQVz5EQA1W5UjioiZyKoPrHdoqNhbnpRijh8poH1uUAQA2w==","signatures":[{"sig":"MEQCIEkJMC/qpBXhuCLIo/w4VWwnpvvW11ScdYReF6+f+m8eAiB2hwIoGYxIoRRG26/Sm1vDSIyZIDeA2DQa01NuQqFfNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmmC5CRA9TVsSAnZWagAABg8QAKR4XJFg6R187u2cRNvy\nb1T4umSCc6Jfj57/xAzWx93OLMHOvBgOkDGTxvcvAT8XINUv3mPw/DmEBtiy\nWCOd1HRbIju0n/z3QFHj+jaH2KU8cZbgcGjT2HJqBDytE8Fck3b+20s/V3j5\n1VDs/POf6xvtUOfR4/9t1BS95IEtKhU1WzIF37ZKo74sdmKuM8EnVRbDjF+H\nWqim/9NLoLND4wmzWopQwIPnv30yjCNj8INPSoJ7Hd6IC0irc3wBC0zXszTJ\nfYa5nfJMX5CSygyyYl8r4FO2HhxJmWcttnNmDta6eYUUIktxJt6kQV6LNWeB\n7K8prcyxYEoGK3hzuWEL/MPwTxy0UC0Om2v2hlRi5lLVQbLrT2AmkqPr33HH\nr9fUCmu5jlGxrtco4Zpiks7EK1axGcSVlraDgrFGFCbMUo000GMN6aB1Jeu6\n2FFfzqgSI4XvDdXh092IBBVRRAgE1Y6iQRC5ld11a3AJ8Yv7xdY/Dyh86Cio\nMGITwq41NL+fimCfvGzY636dGwZT0YHgISa8F2G6S0MkmV7F9B7Q7VNvI1pb\nwxrTy9+baKT9enXNq2klo2Z3pkVG1TfX+eYg/Fv+ckESoskl7RMV75qatWBN\nqhjCaaM3DW1AqnRA8+KddwGBi5FuMLxA0OHfdvNebJa17EsO4mbCHDAPJxAo\nZU1J\r\n=18C/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-9b1698c-1603952768991_1603952824677_0.6450555269244125","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1132fb7-1604048527125":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1132fb7-1604048527125","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1132fb7-1604048527125","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"46e27d4ba08ee973020e624928230aa713d55597","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1132fb7-1604048527125.tgz","fileCount":7,"integrity":"sha512-PyXdACRUAQECVdCXwTHEqfcMqUMT7JLoGEutHrcgX0QHSFdC+8EW54I7DzfBfNj8sqttuNF411a4p4ZjOPpI/g==","signatures":[{"sig":"MEQCIFh02N0f4fAJ6B2nuoiliAskVmxaFC4nHWIubQZUrx7+AiAfIJMCn5zevC3rKSVZXzYFqKxEUlACuIQ9k2I+iRFdNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm9bLCRA9TVsSAnZWagAAWyQP/itT24+u6YX7Ds5ImvrD\nDQ3yH4jCkQhA6w+xqBCnz/MTrRCXH4ZQXUyvQ8UHIpWISTLi/p1WPm2OH622\n9ZagzfsRAgniT9YyK3FJeZU/Ai97UK2rFa+XBlCf10NsdatNreQm1ogAMsTM\nhblaWfn1Zvr8KATiLTs9PghDm0BlWd2R44KpelfWOeU43NNoN22ZcnhNUdgP\nOkA6gfsaKv/wgrwVUbIg+zUhVdB9HwQYJuMF5BhdkxGI9Gk437a9FBsmp4yj\nYlxtJNrBtV3al2KZf1l+n5NOjpq2V6tl0WVatRRPA8aW+Ow8//RZDpiKQxXn\nbfnPXhi9ktKSbUpyw8gNo6QUkZVE1i0caeX+M8gB35AK3qNfnc5BRAXhSwEo\nkgH24BoqDnJA2pE8YkHZS6ru2sSvjVG2tBuWbUUm+oHO+WK9aL2AYhVpWBaY\nIS0EW8FpfXVbuqualDT/CpzvXPh7GalrNo6YFd3BWIXEshYC9Y72yqZ0OodN\nojZqoOEORuoaB/BHncnHe5sI4h9rnl20tPBTak0+4oY0GvELO3vhNyMLIE3U\nNBvriVvJ2/GMuUzYO5y6yYdPbVsUgVnl2g4Cj7WGhtcBldtrMu8B96JNRCfS\nCdSjQdZPU0WHM5xPQl2DPQuTdXlkOInlgmm60HUaXd5utL5sjFEr/eGiEHBx\n8/B2\r\n=FTpo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1132fb7-1604048527125_1604048586754_0.31085922140984357","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1132fb7-1604048539714":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1132fb7-1604048539714","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1132fb7-1604048539714","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4e880604a291aa0338aa475387450ca47ac58490","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1132fb7-1604048539714.tgz","fileCount":7,"integrity":"sha512-1xOYmQczj7qCmvuYSCuggnTSqLbzzL5Hihwms61j+td3XjXYC5s7KjuW4DH6sHvsleKk2l3TLfmeDSeMBQN1Fw==","signatures":[{"sig":"MEUCICPYHw2TaXam+qy1hUhfKvM9iaJ0mZ0otsh99y2qr3aYAiEAwWMnGucU+VCgQ1R9c2uEn9Ef3CIC4IFGE4W51jSLRSQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfm9bQCRA9TVsSAnZWagAA2bIP/jCqnxNX3xMbLvrBQIpH\nf6svW83kSul/Sepk9rmqxWTmBCkyeDSuhW+LzCi/vXePTtq6en/2VF0WQeY+\ncjktTk8YM7cIBSyYFjzVn7TIgu9ICvqHf7kekXfY6y58DXWee2HA03qrBkPf\nOI/C8w5/S3M2tz7epnRUl7Y78Z+sJpxXPO+rf9xnEBg8GDW60Du/YnRpxj3d\nngtHOZce5nM+UdGjC3Etpuh1AwDZGwFgHRbI3ZIEQqGUcSbvwrk7hiII+pED\ngxR4Mz067gekE+klsm3EuBJAxBGlS0lri5rz1QCLy8UhwV1XlmbipgwciWZw\nO0Fhx8TE/nOz4TxlsPekXYqtgH2fkNYLMaCrYdcwvfNU5jBxrRIGy/u9X3tR\nchAC8efIGPXvX7Uo9pVpiZrW+mKytsXDmrfTlVHvsSA/R7xKSZqRXWcHYRZx\nwmPCLf5ZgVqJnMmaWyNWrWx8/aKgNIgt9wuQxBJ7l5qqz9JfRVD2zhYhLMzl\nSzV2g/X4o8dMcmfgv7QNfgA3ahTHcVnU9nyifRcLNgBI2hsVMgCEVr2wBxAp\nRFp3ebFWSh7V2GbTsjsqdkQVJz9AZPMUmA0SB6JdPAg8f1WB+AikjnYyNHbl\nDgxw9jLXurvEU2ZUZutMPsbxQuepaW+4sgzczzlCZ4Q59jXVonCsUk3595uX\nouLz\r\n=v48T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1132fb7-1604048539714_1604048591867_0.502438270444389","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-d7ad718-1604068305968":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-d7ad718-1604068305968","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-d7ad718-1604068305968","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"215c44af2080107a56e84e3db2dca8f6d9ea4647","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-d7ad718-1604068305968.tgz","fileCount":7,"integrity":"sha512-x7slg/EH//rsvK5P/lA+h3UbvkFSN6jVZryNkkbjr5WhjA5p5L4QkbwDnGKNI04TfzX2LqxyWHQTUEX+7XQmDA==","signatures":[{"sig":"MEUCIHjMiPTA6Edy7ekNG8cWesWb15oy9wLdhTux/ngb1P/bAiEA48rG6pmrGmDGOzKgP65R/LeCtVhpC2uDY4440xQD9Lw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnCQDCRA9TVsSAnZWagAAb/YP/jpTo2fdfYF++yGS2nbT\nL3N4S3p14RXZtwWW33T46Tx4/+2Sp6hfRFJ4Ms0J9fYs7vQ+5k15B+yxnS1g\nGUQJdQ9u46VC1/4Y8PD8ZZKd09+l3/MBAQ5RiB/Q6tpJZTD9JB2HlHvaSl+W\npcpcQo3+/EWepUM75EaZTCkE5LCSza5k2uscCDlvXiSjzu9AVr7dHf8bbMjt\nnLHUD9WYjAYoSMO1N2OfzaI20b7w01CaIlJCTZ91gUMTsrYfqU1tSdpMSPa0\nxdPyX+esYWOI5gzNh/dBp+6wdHT2NJ84z8xZajQtMrpBm0wuH0Rn6CUN9kJD\n3J25Squ72I5h1app8sftpt84Khmqu/ehEQDqqa6lzqglaEP4w7eBfTewxcQd\nWs46IfMlnudTNHuyI4bsMhm8zqRYPO6iCCpi1INJNpNW5OoYQidUAVEaBP4q\nHnz7qP2rf7bzYS5t2fNb8s/c7yYKZzZwSkKwjDz8umP8N8UAesJERsiefbcg\nWqXpZN6/d1BR28MqgQwHzLzUEWaMvD8+l4Dumv7ybagCMmJNJnJr0qgtNrXY\nfIivoKyhHKzK1uzW39//IX3y0vug0v9r6cBsicvqNlc6bHI546z07XNI1TkF\nOerFtFRXglba3adHmqSleau3FLNbdN8m3YS04FoKcS1lmLr28myt2LgvIy/o\nsqVv\r\n=YZEK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.28.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-d7ad718-1604068305968_1604068354794_0.9614932710838637","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-7fa3f70-1604107111035":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-7fa3f70-1604107111035","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-7fa3f70-1604107111035","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e0321f059728ce050b54efae305547acfb402753","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-7fa3f70-1604107111035.tgz","fileCount":7,"integrity":"sha512-FyNCae3GI1AlFd7neY+MODOiW/lU2fRpelrzHEdUGH5+Smkn4WCftYeeIBfHtNdQEYlP6BBkmHeOf2Je4kuC2w==","signatures":[{"sig":"MEUCIGrTUHpy1zNlC1WmqnccajhjSk4aZuWteS6iS3pdcqyxAiEAzvyNddxBDMeZChX0UGevvcUeclEbKiUYQRK6/1996nE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnLubCRA9TVsSAnZWagAASLgP/3PVcxhOXVE8MXWECDhx\nsBxNaNAuVYt/7X6Ax6fda/aONHR8gTm5TteufIvenPkX7VfrFnNG0aCDU8ic\niJduAG2O4/vOyg6qr2juRDuldj0EJ3TVyLhMTWGaCQ8aOTQ8z0ZAuXQWUlTw\ngAGvFGaKxqVMr7okgYFXm4N+2vijxbhuWKlXgeVc9UdZvLNsMnxLKA3mrSu/\nnYrPdhkfZoLyV33No7vKsJTpdM1v/q8WgAnA26dsK6i8nxibyCoIbp4iU9JM\nkr1xFWrwx6o22b321eyoQAe7kGC3io0f+VRTJDz3tG+fWQ4Zdsgsz5cDw6l0\nCHRE2LTxlqLd086lxLXg91hEW/fQWKylY7UrCFsTelzdvF6D2DVF/JCP/LVQ\nxgH9SiOMfjhw9pZsQ8FcN1N5bQhttPE7xsVxrI4R4SVeJGGBATVawm8jIuUj\nd6WlwF0dY5zIOApVX2RHVSjXIGNkyULTWgB5/l5GgIY4jX4RhilIdgXO5oz4\nLEofkuOhR5XBTMMNd4hkcyQ2htg2jlZ//wJ/sEQr47eZxgMIUof1K412fXiR\ndq41nmDVK8IDerpX/tolj+ceDCCxdMQUzrFaq/4zFwgKnxpiZ50i+egkTxvp\nvIG630UMXipnd46YyEyjbStznyoVfKd8wXNdF/MCBJuk8EcCP0QvXDH5jKZh\nRAlO\r\n=LX0E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-7fa3f70-1604107111035_1604107163066_0.8002388847774329","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-7fa3f70-1604107114981":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-7fa3f70-1604107114981","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-7fa3f70-1604107114981","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"603d517a1aa85a97f3029d1945464186f85af382","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-7fa3f70-1604107114981.tgz","fileCount":7,"integrity":"sha512-3+drWoFjYD2hyrYvujIFcwdDVaDkaSXCxyM498sBY94XYJZxEZUITlqWyDGdObuiT7uWSn0UR4h43N+kEW3UBQ==","signatures":[{"sig":"MEUCIQCFg16kOHhqLrJm7N75GCnEu7GWrHSpZo1VPQVbUCllPQIgQn6e5yHPDhnftcKRwcXuNiiZaivErh3NyzM6IHvEk9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnLulCRA9TVsSAnZWagAAAmYP/Ry7iJMiplRfsBk5C984\naFfH8A/S3mcTI6UPqUFXno4Qp8bM6mJkZ0uwZ2AsLyxoTXyPhNCxnRfH6fEp\nlqYa4RBo2b6JZLIWxehbm8rhUG6aMTTCev3PK2GDVscruKUdj4nSaUv8xt+f\nJukrHqQujz2olNKXQy7s6YpVUjPa+M5Xjw2ax0cJ3irXsXd/8IXPDAPhWvvD\nCZ0ECLAX2dUK9dLGQ7GytKo+SGlvg5yLkBI0W9ECgfo2wtWLWuxSrLlHc8/7\nOB2bqVlAnMqZlKMBY4C3mBujXAQzTkA80CsOdtbJXSLohmceyEGugVFbUc0J\n7NhL5uBDjsZgSmb4m2PIYv33fiqABUHfv3cUUNQWL9MMEt0EcFXh4RV+YUR3\nt+e0Xfan2Yml44TuDt8zxYiWHv1vLnDEcCogV4h2PZwccFcvb8JkqnSm0rSa\no6aj+QbeqD5YjpvdSDBfoaVkFvudQHeSuwthZhTcmLTTaqrABhxRFjANmbXc\nZJFXpCoQFTVIVT/kYXnBVXxEMSh3PPwQquYI6Mx1n3d2XSCzVI3x+4qyhXEu\nSi8M5C0q0i5DJftdtdRBPusa464/Awb7fr28e5G8jS9krLBpEQC3CGpTIG2W\nBX590XVqABRYY8RDbG18TYZKOsCIxrPayYTMFH5DMjhCowHkuSko3gMUf7YS\nhmO8\r\n=ZvLU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.32.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-7fa3f70-1604107114981_1604107173098_0.08032684253624378","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-6624ff9-1604213899725":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-6624ff9-1604213899725","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-6624ff9-1604213899725","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fe300ea2437ac6a93c3124c06341198c97e316bc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-6624ff9-1604213899725.tgz","fileCount":7,"integrity":"sha512-EDWy1Q3u0Sr1EjD/FBbgEOU9CM/YIDUNukaZF3TRDRenYWcqt61z9Z/vB6MHKH/FLn9KoJUnKJ7Ygd+UBu8hcA==","signatures":[{"sig":"MEUCIQCthc2Iid77Q3w1Lhn9gq6J1o/rcWw6dU6JHOYRNzAi/gIgGsyISaV5FOfUgeHuMmTJuqoVYD8aXBBAaPIDA+6DLnw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnly9CRA9TVsSAnZWagAAaToP/iVE1OyHi9rbXejJg11L\n1uxDHkp28DwoUT/volWdHtIQLipoo2ce4kR222XhqxWeYutlpNO0y97nUVGZ\nUQUJPXhjmmYRYYzaviq/vd+cByxTiWYC7dtma3wEeWxEBvdcvJGLWEukkvEj\nlkm9qUcKvMD5ixnoZ8cVugs/EvQdrXJYRJXa1ngyrxoZLMqD4YunQeet1UwU\nN6MJdJGUMaSsUV9fAWTT2pVH/uIWiYvYPtDvmSdCBHoI6OmTdBwJeTJ8mQIO\nO2eGwQ90u0Y6kUBF3BouBubWU89Hx1d4Hzoq6ZYgV4ANyYdtyPmmbzxFhLmZ\nF8C+5UULqMedeIJ1+SSWhKHplzwkrlKcNiU3805wGWRovT34hgX3zIs4eFuZ\nIw/4ltbTPD1i9sWYeFYmwcj6NfDcKbpMYNBhiPRcB0JkujLCYYxuU5PrQOvj\n7CiECToLLqmMhR6QFo2gOmzlzXsUkyp9GZvbigAwcrvgzEhrLx8Wu80DHxlx\nja13REpb7gYIQ8CtKWpn/Qm4qaLnGKymRd2bZ2LVdYAMcduttkX1M336ft7D\n53ZgSc6VOuoxUwNw8WVnXJLHv5iB/zpxuCr4O0RAp0GzzJhoN7044ejFR2vI\nUCG/xLE/01Hb9KTUD37OVsiMJgmP2zbQhzl1M75H7fuXbP04eKNE+TPL8Ru7\n+oLb\r\n=Rc0i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-6624ff9-1604213899725_1604213949436_0.6604584162888569","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-6624ff9-1604213898724":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-6624ff9-1604213898724","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-6624ff9-1604213898724","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c92b7ea02d31465d418e96f5af6d976c5fae0235","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-6624ff9-1604213898724.tgz","fileCount":7,"integrity":"sha512-3UQg1J0hom6YeDU9JMTM5gYrOK9uN0Jyp9qQeL3xYaptzF2It9b90FAwKRWuxY14gYZ2Ra5KTB7hP3QXsPpzLg==","signatures":[{"sig":"MEYCIQDePy9DtkA+zH45xYe+AkSsjsBOu/ysI23JrWYpIGYeHAIhAJmzos5T+JH7SVvkxoLfu3Qv7QrT86r2CtFShQ4RiAoC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnlz9CRA9TVsSAnZWagAA2GYP/3eYlV1CAnI9QZtUPSZ+\nASkN57kNnNVlXgBMn+9naqo6VSZH2x2uHoJZyYEyshoDK676TY7uP2eHC915\n2HHqxvzTswbc0IlL7Agm/siiYhkqcwKNxEV8FwkAtJ/EbkvU+A7AhKx1qcQx\nulmHpGfFkguLldY4q0FUKN1yYWkJP/cIm5be3a9Elzqkc7QGs1kuSKk7HxhL\nbou1REfn7r1Fo6yMOuwg6dED5PGkvGXa4ONpiZnyqKe61B4RFMjLS42Rlp2+\nuk66fpGpDp2dypsfWw+uamV5BvYmnIj3X+4LeiZEnXeAjP55HrPi9hKFJMW3\n0Mo/p0VIB9CrkhCxuzRZKgycbjf1xSDUWQ39X3ffBBnwMttbaGrt6hsTeNBB\nyRdp1PqbGu3mFw8fpQlBYDzu2aHk4uVKsjkdahxY1ls3WvZJtZDkCSlaJsjF\nx4Nf9pK429O6L1FarWn0puK46zSAK3In6xfUSY26lXqCEh/gFZ8slMQICgJF\nGLmC9+DD2KOEqgwFgVSa2ggIMYiqZtHacfGFh1V94vcKnZtnFYjL46NBxr1e\n25rTMDftSVlqh2kq1++1uBFVFs9DlKwxFjKTNQaFcG6qzAgnxwEDs5WdmKfO\n8SJAVaw9RT/y0HLOUqU/X+B8zaoiUeMcLaGh3XjHf9sTMIBVMZFJIUEgNSTi\nKFV1\r\n=y7xE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-6624ff9-1604213898724_1604214012596_0.7440820940407042","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-cd85727-1604256862404":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-cd85727-1604256862404","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-cd85727-1604256862404","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"95bccd0b880f13c7eca2e4775c92029e8a66e464","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-cd85727-1604256862404.tgz","fileCount":7,"integrity":"sha512-4LYRU6lTwH1LmaGiiwvMIghG4jo/FFqNV7yP84BnrDrw2RwCcyJwlQw0wxD90QNAJINZG5fb+4Zm2GEf8y+tuA==","signatures":[{"sig":"MEYCIQCg9r3iyOaPIzAU6iWgM+hE7ooa5c7dj+8EZnCAjHCfHgIhAPC/Zm7ZDN4w/mSq6kbczzcNswER9BP9IaYEL7PFQVDt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnwSgCRA9TVsSAnZWagAA5MIP/jscA9s4c9qwj2RXzWUj\n9pAeyXmO3LJy6YQEbj8Pl5OKvh4OwKuuMuWh6Aveu9T1aJbBu/hHBMF1RdQg\nN919sTyYYaQoIxinLcQH3KetWabxOzLp13wOithvyEsdBed/ju/OmuUCUf/N\n0JbYckLCvONIepqImymXMhffJE2hC5R9TQPoccdxCKDiVHHkVu8dPbeLwYVe\nk5rouk3yP3ZMdDgKkX9Aqr3K1y2CyVSrPWhAduDdD4kZ5Pa84t0r+iRMCPro\nw2HrnXAp3qrVOfQDSDy0uSknWSCaiz5vUoAwOm2+guDSUzMvINbWRFDAXu4w\nvpwhEm5oAPBQ7iTUGa3er82eUHMnvzTHiOVAsxkXPKLF4ZznEMEN43rIAzhM\nrhtwZ2ZMeXZ9GwMCs36aLt2X4anZxDAR591FAs+bAXVsSVCh5AH1bRim4CoB\nc96y1IcKmzFyJlaDTDFviSTRriG165fuHzmf76cabeBXVjj/TcuO/z1wyOn1\ng3rPngGa2Ltyc+LQ52ZSYjCDhT3BOraXd0rvEFDxPwEaP5SmuTFvPrBj0mSc\nHbupZg106BYK1DF5qgOvPKX0kRjxcWVbh0+dYxD+6b/YNl4tGXnW87/Ww8M3\nYTz44Nu++9fRx6KxrJ2LQQHNjKdA3b6gg4NNJg2kbps1/mJV7ZztKmI/NotM\ndQEg\r\n=hGT/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-cd85727-1604256862404_1604256928215_0.012354973299337102","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-09800f0-1604257056997":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-09800f0-1604257056997","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-09800f0-1604257056997","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cf82e06361ccd34b0094d30312bdad6c0dca64c4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-09800f0-1604257056997.tgz","fileCount":7,"integrity":"sha512-P4Y84t/PjmnRfsuzIp1HzOwH4arj4D986RNLWbP1YtVXZYVVuGAu8FwU0SL2zk9uAHxCjQUVB+kK6kEFKqCt3Q==","signatures":[{"sig":"MEUCIQCsdzavo6M9BLleY9WFnnFaOkLo+MvwjdA0YtKQw93IEAIgdERuEEaoBGWXCLc0apx9CyVCdlyC9356eZeDslsf1uU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnwVXCRA9TVsSAnZWagAATB8P/2bI04kEVDonvXjJo+vA\nhbTjIBtRa1+TuVA1qu2v7gswxK+CfJpQpvc2EHFRjh/Qdhr6iJULbXqLG69p\nke44ouPdQqzLtsmj/19w4zLZaTQh3iLyBCBz8kMuHH1LrUId8d+1aF97sn/t\nOzNlpqJBS8xZSWc8aqImKOjwqgIsRBhBHaVPSfI7CUq3VMsnBS+PGXPVaZih\np1xTLXEsGA4Ph/Cw7QLxD/UM+cP3SJz79/MiiTOSve8wGQWZRLw5vgyOZXJ7\nV3oV/NqFfUtW+NnBLGHpn5MDyaGsjbanb/+rrba/1hR88G0zpTQ5LCwApMZC\nUJsapJmeV4YMEXkTTgDGcXaFvd9G4rbv+xL7XYi8PyKmh7hRRnmM18iYOFZp\nrB3ncAECdJyrL2hWH/YVnf7bXC1//00E8Lxoe62ZQM7LIVF2gAezIYH9X9WX\nORDWQyd8wLEsYoi5CkvYdcyDUIVR3pJ8rcbfgLFw384LibqTfl9dhfSy32xv\nx7U9LOtIOiQsEPx6ZmkYlv98Kox1RL0Z08BHW25M7T400GEFjDgCl5jnqH7E\nDuFkqOJvLHakCac+xDrAR248YtBLV/zrX1fqJ1k6Jl5rxjAYTlYo+w7o3o3s\nClJz7QQXBeG8epnxks4K8ezpqwhhtopW1E/26GLXf/By960faA79+QqJm+GM\n6j6+\r\n=PHFa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-09800f0-1604257056997_1604257111438_0.2082424986917475","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-b8a75b2-1604309931014":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-b8a75b2-1604309931014","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-b8a75b2-1604309931014","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ccfeb1fafbd57b5d18bf874a7ad53b2849a34e55","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-b8a75b2-1604309931014.tgz","fileCount":7,"integrity":"sha512-o7ohcO+f5u6Rny5bRfftKg//qSPWuKw8JUfV8T0BsT5cCKwzOB9X5kAUEoMhny3XKPR2ph+K4rOS9d4kzqr6ig==","signatures":[{"sig":"MEUCIDZnX+KXbrjGGMtHNLGwQyiBp9RERHRS/oIjWLUJcRewAiEAgjPMQlKY/aHxN59MldH1byTxU06vyT70GDwGsnCdqtY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9PlCRA9TVsSAnZWagAAZUgQAINF+SiIZ44Tyt7KU5ae\n99gn6TJQi9U+EO0KW2JMGiy+xGJIaF0sTh3YiKUqXuvA9MYKseu9TZ6kHC8z\nhe/kkX8GNTgLZfij7lxP14v1zVAyqNFECRS8aGlap65SGbPTNzQ9PVnenCqy\nu0/pDSS+xjBBr14VxkgiF4nlupMLLGr4o469tAGlmuNltlzkxxrJtGaByoqm\n2NeLF5VXfLHhvxr3oGQLZa21S2BdglkEaRYjBmrtU8fHdUg5JW3lWWg64LG7\nC3kundLKtnnFpKBlUqR+h+TG0YLeQ2dzkyyaGeN5GjZDMuMrQ8Hp053cWIM/\newNNY09ZEGI/46UfxCNg1kpJmoapvK6lY7tCE91bphhSPMROZhFAa5Q75FnR\nq/iZQr60bLKP/81X47cKyiz5LycWh3+YJNri//G+IVQ1quN1COZ+kTDl37kK\nXugmLgEkwMARorzhrBcFMR2K1rsyLnT981xzPh6GK6GATzNomlhk1vU4OPEP\n8nE6828xBxKtUnLBJpGYjFwxJuGBQFDdoGOZZphD7P9ulB0NDUt3mE4/EQNB\nLr5P5WWo3Q8HAnrdd4qgQsAcHRVhLmluGi0WK4pNfu662H8SzxX2HPYpS3Pe\nvWn7Clt1p3W4FUvqWqsCZtcGLhoHXgu7CCNrr/IpAJnsegzPxSmWS/eXwi9j\nUyoR\r\n=i1Mr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-b8a75b2-1604309931014_1604309989272_0.4432200157584647","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-b8a75b2-1604309930013":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-b8a75b2-1604309930013","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-b8a75b2-1604309930013","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9ed354323db0a2b28ef86faaac5212ebae0c0cab","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-b8a75b2-1604309930013.tgz","fileCount":7,"integrity":"sha512-X/itsW3Q7LlOCeW0DjTegjzU+ZfKY0QwycMd5fhpJlWxzAUS2oT92DWZ7+odxUHojcPOjMqSZeSgXdVcBnlHfg==","signatures":[{"sig":"MEQCIHzVs6v4d8pnDch2oPygo7F/ZDg8vVg7mav3WoAfOWVrAiBfIgRju2+PjgJPmDctVqihm9n7oQWE6c+bawtsefjJEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9PzCRA9TVsSAnZWagAAOnIP/A36rd9Kw0jSOIj9m1Xg\n6NlgGyoWJlD0rCvNDIGVO7uo9P0kwgABKXIe/lBdQ8hfQmTmdtSiopQzfdTJ\nFun23AeZbkBQewZM8hoE+lMGwF94AU+MRFdBlMbYMbLVzJAnFAP83dRqEskh\nt0yf7ZFy0bOl2y0VSiyBXZC8MBGaYB75/zA6KrUVfy0e8sia9OzoqdUHNId7\n2kzli7/Aan+N2DOMBboiGsQWh4St8SsRR7Ktm/hJamBRjaNdk0TmzrtrsbTw\n11DljcKVAwrOPDnYnPtFv69QiIZHHgHHEd51W0sTWJVS03/6cQ4XwlWqfti7\ntjpW+kpnS33wlj+pDRBumwPZSD12iYmzN/ncyhHapUk5aeyUfrB/T94DJeuT\n2jwx2N63At6XL/l5zNckd8sotRxYWc547Fm9TXIXg7rkr4E/qXsJjrYKYuI+\n2T0JpNBKU+06fKw8QbyODX2t525hDFLIGnjJ3vOe+OJGctlK2ZCBNaJUEwjm\n3xdnwpwvT84euiF++Mnw7knYpBQq44bjo9D7KmvuOmmS0RtrTwrKmnsasBx5\nGOjWmnTrU5Sbt7mtm0lQI3xicxkA92mMR/Vb0H0nNX/2mQsNBsloqxy94cmb\nF3WBcdU3Q65w0DPSxFCAaTNiKa10q/q2fFIJJIq3+ebQvrLxZ8aFywGATgxD\nCADV\r\n=GbKQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-b8a75b2-1604309930013_1604310003156_0.976607114119096","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-87aac47-1604310672410":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-87aac47-1604310672410","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-87aac47-1604310672410","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"853576f8f3b412615cc7880bf38a7eb8d2494cd2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-87aac47-1604310672410.tgz","fileCount":7,"integrity":"sha512-/Rd1uZmwznSM9/xWRVMiJZWib1SjXAJyr2kqtqtwqO7QhPb7E1QB6S2bBhMgswca5jdkzXhZulHMiy5odB3OcA==","signatures":[{"sig":"MEYCIQCNMy964nkzN6Y6Wme/LRkyhIGlK5fX2HM6k0cpEjRRJgIhAMDBQUVO2B2EYkwD5Qjj/GGtUCGoxiZ6GM+gXNruFCzJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9bBCRA9TVsSAnZWagAAEf8P/1HPaG5RPV+SIf5ezS0B\njyWlw9T+ql0E6+drmFZSsbk4t22AcFV8ry6VbBpKt9gaUq1S3d8Wl1q3wjNg\nRTYCZHbGlieThggvsAqE+nKIG9rlPhD+aVsUqtSrJTlGL4Z1lDFenJ0mIJ1x\nzj/1xFIfte9+4B/aPCqehr3ZOOYUXPNbK8AOWgN40Pa4zwSIHFca+xDoYHwI\nvTspE15+HLtQHLfgdeRCRIKajuigKXtEM664ajfTX966BojZSB2pLTLWDM/9\nEYR6mXapn5RahUYm6hwxJ9Fh3GdwQSbbA26F3q96ZocJ2Eiv1FPOyiOQzx2g\ndj1HBH9svjSUlNXh4dLxZX+r4h+TsVwp0dkN0RrbZ/dgil+H3QILhHn63ZKl\nKmAMC7avfLwRI4tZsu5CPcQ2P1lilBg5BTGR8U9dmyNPB7gDwPzSzM8riJEU\nuQvRdxpiW4jnEBQMHIktTq75mooHL34YzcIdWnd2+Wt3JNk3+ZHi5hK/U8aK\nBz0hkmhZczrT8bw0NwpqMJJSzT8cRaof5nx/o5lgXsoWsuz7ab1Q9+IssCZq\nR1ywFaKCEGMDiQoHuWmWijZwiQnEkEehXBGnIojnqZLVFVv5u6sFbKNX/2kp\nNXByah3xYsVM/puG26/cfiToimckF7dNrT5bQSYv1NcyP9xEM2dZ6UuLRKV/\nQpEj\r\n=CN+g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-87aac47-1604310672410_1604310720841_0.36309347797669433","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-60eedea-1604310743790":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-60eedea-1604310743790","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-60eedea-1604310743790","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2be681d731d0a674704824839dca5697ea98c5d4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-60eedea-1604310743790.tgz","fileCount":7,"integrity":"sha512-CkBx399jcgusGgXnv4Tuqut1uphGK5oLjPqxGj6mDx38srksvD966+srjZ6nU2RT7HUrCqb5N8MDLnla6Va+EQ==","signatures":[{"sig":"MEQCIAuCmZqjUaBoDfQ0ZWyKleu65rmuylHSjkW02gjCOlarAiB2XqJ2cTADCXEqxpa89Ij8mU+UYYTMLB1wDTyuiB4pcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9cNCRA9TVsSAnZWagAAcDoP+QAD67WNBKA11An8Vvad\n9fgoNITSkG5AbJZ2evT3/0Aqv7KiLFJDflU3IwrxRbSNp8jRnK2Mv0/wqcKO\ncMk3p2HlmZh66Hh0q/GR+U3iXuf6AQinOfWIIPZPYatqa42Erpwhje9v+WmH\njQRFVSR42t8xT1KiVo3vqf5amAZqLA9h1Z0Zgt1sVqspbXwmHgYAXOXj+kXg\nd4hdsG1UHHmFXk0EaNS9WFHfxvRqUJZPHU+cMMCfkSmUJCpC2/jQPkY+5kJs\nNd9l8etMJ7tDUCSF320pc30QFvagmCwhtBiQ+BCJtwwSbDHsj77/Pbt5tlph\n9psL5WptWqVjy9jxlPOJG7mplrnLUZBhuHOg8voO/vzRQTfigP/ZfUVKHgGH\nJDeKOGuAZlSSqQOJmd0w+iZRVCNLZQoyNKo8GK7+LV2y1d0NApdf8329w+58\nb1VVEt+D/fd94n4AR2Gle4dzyOHmO14wh1qJ66ujNq+MAfI1L9rVunsR5ehy\nGs0kWw7ATobz/xJ+0+iXgffomn5nMy3MTQfdQtiJEdp+TKgNRlrWJloGXTzB\nV/5q8MMf2chy/e9n9zlnaMagB+S5xYKW4xW2Jkr3t65VS8B7RX4Xih19Y+53\nNgJbivBYuVbNPngrA6Q7QQryT++B7Ug4azOsqYK9VWIfnVdLSFpHeDGaSVKm\nzbvk\r\n=LEHI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-60eedea-1604310743790_1604310796664_0.3108858301084745","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-60eedea-1604310743687":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-60eedea-1604310743687","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-60eedea-1604310743687","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e9dab6bac1016ddd4b84f0cd2f2da8d0c2b52788","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-60eedea-1604310743687.tgz","fileCount":7,"integrity":"sha512-KndUf7WP2ucLAgWEYwB4/lwzMQOeSmC6lgGy+FedA5449On0qkPH4YTj9a80fCNhp+7M3WAgWKIz2F0HoskeMQ==","signatures":[{"sig":"MEYCIQCzaS7+233YX3oHmPHEgLHtYq6hQJcqPWwS05f2c21mMQIhAKIUvUpflvQhZlWIP36PFq5jBOX/RWxT4ILvhlYEJRTH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9cUCRA9TVsSAnZWagAAIgcP/joQQE4epXz7KhRN766s\nwGr0I0CwojR5ZBmncDWd8/cZRAF+qPsOhgS+WMmSm59tRShajxHMlDf1ZAL3\nZqWZfqTOX+FSqLt+8PaWRPkr1N9J9IeVoUvmeWrgsVnQMBwBzyna3iAxrY9c\nmFPIHl4TeTaNpEmfIwxrq+vRjnDR+u/dGd+G4LGrmSXIEW1GnpZV2fAlDglL\nOkzlazn6hZiaJSPzPGxesWVGiKcSpn9gAjkAL5wubKoXJvrw4yApvD66ycMW\n7+Fn1aC3uezCmWuQU8sgMxDhu9r1bGJbZZw4smJPQSacuVA2kPAGv7uGIQE3\ns4MHgpT1nnZ3h7E3GhzAuKgJ+LroR8KvIYRRFP7hjnBT4RWvC68AVz1zCI6U\nliIpQP3C8OpELS+cd5U+WHw1E8bvd+S64lBseBqv8lAfWB9aMFwUcoFjDaq+\nV6M2puOncz7I7pXLW+1oV3NK/LUkQ33lnv8zUxKfnvw1RgKK6eWJh1os9e8C\nGSuMCbPV8MgLgUTRjs0MEI60RJw+aquNTJso7hb+yuyLjmiTBO1mH5QOkXOJ\nKFY34L0RBOUIma5kDVI/Dzutf6O0IReLa61nkOYa15OkaIr+z/X1UQlaIwtU\nIPB6st5LvUDGpBhDYDuh5ZYTp/Ij07gdPGp4DiDuehgGsBayniFOnJ/+1U6p\nNFYZ\r\n=f2Ig\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-60eedea-1604310743687_1604310804491_0.8474691555083946","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-725263b-1604310805191":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-725263b-1604310805191","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-725263b-1604310805191","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"50d503c782f93fb3dd37254fda409b0e7a728c3c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-725263b-1604310805191.tgz","fileCount":7,"integrity":"sha512-rpv/q5wxxpyILu9k4tswiGgifb6zMqnrInP2z2VGlMFh6vH0H8U2yRR1VANAbmJaUfRQSpWGhejurLA1idQWLw==","signatures":[{"sig":"MEQCIDCfoESk/R1GyXBF4KCxBkMwbL6d+WbOJDnocqIR/iEEAiAaShvAULTl0aFrWlI44vAtNCD9Anm+6PviUh4wlhb2jw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9dOCRA9TVsSAnZWagAANWYQAJIJa/3Q16rl8u0nSLq1\nQZrM4FeYt/o3Cs3Z2rN3Y9gP9JWmoAgKs4kqELM3/uBH+zd+Yq3mq9TF+iZB\nPlMaDDyoNRnT36xh4nyhBknTvKVX4Z7CpKzrE4uQB964NYgXeY7bJ3IqKM6M\nlAprHwTt8q7US93NWj3pyRKiWOfagengrz6oeSnLJXrDeyEC+1pvZneDsVza\n2iGjZBE8kcjXKrgtx/+tfVnqSVAVHu4M44aAZ6xLvEjb9gk2GtEuLKWkgS/G\nKHYiBsy5c1ScMSgAUc+CqG1Pr9nIpAtMBWS4kka0MCFmuRl4M4zV4ax01jBC\n1e5pJ25MHzWUpYYK7GMnFsOCTAJuSDp7rC0oRSCy4vWYnyuu64k5F565fBjk\nQEttvwy1iiTBQMCqFD2fZv8Nrt0YVUMKOdlzAZJ3Dr+nUlTvZ2UpQnU8JvvT\n3BsUmST9uIaY9sJbtwc3oiZoxzGrOnfRdlQz8pG/Q18s32AMOMoOl1TS0bAD\nV6RLgsGoIuCkBVFaaKg4g7vBv3cD1Oj+FOLUQcvdxcggUuyB2ueHpv+NHyB3\nSF+cT99vGNUTshaTWNBc8W2o0nj3PzPP8VZWxI4EzVAF7mdk0f/a/IM1k0G7\nXMZ89tgKMFCskF72QWU7bLyBQ4eaazz+RVkUyi3ceZMeKgFACdnRFA0WtjrI\nIqo+\r\n=vbgA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-725263b-1604310805191_1604310861991_0.5190417636232345","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1537ca8-1604310961496":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1537ca8-1604310961496","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1537ca8-1604310961496","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"345c2bc79d145dfb500da4213c7df7dccdd08a02","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1537ca8-1604310961496.tgz","fileCount":7,"integrity":"sha512-xnoJiADXw7bPUzcJ8ZvGmEyyPnW5DPMtm98k6/+BI5pcHU+rvP00VjmmlipRZygxzxsKfp7u56Ctyh51JZ3Exw==","signatures":[{"sig":"MEMCH2wAavtIN7udbb1oBu/jgTwvp78tlzQqzHWolosT120CIF0o+eZt/YUoaz9JfOhIZiHBableB3VMl3TsEFIYbdD1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9fwCRA9TVsSAnZWagAAzhUP/0o++hUh1+OZZ4XYZHFt\n5Qw61MEHMUnn7pyhEaa/6oGGvw1+UNMz18qdymYifYXlYqHb9H+79cYaSLry\naFcZLI9tPgRiBofeAb9gacNEedJ4KXQvuqBp5FgZxU75684MldhIl/RyGOH1\nx3S8uFCdJoTugv5pxd/F/qV8glKCAzfNHtb4imPDCpXMpMtx+qHBEGwTC+JV\nQQx/LxeJi2w66oyyxC+nLfzeAqtHawgOm461D8BoFvhtS80FjFfWAbFkprJQ\nAnH/5DQfN8eZ/nazN21SyXiWjC6cWTYS61C+yzax/sgjv6ijnbye2ibeGvZA\njSdeKnqxesH8b7fN8WGyTQiMLnk/P3v3Fdm4CJY0qKyNBgXz4Xfct3SxITAN\n7zNlkXsI2G7GLxTtS5ps1luFovgXMwgJuNzioaRoM0UKdFVVzXHtBseBjrlw\nz24LVARBlorDK6fWyEFCkHTQmvjp+5gYyhAZ7taI6/lMRVbRGSOz6Xk4Mr1q\n5RJGFbMXjHdS9aUbZrj0qzjybhchWOKYyFJFFb/zuUPDFbMvfQ423lR6Z18a\nxgAdsoOSmNFhBo6dONCFS/YJK/qOgY1eYuZlmN2ADPIgALL5Hh9rcUznhyCH\nx/l1QVJtz6Wq1PCoIQ6Cz2MykOZwwrge1JGZ9fz02yZLTDr1//1pS/J00a/T\nXFIL\r\n=pmfT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1537ca8-1604310961496_1604311023557_0.8683281204273778","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1537ca8-1604311013444":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1537ca8-1604311013444","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1537ca8-1604311013444","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e0ba55eecdcec11095b64c80b35d2099fca88bdf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1537ca8-1604311013444.tgz","fileCount":7,"integrity":"sha512-NXQTM98E5mK9vRc2t02QVz8Dn09lo1jFHbsr6JyUqiYAwLPSvlvuUfGcMzXASfjIbet8NLV+fC1cBAl524OCbg==","signatures":[{"sig":"MEYCIQDbswk0Ib3K1yrclOKgNz+l08idZED7f4xH7lz6l9M3/AIhAMPAApNJ0xctvfuNQIu9cMAe0K7H1Q4bxZUAs8RiBeYw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9gUCRA9TVsSAnZWagAAp7kQAKMyVlsCMVwW9VputW6S\n5SoX4UmypawUJyqQqRkafW4Bwcl6Q5ZXgDcRLGy38OXYI+HDpCGgrXpRrgXP\nEEq+B/Mye7vRm9upygc4jQFfnOj1dxi1cbxH6eydc0nXGMGgfZJxIdZ20/5p\ngKvye6dhbqI4XzloghKwVVzsD/jzRvt9dNEoaZ2IRP5oPV4jNX1PFFGfyLMm\ndhAqy1fVKWomA2iQwxj3xSc5tGCinYxSV5m3cgZNaQlCh18RAIxTWDhkSOPB\nhh9960xAcWgsTWpNmzBXjID9AC0qVAueSIvZdzvClJ0uw20aciDC0M/cwJVu\n6O2W9neIRy5XLba9Z3cmZZOZz4WSNV4qWymYVxbPgblziHqUrFMlSJjj1e/u\nbssJeUAC/7Vl8J7gx//zGh9nzcw3wuXJEhT7CChnaryN4B8XdFtIkcER3yM2\nr5NQJjyO3wiPI/bEfzN8C9AA5P6rpk0MKm3sKfrw7k7TgY/zyXlEj3KR8alV\nZu/kgTqZF8ir6q5SmfzSr8gr8v/+dgWWr3hhiLUZpNeaxkeA/HTnEZYSCrgh\nK8mXw5WYWCyA0B/C4RQTiaWOFuKne4E3DAEDW9knZK+1ppHSmrWQDKMdHvI4\n2vlMY4f0SxCpogOxQP0eO8dXT+qb7MTx6eZn1kOPX5Wta+S+C4ftiw7QYQxg\npjyR\r\n=j+xO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.0","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1537ca8-1604311013444_1604311060153_0.34994476695553844","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-af8f0cf-1604310993262":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-af8f0cf-1604310993262","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-af8f0cf-1604310993262","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9fa43490662d626339844478bb1a23652662a530","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-af8f0cf-1604310993262.tgz","fileCount":7,"integrity":"sha512-0JKd5rpixh3ZyDzaI9m2G/Y+Bdxk+UUAAvX+3StcDp8bq28EQX3Rny8R+JvwpunAZA0A/credaQtljvKevrw9Q==","signatures":[{"sig":"MEQCIFyrDlQUhp7Lvu9hbVCOJK/yHPBnK3X8M5tRyDDpGCCMAiBOauX/MfQBAmk8NunVAMisxjaw3nTks9rQMDc/IHqDuA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn9gpCRA9TVsSAnZWagAAht8P/2JjxIcNKpOsaZl2pcpw\n7SLwsqwH2RbC4w6Y3v7gIuKqxR8I03BJZw+nqtD4FXegHUwQryVpX1Vg7LjQ\nll6TEaTNLfXJH3Lt32eAhmaxuXMeLNe45QROYGzWgb88cd7V85O6JUuneHuy\nTwWS8UCs0dcPf/nLt5lxebNllQH2qHVUz7SX5L0tEXPQSSQZCh91wHzJBISX\nfO4koeu6gnkwLIaAB/xq1Zluq6dtQQ2j1wZBQzCgyr20kpFGI2bRgBMH4Wn4\nZDq9WXendIFqdaUVM7Eff1QGDCwilJwUTej/Ra6jtYrcYJKZejV3VXe/Ax8R\nd1TSCo+uvZKusNKcKmCp3XQWLKU9GM7WcsSt2U2bfcCYNRg2QC8qL4G/SF2H\nh8qfFf2OEuvQFJbddpFXIeMmuW5uVJ6vwISGfwXMjgRjdc70mhyx2pTFQ4UE\nznOXx9gDZ/AcfdQH2NnfI3669t2ZUFIHBiIZihgr3aWaZsE2vg4y994fqppk\niJb55SxufYG8vzXk7wUjt2ZbgvQblhtpTnm0vkriVlz1JgGfSBnb5+F5GkKE\nWA5coPMnW377+FDqM4sqdbCotfPBWweUev4QPB5ynrA7Y0KCSxBddYiNml7w\nziBhtggZKmZw5v9k3D5P/KuMgbnMMZV9mgUjcVwks5r2w6b+3J64KoeCwWsD\nwvpN\r\n=FZZz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-af8f0cf-1604310993262_1604311080778_0.7576782906033661","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-52535f1-1604313874176":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-52535f1-1604313874176","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-52535f1-1604313874176","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"74217ba81f4c5dbdec7670afbed7d3e452551759","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-52535f1-1604313874176.tgz","fileCount":7,"integrity":"sha512-6uJtrmL1/goANXjbTo8nKDLcEIQJM9dDcvK1U3Z4P2tl80W4EpfAw6YP4NmCKl2Tm9nSYTF2TrsFfpaiQVUwBA==","signatures":[{"sig":"MEUCIQCg8BQH2hch7quUP+nTm+LJX/Q8jUHnIkJLmQb/+o+M/gIgDBiZUrkSayR9MSAMZI4BqNAzjCmu3f7t9sfRsJv+Ou0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn+NFCRA9TVsSAnZWagAASxcP+QDO5sadykzGB1seOuSU\nBb+MZgjLeylxbxE2k5mVSLF+0l6xbxbF1frR/yBpgSIqs/bDXBcTbX6TC8l3\nCwmbcB5r0xQR/ZTUQ7EwQxpH4jmKf7Kt5sLX1q5tSXS6FqiJVNtWjTbpNPjk\nUB6tMwHU75pXXiowFQMmlM6O0jWEYNlsZ6YW6hwFBH0cqeyEODQgznRUwGQ1\ndsUPqCNOgkHLoitfxqZ+GyjmmpHdSgAu2uue5DCATPUc03Nd1hYqeLE4wbWO\ndx/WDDDjjg9chuHFuCjwYFsoo8z/SU2cxh2uvBfbzVk+VDv5Pw13g0FKDMY1\n/utmFS4rAHab1MCS2M+bbtG1SpZ17C9JTaFc6TKZaAW0RMKtSZwBexk1pi63\nXd14/cAe70FTTv1cN9VU79YzFu0XpLMYMm6RlOkLClZx0POE5W9zrNMXIzfg\nd5YQLCvYX+2/aPcCi3Si6hPqGnAs3oS8p9Gs6Uz/m5xwSIVfeHR+spgBFM/P\nQxqOgC6PyNxJifVKa9CS2GyvBL3zlC92FwqsKpYrtG7GPjHdw8uInivrkq0g\n1YZxQh8PCf9HLMr9EHQg/CgbDJoVVDfo0gtEJfPLL+m4MaJMHZECrmxLNzQ4\nYEGH95yLOICzAajPZk9gyqi9s2YiagytUcaUqYN3VnHUr6+4Q3o6Jx0g2m2D\nhbt7\r\n=Q/Ry\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.0"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-52535f1-1604313874176_1604313925457_0.7879474435885463","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-95b3418-1604313919761":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-95b3418-1604313919761","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-95b3418-1604313919761","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f6b3dd8471b92603bbc17b1ae908252028ab4696","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-95b3418-1604313919761.tgz","fileCount":7,"integrity":"sha512-qfpkLI4zXIHufiC93NTDpkh04Eqgo5Z4UkCgkE+r0uUmivr/3ukiKyk0QrfSpJr5Uu6xlDzO84ymNlUWQdWJmg==","signatures":[{"sig":"MEYCIQDBLVQsUzM0ASNgcPdLI0Ct3w6vMdOt7o1QH4ghfI6j2wIhAM7m8QP4vkJbg9vYBkfN8N1KtK+qxVhBFqtOPIUyWuby","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn+NzCRA9TVsSAnZWagAAT3kP+QFymvCaBoVh/+VhVRtJ\nSzF9UpJdZ3fn8lVB1Wh35tLjyq/0eTWYYy+gztgYEiuGbNAyIXEV5ciil9QP\nOVPplQWQSDK191naVDuFpsXJ5ZlGE4xops/DdIEV+qQeXk3zvcMo4acgRUTV\n1EMnPr0eeoxxEDbofYcDqq9GB51cOPXAYbMVuFpvl3TXR6pEdbetfXGSpX04\ntR76lSSYmcVtKrXMkmU1hRsCgr6VAQpYwzv278+w44GgjsJ+X8DutdWMWdjb\nfic8jX0fvIlHMh8CVNYQmD2gbRXrNGKI9KVtakqEMcpNz8yK+cYhLbqsJhlN\nPHrAFYhv/DQ8YZWrPA0KbNQCzBZh4/MeOXBoa9pbTnaM0lzSwt79U5EGTX6x\nQpxa38rMxrGl/ykhyakSEK5T2cyOEoZc5tE114Lf00aZ88pZI3IInmMwrNKJ\nQajq9pu87ceTDY2i6K/yUe4VZJ9YKJpgmjJVpzKK1kImQRXc2AJzUE7w+pQc\n6HRrT9Ht3VV18toi8K/a4gs2arNh37fiG2IYbX4X5Eahcq5AEsZ0laV9kBT2\nbxlvUV97DvEAMh8C2upLLwgMtiXObtKnxjeLbQdCeiWO0fOvImuy/iEziNkl\nIg/ZvNIM3gzYz3ofzjxg6f/OeSCyRMtVhHnccu9OMb481QcuIULEkDqpOrGO\n+mzq\r\n=PkHw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.2","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-95b3418-1604313919761_1604313970908_0.9467536124445499","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-0a2930e-1604314072754":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-0a2930e-1604314072754","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-0a2930e-1604314072754","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8b0fee612e8f833194adf1051a22a587a72e18b7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-0a2930e-1604314072754.tgz","fileCount":7,"integrity":"sha512-pw2n4PL6BjEPpvsqYnj7iLXwzm4ol0bt2bxmFoQ2gmhh6pHOfiN7HXLlsaep3bOFty8+iijxlosiL2TWLKqreQ==","signatures":[{"sig":"MEQCIF5tr5XruiDqbdOGhrn5dqxPMJbVATa49O+u7TtzzrzhAiB/HUMZIOw9Bf1FtXC8W+DJF/VA8HrRFCCF8x6drkI71A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn+QOCRA9TVsSAnZWagAA7XAP/2pqDObLVZj9PVNS4vPz\nYZP046ReMFusvUENS2d0uPzAEeqL5F7AWcEu3yuVrhY9oTGU+Q53fg0JyCEt\nL3rSN964mcJD5LkB3SOw+Ghm5o9ISO2J6eUs084WQk0mTweBB5MnqHb7VI4p\nOHAOhlT0yVjX81ag1rdn0deKuOdjLbhusYW+biPOnnRrkGajNeP4yorghk7E\nRv+NIaWwSS+AzQa6tTqIksJNU1LrrI78BBvYqvchKCcpgqzCS9KBcT//5pAX\nX3M6Eozwk2VzYMiyh01rRQGMZRJjf3EFreOHmT/8QfmKILCKufVhXLXpS5Y6\nQtafZilLyqjCLS94MZIyVmWowXipfFvV/821w7aOo+jLi2Zw/AKfVnP93WXX\nA4qs6A2P6V4mBfPkYLgtDYiSqfmECMdBVBCzcvfyCr7nAINtlDA1vvZiJ6vG\nrdczeRXc82TMjzboTqdRQorlwdykTPerl0EIA/YDTpU82saqDTY8NvQqoB5s\nrbPpWZm2n8FGHVaP659ClMWma9vCCleXQaHtUQtPTDI++6G3fKn1sxvTZKTi\nA2EirAs/ioK4U20kcttLiZKcfdSNMPAbWzUjkNW1CqV6iaopPYBVHUulPmyf\n4lixOBr6d1sJHQiEakteXp+LAimMd3F6WqUxIlg2JJEl/a2jjMdySlRlI8fn\np1Ax\r\n=XZmB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-0a2930e-1604314072754_1604314125604_0.6712003574262113","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-06a235f-1604314279687":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-06a235f-1604314279687","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-06a235f-1604314279687","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1330b03525f52e73b160d3bf1f59253335663fe7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-06a235f-1604314279687.tgz","fileCount":7,"integrity":"sha512-Wq8d8GDmi7zGUdaytW7bCnc8QfWIqutC7cYonfRsiX1HbaTyWK9lc9bJ0ookRVOOkUoLLIJrkD5qGc4m0dXNXA==","signatures":[{"sig":"MEYCIQDtbOLHIzpZYtxSDf4C1DVSoAGZC7l4ZCYhpqdIldGuAQIhALl1WmHXh76gEBs8L01ti1ZPPS4x6gPESi280cnW6U0q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn+TfCRA9TVsSAnZWagAAEUoQAJgcKi94rnYHDUH1cop9\nrCXJC/XyA5nraEbFrEJNhWDubJrPJObjIl60TZ5cJ++y0MCn6UfVErrXF9pu\noNTN/iG4g2HyYtGmWfrWbb4JACzkRW6ERHeQ8YrSsOjdNYbGvA9ZkzlMOd48\n6/XoZp6IKLd4Kc1anyxPEsmz50fNCz0GaWOGfeGlMG/yOw8b4kC6NSwb39TP\nb+VObrtrBLiKVhsC88YwsDixRMnlDYmDjI8WIS7bNXYMFcQfeDYiqSbYtJTh\nLcvigyQwwFGuvQ1K67k/QVHIX2jS8bvTNzMwikIR6gpnH3+Enm0hlblCwl6p\njgqjMq29mbxcb4aQgrTU9HWKBZDBAyWh4DZ8nGndMC9Ubn8Jz85E9kBKSh7W\nqPhSN/3kS3NdTYVgRdY7t+ttL1ysYyvzTHnekdxUbGZggLPk4YtyYkQefUpC\nEt6YJH4WDs2t5Yag5ZjN8/CzIaLxI0ehO3jrNP0V2FXjSvBRcqQ1TQfbry06\nrnReKs/vRRnf0A4PM2q1ko02l33vmjsJtmqkOSWmR0FwbvDK6C52ttcDNAOk\nRKqSuqCc72idgPLIRhYQQYlJFXJ4jtQk5pXdp+YVlaQMdxO+HMCUe7lP1h6M\n3WmmvCa0AGXOcB+SjQjrjeauT21bky177kzVbymRtJQCiEw4AICdb1qWH6Ay\nm1+c\r\n=CZcb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.11.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-06a235f-1604314279687_1604314335044_0.8265405291441226","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-0ad8a62-1604317628227":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-0ad8a62-1604317628227","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-0ad8a62-1604317628227","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3fae4d63befae72b8b347f3abbbb891f4cbe9abc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-0ad8a62-1604317628227.tgz","fileCount":7,"integrity":"sha512-8VB+CCbctk0CPtmrndw/9vQWKAI+hyO1I+dfaoENV+mw5Y7xwbvYFIHEbH9b+z+6FCCFV1n0KYB2UgkxA35Hng==","signatures":[{"sig":"MEUCIQDjpFVcCmGzdAbAma+nK3D2wVz/teCEc3IxMtnl5AiZ2gIgVC/H1groWzqy/RgcqJTTeehMmx2Fx2rMsQR9Fikmqg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn/IBCRA9TVsSAnZWagAAEBMP/RyeAdAFvxk/+e0u4iW7\nzP5yjDJyiFDjE5YsCnAvu9FPb/dPREEQ6oAqhVXeY4GaVD0AFmKmios3/X0c\nAOTfjPL6mBa1IYXjyKJHRRzE3tU7Gj6q+R29xWw1r303+KibsDK5HTBCEvch\nnu+NX7YVHVZ6HIRzXT42kqWHkXX1m/GXpMC1yedmgEfsxLdqKr4MgxZP9v08\nl/MBZDvWKKcOOfvoSgl1ZO/8TRJHZyIPuQz15SbPiyHOGk2K6MiFlo4vzSht\ne+8iMIj1otgL0JfKiTJ7ist5+z0TjiQgEOqhmHH5vt7eAJ83C6m21LKYxWzF\nexB0ZyJEpGMwJVyXuzxoSBZXCAfeFauXa5tQcdXSkvSsFkb7Cl4nOIppJhTo\nSeAdjWDORXRtEJgn+qMIMEHNKG1numtOYS7HVEf/GUyHjn82IeaYuqqH72Tk\nXDYtqTHjPT3MhsezaUL2jyRdkQrQoqVi8WjCDWjlHqqKYfIAOVDyOo7nBOTw\nGgQ/exWWqfbOseh2tfTBXCNRtHUajpfMRjyVBkos2gOZmvESMu0y51MC/fnC\nH9GkOedRcdt1ksNvad/uPMIEVfz04MO/Bv9FsiGTced7M2gSiN8nSBqHuxBv\nRhusqr7F6Q2b/WiHqaO7mNtYpZKW6429EnUgrKB+tT9sWPwkkanfxh9J/fMG\nKp6i\r\n=wrWB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-0ad8a62-1604317628227_1604317697353_0.8398580979983044","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-8e268cc-1604321039598":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-8e268cc-1604321039598","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-8e268cc-1604321039598","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"de0cf939462b3a1f58748cb2e7642c9ea07de0dd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-8e268cc-1604321039598.tgz","fileCount":7,"integrity":"sha512-1mcWibre0jZZN8YfHLplQBxA7lBc0ZFYAV09d2ksy1GNNJnuHm2vKHNnA5NgCbgecFufg5j+ioMiybTYMRIRWQ==","signatures":[{"sig":"MEUCIQCsGoo48eKXzG8Hrcd3yGL6ZwsdCv+2TUuCVHNkvReRAQIgaNMXbs53vRSszNxT7oLqeEJsqi/1GVWuN/xJoMshBQA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn/9QCRA9TVsSAnZWagAAVoMP/3/UzXWvZV6v9cpH7ICu\nVXaijSXM+FG2MRGMIzC6OgEyWizv9wOUuRlK2zuU51vG76ZsP7sznvNx9RWb\nVxRnyxadCPMOlrq3Cxf7yJ9VaCQu9yGjuBbk+cl3bKBQPFZgv8TwMTK6GP8X\nIOxrFt8CvpMPtDSJWtO2YcyVnbSWdEdsunMIynNvUgFzZ8Akn0v4Pqk9rFi9\n9udygrk2bKBNFoYiHA+CwKxwqygNMIwJmUbgl3taPBpyTrKBoEZxhbkolQCZ\nKiXANph9Bb1V/xh6Hq71lrAw2x6PtPDQqEsmq+Ns9R2JwljlbRMZF9BxJNpf\nqV1zQVjCOSuDRAWdJ0lgKTNtG96LviJf7kNo1yR6B86UsHLeVHerG+s59gr/\n3PfPuehaLRk+2Ap+JlmReUDHLM2zP8fCgNpb/oOjKfY8DFQ770MkteNT3paF\nSUtdA3nhfG+1h3GxU63C+Ss1qobIfdzPDnrYsULMsq2rQkT5x8ugMz5svo3i\n4bb5H4UWYrylKzt1x42lo/nnJzJtyxC9W8uo6xSmcvW/H9CIAAvz7TMffLaC\njFqBeFzQjk1lC+cne2mfnfQSehk78SkGGBeGx2dJkjiyiK00N31td3QN0Pnb\nfO+czT7g5+uoDaxqbtOLW8Y8Sf/VDUg35XnQ5m9IR/qpkn1Ok9VBI0h/Kkbo\nmy/k\r\n=/ZrQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-8e268cc-1604321039598_1604321103930_0.9990765230235141","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-8c18963-1604321244252":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-8c18963-1604321244252","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-8c18963-1604321244252","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d863edd0d45951e1eaccd2011e32a5b76e8ab67a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-8c18963-1604321244252.tgz","fileCount":7,"integrity":"sha512-/kf9ZsdEhaWeJb0V+oD8vNUXiqHVllANORx/LnzPtgpSN9b9UgiPTcNt3+Ie7KQmdKuE7EMAKt1ORmSw98BCvA==","signatures":[{"sig":"MEUCIQDn2XXZM/n7IIAak174cRbssiV7tXfNeEPTOqzu5TxwEQIgIKyzJElFy4S24ID7pwSi44KXrgLwEspjvs3XbWiKdX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoAA3CRA9TVsSAnZWagAArdkP+gNb+Bappcn6eb7L3wyL\nS//tcyNyELfvKnFlaAI99xOo0jNvTPo+IlLLvn17KI7bM+lqDAyLCX+4h7Ub\nUAvgjTgLZ6LCdxvPNkb2K9Bn+m64kBdwOoCp+Z9gx/FXa44E8wUZaUX+SAzl\nVaf1JqaoMPTZa7OlxUyc9PrUho6/tCk/LPGTJvSh3lqczzbCOtoPjAgXz4nQ\n0VlOQgS3egwXymsleuQS4z3IxgOCEUhqSMd7ECcQxtEBv4R3qTaxW8g4t/4G\nj5hvM6TS7185ysOcyzX/7VNXymnz2o2bqX3Y1lt6XRsyTsFmDjVzgR62MpLX\nZmWXPJkOBgE10n/0qcU+vVlv0kqE2nsLCmSWRvDb61FpLTuZhuJCLTzIeE6B\nRQirREXe3YuaHGLwUqNn9zsFv5SxmhBP3M+LpWfgf3CC9oEHiJ+U/WCkE/vX\nSR6QR9YApgn4oMGIPgoeR1k6IbETG5eBpA9VUuWkp2UbXeS5+m4JMwSc0NiR\nNnkFF6T5CThk4Ag4WcsCVIli1TfIHJWxS7mfhusX73lyrM+E+Qq0U1aFiaRA\nU6DPxUPJ4BATb52VvrY96hjb6eS4uauRU4KbZHK9E/wG5Qu/G1D8IilSbn01\ncqnkhMjyYYYwxPvhGHqyW2ZtKamecQCS/JOPfgmooj9XXQO8oIUgOXoZl06c\no0G+\r\n=vQVA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.1","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-8c18963-1604321244252_1604321334908_0.7321929956679514","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-0168b68-1604322617885":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-0168b68-1604322617885","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-0168b68-1604322617885","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f1fd97370abf3715b141598803354089b3cd9d68","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-0168b68-1604322617885.tgz","fileCount":7,"integrity":"sha512-0331psYXnliA+gUg7t0UjJEcjfWJImftO01xREvRqh0ekDqpytjPnIUbP8g6QQ8Hnf7qBl0z3pGeOGaGJMJy2g==","signatures":[{"sig":"MEYCIQDIMEZBrffxsWSuTVeidkxFt4Pw5VpP+Cn0cl+H3oSruwIhAMRUyEfXLMP48fPj54zw7GeJMtGIL4Q3glh3WCPkVkye","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoAV4CRA9TVsSAnZWagAAiD0P/ioS1vVydGDI2McFw0hB\nGAaL8REzxsYgVB3u8dtPpupNrWxLqzaBenI4c9ZerGj7bz8QEvwya1T/NIqh\nJJozu27K10vb3UgSPCARYUhxcR3PGmaeJaFm+9+JF/fT26fiOudU6S5Sma4F\nQFlDa41qPDvhHf7L664bQoJylG0cj8kybQPBg3/DN6AdjL5FtPKFL6pSuHdc\nxUJl9/SQqdPgAZKPN2VrBnDExGO0PuRkCovAqZSDCi73+Y9yO2daEYFqWdev\n2ITXYJKsWiNEhcA+9WNjMOZw/qjM+b8tF2QwavRgZqQQY7+lklGBaZY1+HyY\n5B1PIqeosfpcVxGOBOVkN5vzk+am32TeHWURCqIXX1d4toLXBII3VZ6D6Cxh\nPfXyNaFe3x8+d/JBaIG3gv10PvZEsBSQzab5eoLTgyAs6+DZ4rYjdiuCvBC7\nGQsWXKXARisW7x4qLM+vraiSmO5jrZWd5f7rvhTUxdHBKzT+LaFAzrUski9/\nyQYFvrEEQrfF2m+z+thQwgRhzi1t2l45sm73iD/wa9mbNllc3dG0JsEOlxEO\nfg2e6TN2QMUjvZ4yDGD4ITXrEVZ2qhqj/m+TxAHARP/jZSfA302hwx2sdY/x\n2kLZGwQ3FLx3MHcyHimvtq4+59CDf1qk7+qSLNCrJY37DkcKk+flVDq5R8CO\n9B3N\r\n=8KHr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.2","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-0168b68-1604322617885_1604322680228_0.4562993659139274","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-0168b68-1604322645045":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-0168b68-1604322645045","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-0168b68-1604322645045","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e6407cae0f9a1f35834e80f20bbaa5eecbaeeece","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-0168b68-1604322645045.tgz","fileCount":7,"integrity":"sha512-b6KZ5BQiXyMuo0ZUg/tqUmnPMxYD82M33az7OxGLPj9En066LLGi6fmcst1GrsGDPvKvkkIlP3zRDwiQVytsPA==","signatures":[{"sig":"MEYCIQDdgv9TwmYZeKozcO3Ok0mml2Fx+4KvgKrChJb8BSWWPQIhAPOoHxaQyUkLUs7wZ3z482KJZIee7DzU8AJVYBw8Mo6D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoAWVCRA9TVsSAnZWagAALJEP/3Gk1Cin6JC1zcu1pI5v\nNonzuX/4lavCfhuOvSFh32DXKHIqGOxBm2EnqGALAAt9bzW8toEOR4hvTdfh\nrusBRW0A88/7Br3jQAz1zQdd1sjDWDqhuO1HrNOmbq1SQV6B7EfojIrdDmK9\nVfykv80+oSyskd/Ug09a7Lj0R0+iA5KbuLjCpedopAmuKUJjGmIrtqNotb4S\n5S0pD2rGjBurPI69f0kyNO8cTs3j3FLpxt67ZzefF4xWDJ3GqdiD4cxU187b\n2zDUHRqEYqj5AAtwAJ17H5MfC2YOTltCPbaZ7JlIKrl8C/sLIdy73hnay7YN\nAry2A0oUEb5nt6e9bxyzHptstyisKfkHohh3SmH1/v++AvfjrYSx8TwIJeNo\nunUjbLIeMvVM8vQdU0/Yh0wcdPNyvi1PaUoHXwoT/shlFcBHtMXiQqXFmEkR\nr7u9/LXQOG2JenGkZKoslf1kR0J7HynPu1kHivAySicDigGLPTVQHXo3iDn2\nu5b8q0fOaQQsg5jYuRnQFBUNMkZyv7mfd8FtUCf7VaKNhoZbYF9x/y9Gdpoy\ngfI3Lkt09LEU57dA4wYR4XAl2UvZE3o7i23CCy2bXlfAQn+eMV4Dl2wB5/Ro\nNCeWBPkJrod1Ub43xRm5K6q7JEFoFZ4VX86rfpJkM+efXGCuN7/2tsrCvD+u\nPTlp\r\n=yxDc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.2","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-0168b68-1604322645045_1604322708657_0.4730364543004695","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-cf71b27-1604324151350":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-cf71b27-1604324151350","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-cf71b27-1604324151350","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"44f3a24c93683d2584708e88198549af75d84272","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-cf71b27-1604324151350.tgz","fileCount":7,"integrity":"sha512-qrPEw+zm+RcmBQsfUBIO//f9znFF3NW7zziJyRst1jv6Zam/7gGslAVrODWzrP2o0h3CPA3gLRYnp2lo/rUTYQ==","signatures":[{"sig":"MEYCIQCEJSsmhIr8N2WP9RHYi+V5obVOwO6Ei2fpGLO/p5RDxwIhANFHPuQ/9oZ+o6xH/qUbf7FyUKHQojy5EuHgO4x/+5Ju","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoAt2CRA9TVsSAnZWagAAXesP/3nHGgq357tYqixQxbMv\nduZq2+WWNhKg61MN98y8vgvorgks9+ZZ5N3DKJe8OraqI/BF9e+ciMN2JICj\nbplFdTS6GPqG/0SC7qnuPoEk4XVvfjnCpQreW/ATWCvUlXOUTWWJdEbXQRSe\nOlHmEgNzOsjwoSLmbMafa8xdiU0QTL5SSAFpGezMKEdddkNvpQMZImtyS6Fi\noz2hmT7pmT9IY4CqqW1mQq8T1VwfSSX+a3FowiGHJ1+I+nqHwZNPrErRHorf\nlarDmXW5s86YRtWBpR3hi+h7K6lcZStTLdWfiQv7TMDMMjZWJqtu46x+hSRF\nTw5QjGcDartKiKOMC83T9HqFLBxyPPUb+brjMxzBTbl+J6pOuZROk5o8Iz59\nOLbv/T8TY7xjUB+eWr7Ya4GPE9Nb8geb8vIQRPW3OQHB++IhYGPZ3j6cWbDm\n4usnPuEJ0StKPWwE0LaetY8WGXtCWixVS/vZm/SZ+thyLwwN04CbiPKyx6I7\nJ+o08wxnYdeCDsdYW5Nm+qHqKQGP2dvMk+SJgIgteJsYOruv7YJKh2evQLVE\noKN9plrat67fUEb5oooYb32GRW8wIDDBR+7ifL0hdErkwqT+L3cwRWzTCIGn\nDQqxTmvWelcN2oU/jTmARKlfgMG0jB1PCLlOHw9dFbogHmnE6EVb8fzb8G/d\niSV3\r\n=AFSF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.2","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-cf71b27-1604324151350_1604324213796_0.5779046102989545","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-9bb5d30-1604480403924":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-9bb5d30-1604480403924","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-9bb5d30-1604480403924","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a05b3bec3c2412e2622095c163ff37061e2585f8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-9bb5d30-1604480403924.tgz","fileCount":7,"integrity":"sha512-qSe5jys4ahKGFL8Bgz170crRtA5QnkUHwp+iDMvKkd6tIsUL1JijSfIr3s5yMgQHvUWhDAmJPdQHyG+misy14Q==","signatures":[{"sig":"MEUCIQDS8p+BQLrn+mHUIu/TXYrG4L/WhAAMOEFZVlgnJwaNsgIgamaTsFUDSHpxImg0bnbwJqt6DV7i2Trvnl8I4ra/Wdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfom3ECRA9TVsSAnZWagAA4qMP/RlC4GH5Lb5YzhGmAnih\n7tgACA+wMbqvvQvnCZR+WO+17e3/R+1W+CGmsoPL/pu54tsIviIMS7RoRADP\ni6slnGeeOkR+AWixyBrqbSJJyRvjbNzmXWXLrvv3oulgcM/As+OCtgU2t6nE\nYMc27yr6yq2Jjw3dAc7ppT8w3wLaermM3bOw1ia04M3K8xnK9KlAE/htZ1Ga\nD5v8+hxtqD3eesRz9c1zdWDij1SK7fIWCoJA0rn3KI5Jx9aWT7Em9koV9r1o\nZkjNwLdI8mM/+pKKLtruqmDI0do741uQcSljtt2CDPwFue5DWAQSWju8iMFv\nryxSymLtVNfY7xv/NAXp+xUtzZeElzTEpMV50kmj8+JwFknQlpK9dTZf94iq\nqvIdvngq0yaW2Sq3T74uL/3Plu7HPMrvoN8owWArh0Qx/nfxd28RUsLpymsB\noJmlznvllnMEZ1EgG8byQlWBU1Q+XeR8I1ysS6WUiKkaOpbLMijo70C1wLxf\nchV3PWK6ASF2TgzfplGFWbdUZznUxszKdhQBA6YUqhdd3rWt0sb7/GVaIEmf\nqs1O0Omyq3p5F0j+1zB6qfHZ210wLgQ7d3j9XNiBTnJxYYYB2SfApfM1hb6R\nxf0pyXzh/lYTpzBScWU6+ntlhN+JRvb0HqILC5PBnGkBX3G4+x2rP+g3OBSo\nuKKu\r\n=U9Z3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-9bb5d30-1604480403924_1604480451572_0.7595241933499364","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-9bb5d30-1604480405847":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-9bb5d30-1604480405847","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-9bb5d30-1604480405847","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7cc5ca0bab211156a01bb4112077638b19f18305","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-9bb5d30-1604480405847.tgz","fileCount":7,"integrity":"sha512-8b/i/ifRToOyuuk+RoLlQGFp2oZDw9yIDBuNMiuPW+Rq653Bk91NL0GBmAo0ofkdw163gdHP3dpe/PaBMAu1aw==","signatures":[{"sig":"MEQCIHpR+P1yCQh8XqGZzcX0ddIGgm8y46P0vZDfezIZOtErAiAuprX3QLe+tJW/nmEQi8l/q83thguyo15Ir79nVc3jiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfom3ZCRA9TVsSAnZWagAAjKQP/1ygCfttaR+Wbl2sSsj2\nyI5lZw4mUjrDO3h0H8HKLUfvPgtt1L7fARrQjfzqVP3CwKEMpCuH3ctN69Xr\n1MmQkGvOCPBXWDgqFJwRdws+pcblqZ+SXylDDluh8tsMq0Z0NZtl+pgQQRzF\nDXzDW8hi+mXgt6GOztx7fTQPQ293b4cn3Sr5zE6BId8X6qdxfX3fEq9c1hg1\nDWYkfgePE2mLTP7/HaxM4yBGpXpyIGXS3DJd+RSVc3kwCaY4CqHrnEr51iv2\nfHcsVukVej4mS1MvxdEQMkU/3iczhrl2xU6kj9bTtDHZ67Q8k7oE+qCdE+N3\npZEzp5jdxGC6vWHXN8S7GG3ZYe/lnBphLnu1D8r+AAL+nw1mvcDpJUvzk1Mg\n0G2D7dbd0GetazAIyxZhvHfNnp6J5tteUlsyBYMarME55L3tFRASHe1koR3g\n/oxdwvg6IV3JknbogNQoimSoxvZCrsTWdQmYTOUSK0dzkxs+Npqtyt+lOXfA\ndphyUsL6VfoLiLU5FA9d0oB++78wCIZ1StRqvHToixuCIrc5D2baRvZFLr1p\nsGx2iqKAUdUbYFRiO4VFRaZhNjCr5QgtivlhCYsKa6xhI2bj1nu3e+x2Bjxn\nH0m9+Toibc/4qOSJL2yoUSrsXxwX7k7A41gJ4XGN7bLC/gI6QuREaB9pPvB3\nMcTE\r\n=OYRw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.6","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.22.1","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.12.1","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-9bb5d30-1604480405847_1604480473260_0.11360415767295384","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-7d772d6-1604714927143":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-7d772d6-1604714927143","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-7d772d6-1604714927143","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5d55e21471ab308c1ae3dc02831b184593e8367c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-7d772d6-1604714927143.tgz","fileCount":7,"integrity":"sha512-rj4Sl5bkKm6K4/fDd9m5dRs9ECoXTOxcDCQIcp5QUpbXQfkD9Due6KboVyVKR3rLXyMkQvZE1cw4N7PleiyQVA==","signatures":[{"sig":"MEUCICeBhRbYExnEtM4/hTZd1Loc4Js8wz5qaYpUY0gekNFfAiEA/G/7zl4aUUmRVRVGXHQn3d9MX2E59lb8zf3rni1U7SU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpgHgCRA9TVsSAnZWagAAoGYP/jILbGgGeOScHdlWbfuT\n0t6VeSYHOi+JVav1NcRRTrGQ/XkmS1tzq0GLXleK8xRjRmSdx4SKzDYli3J/\nFIzKfFaRWuHNA0iEjHqFjRCTpv5AuKSdtXdcnLLxT1DFVCSF7zInQX0txuXY\nsPJFXzr7Cxq7d4CvJJ+e3yyGwdshwqNF6We0iNQQf64COsHIJ6e/gsTo56ue\ns+YaHTv7KCR2liA//9wN1Hg0/sNVV2cX6UB5V8H5fmuZ82iZR/BdpDG3DdSv\ngD2qlDzHw7YfPpCcgeW8JhbB+tQ+Pe0seWHgw8FGH9XBdrnNfWkdAv2k2jDb\n944PAJrnFLgFaNXzho641K9GZpGvJIHY3Nf2qe78amYhS/Rh1SjRrPcoyTLb\npDgrOUiFD4Mslbt6vgRPdcrU1dWb7tXSQLs5O0X/cKG0zhcHnFfPueXJ5ZBp\nF+0bkiZ7mVpDpeZRY0iNcNuNP863lACdMATOdZ2rScAtP7XvaQpvfcIcWUBp\nliXOsOF1OD7S918ec9880pT7DhA26L4xL2MuxIMITsfvFHG8WiRHiFON5PB+\nCvQXYvC0dUjwtMP6vEO28liQIGoDRKxyNeizv+zDap1gFUJLreKGBDUK6FB1\nTO2ikqWYdtykPF0qPB1LpLOe9PqDq4C/6fp6VO0SfQKeQqeJl2HBOhMl+qXL\nPkGL\r\n=5fbw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-7d772d6-1604714927143_1604714975963_0.22004650390487202","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-7d772d6-1604714929053":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-7d772d6-1604714929053","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-7d772d6-1604714929053","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"af780502d894bae8d8518f174206a70bc6a43de0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-7d772d6-1604714929053.tgz","fileCount":7,"integrity":"sha512-tl8T/lh5QH6TxofeB7ed2rayKh/p+xxZv9YSWCK7defWzy2LDXYS7FwPfuTpSjub0S1YhNApAffhQaa+AafVDw==","signatures":[{"sig":"MEYCIQCQgFQeV4rkw6CebwuHo7G56JwDey9XZdADs8e0ASkCfQIhAPQS6UAKHxkG+HsxxgfCK6zO64jrnzQmul10wzfvuFKD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpgHnCRA9TVsSAnZWagAA1GcP+wcogBOPCEE4XwS8xHlL\nV37XvSLb0ZK9bjpjlLkH6PhK+kJF+4SJDDYcGln78rL1Y53+Ydgf5kJbDzkP\nQ2lUm7OWONBplVvpubvYmYdx0k7349J7s2hqq+4/WuxYSXb3jtK/ukRJFD48\ngCa7AHliR04E4F+O9XOi8zg3nW2zESauZNUwfW0iFqi9UKozcvpTIxI8xtdH\nkswiDa0o157jr/VCuH1u0WWUJmOuJTtnjgmVhcBdDW1j01WPOoGSkKWlPlRs\n09WkGRs/ackhX/bocbL5jUbEDf4yD3i9pMT6euspkoGmfSIFrXn9ZHt5Wr5z\nJGUC7uprL7Ya6KF3b6tUqB5O5FoSF2ZOkXkDxBvkUhb7M5Nugsk6y17PP6ck\n/4Tic//Au3BRAo1iB02Exv3NgZnGI4BcbTqWR1InOCD1bNhMeIFx0DcQATVo\n6nQjba9vYmBuywcD9Td6IOHwQm7R7JX7DtAQ9J2RSL8qrPpiQsmjXTh25VEQ\nxfjrkPBNRvWw/I7u2UTGaNR0UneJCIKhc0fFx2SrwLfhSrZk4nR2k/weFsol\npsmP4q24M2HYWcM8U0IKWvAz7sUbPakM7/hOGhd41RSXa9F32O4eOqVI3nxh\nB8ipq2AYhFOT7XtAQZSB89IJOOHPao4mhrP6dPnPz9ulaoFrFch79AEQTtl2\nbFNv\r\n=ke56\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.1","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-7d772d6-1604714929053_1604714983390_0.31182221125534904","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-c6ec0fa-1604843770174":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-c6ec0fa-1604843770174","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-c6ec0fa-1604843770174","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0bee25cba7b412e5365780096a0a6933f911ec67","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-c6ec0fa-1604843770174.tgz","fileCount":7,"integrity":"sha512-vSS5LtbCTKY1nQuIE7zbEM6zFmyk4cTjs9q0Axr2nqi0s3TTM19x0Ktq0j9SWZ0OBRPkhfPE8culL8syK0arZg==","signatures":[{"sig":"MEYCIQCZTGGEkcQzjTgjIlaa2cP/tzIlX0TPDntKRHGRRjkiCgIhAL+Zd6lZzlhlJEbpHUzNzEbWhirZd//AvqQxb53VyMqz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfp/kqCRA9TVsSAnZWagAAFEsP/3qXPFtJ3adaoBPe+nl7\n1DFr6PVQvo6FT8vRnjZu9lntXKzBTDBx12l8wlOSEbfnvxCHwqOg+BLhzTy8\n1Jqo2F9bqI1EYDck4Y3Jv+z3kBz9+ijZT4Du2Wv7Eot54a7pC9F0rslfcLmm\nzVO48bim+opWHRlm2xz0wiReHmrFUH/IR6UlP68ECJ3hzWnsE2lDbJsnxPJI\n0YUpT/X4f2jipA1AAaJuxe2iKfaCGankNczH/Nfz+o/aU0xP2osDw7cqBwUM\nHqnpGw5xerzLkWK894DfKwGJAcMuBDn/yqJ4lndvOa4KGoQQTakIrOUhy9/2\nJqWEKE+sWpyNbKrv6fKfclwRMqtOpB7Z3iXr7ROjzQEBS4txfFEf6gIo/P3H\nIlzYoGuhXjixurer+9ArdLxeki/9bIZgJaV/MgDjZjopIQyBBzLO/Iw893X+\nDRLM8gRMjwSh2gn7vZGMU6WK/amo46WQoteCmqh7PO38Yhnqan/vA2J8juNs\n9owrm1uTlHKYoiWjpoi1JnFoFrYsFu7iQL6vizvIqn05ti/0UbljP5+hZao4\nCaRVxHE7sdQokCAe0ViHoue/ydsMnxFh3FDp7Cz7O9wBbs1j0u2Ms8dD8kwD\nLid0foAJPFh0mS7nvTMZJEQ5vCXaVmnzd3Z9fJbNDGsNlXgg3jiTEReSp7bH\nihHA\r\n=diL5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.2","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-c6ec0fa-1604843770174_1604843818111_0.9772215609969332","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-4ce6ba1-1604843774715":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-4ce6ba1-1604843774715","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-4ce6ba1-1604843774715","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"169439e7c192889c0725fbedb6d704e71c3a06f5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-4ce6ba1-1604843774715.tgz","fileCount":7,"integrity":"sha512-rxShD75+vez7otVBAGrtYOVmBRt4nJBcV/qD8wcvp/lqj2NmP9xvRLa6ONZoWSrRrRrHYDfcrkE2UKhIAGR8FQ==","signatures":[{"sig":"MEUCIHDqFm3rcUwE3D7Ta+5tlRPy4eCGFTbBuGOF1E661FM/AiEAiU5JcD6lnaCXPi/5nOYwJjbZKY+ad0i63kpPWwSo+RM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfp/kyCRA9TVsSAnZWagAAsfQQAI6g5q5/XCfVN0x1pkEO\n2Qr/K2Gy+OXMY42wSvqsXrCJv4vs7QHGFla1v5fIqLuTxbR+b8zPwD2HAsg2\nzmbQerTlEez9/rMbg2IpneqCuyZOLkZFwrXbusJySFFXBk72pbarAePRIwsu\nQhvxxoPAnlAZdSkQd60DiPsWf3FTtPLs4idx55nYP6VQPnVXcrOz0LIhVxMa\nGoFFDhCWOCk5IuYADMEYyJVsgkTZLn0ixLHWmUlfKMeKN8ai5LHUkmkm/oYb\nnvgL5zq7o+FOgx9dZEhoeH1vZ756yYVoXO25A9a8mmI7LLnPHYj5QYRgTpT6\nGTVmGhsGK3S0TpjPIK9a1U84hZ3uoSQvHA6xnOsqHtqoHHJUsvvdJUc9YEdS\ngZSl/QfgZJjDhP922BtFWdBcFGVsn+CMmg4OpWCnUrjyY0SeTQC8nm24oGrt\nuYFbNefGB7W4fkNtbikc7CN/sJLlRs9Bk8fxqMGI20RXuvBMvD/qr19nX0uk\naHmNpqX9yp3y84ZGxSb1uD8Dgmacc974WtBTZtV64+1kJZr70dB9pEZgqQ9v\nU69+CXN9veHGpySRTq1UZU1hJxwHHqX5/CLQlE7KykBVHKXOxQJpaBTFdq4o\nggu7jdQL9/W2jI0OWWjjx6/4fqcEn5ioqRsLp1wMBPjQvBIZUslv34FNcAEW\nGod5\r\n=pBhW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^0.1.1-beta.2","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-4ce6ba1-1604843774715_1604843826009_0.6321905432384358","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1c84794-1604845646431":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1c84794-1604845646431","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1c84794-1604845646431","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9ab771d6da30b45aad9258a8b38c01a7e2fcf9de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1c84794-1604845646431.tgz","fileCount":7,"integrity":"sha512-d/ehsDhONW2DWMMQSBp3hA3jABL9ewVSo6ocOiaM4doh7AJpcGHf10blSVmqGzQz8UHGb1ogegw4yHywWE8X2Q==","signatures":[{"sig":"MEUCIBIyzoZEqk4W4Pfww9TZgk36EdNBFXhFoO1Fom5S0aydAiEAzKLxgT7lMdi0z9lzzhyUXgmV8SwKeaiB8VpoGSkmuBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqACDCRA9TVsSAnZWagAALfQP/0csoxyj24P/0YTslQgD\nRbbhVjpLFWUAai04SZjdtE+Yf6J2GUPP3rFHCzkshXmK9iVFPl+Q4OdPHaDW\nie7GisaH41a+Ywb1hUAQnbi7XtKSeCJdfq5GzDBZbEl+Ok8FfR3UXOImIUnV\n1CswiETlcGx1IoiQuYJAh0xRA5lx5dq3fgQ8tC2CSbOVqcbPmvtg9xbgU8ks\nMLiSRE1KkJwB0CYxdJK3V1mEFln8SDmwJ5ceI0lNJQAfdGgOnPGZGp+iJ6lX\nQVI7KcTG9ELzS5MvAqRbKXxt49TXV7bz6RTYk6pCvyot2myh9j7yVzqJrNJk\nyBpL1VSeR9n5E7KV8bjMGB+8EJ2l0gSgFWEfaBAuU0/2hF2JJEYxTYzi5O40\nqLh+UzKL/TdnCPDUOrVwk39sm4rX+sR3f6NPgiEJulSZJm8zgSnwp8Fngqa8\n5/mHsX/vsK6AOi+aXAMb9A0RWpiHED0niWzt/xyzu67/yF8NKrj/5Va7LkRe\nbM8oWvc/BiZLOMY9UHuEpLAUFLU/qu7kfDXsudop57/Xx8/4cs3kLT5XpUPO\n7/5V+z7zkXTmbN68CDqbGg0vQbRgG/5fJsLkeYVGh/BiaqzBKnvtjIynwM/r\ndf9Rm3smcfPtY3J8+cWt2N7/8t4jAX2WbwTY17iFY9eyqWdzhAwQyc5R8jqo\nhT9y\r\n=ATrk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1c84794-1604845646431_1604845699088_0.37718337675371494","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-1c84794-1604845647127":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-1c84794-1604845647127","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-1c84794-1604845647127","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a69fb1e10c961187821592eae8a91dd9c882f862","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-1c84794-1604845647127.tgz","fileCount":7,"integrity":"sha512-5hUheP5rjkcIPByQoJqnlnieD+k20FnHZ8aoKc6jtNOjJK7ewmNvsqWgGwftRNVXIhdPCZOsNPXN+ejAkmJZTw==","signatures":[{"sig":"MEQCIDnge7g8T82ioMr7K2LH1wwL1sveWSmJaRHBLdpgHypJAiBYtH3RsjX8nPNscfG3585BxZqtMWPWgDColhnpXVQp4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqACSCRA9TVsSAnZWagAANfMP/Ayeicdw8UoEKTMOnL9z\nJ2pt6IcKGH6wxMBQt7pVfoZ8DwK9EVS4QTQJZWf+eojc2vi+f6kjbZ51fjDd\n8Mm34CtwQcMoPpVjz7s07+8WeZPrM66a46J8ApB7yB7LSfrg2Gi0PPXNAxeH\n5BHPM0TNGl9OkwVnmRUHJFRdu8DzyFNtIjTovzelYgRz5kcAghRUY/VlHIuy\nXVNJ7nRVhztYcqmXkO8ESiF1iUgiqayqoKiAknVgINtZXGgOD5DeCogVULIB\nsAiFeY2GuP+VakKOMKGVmn/yT8DKRnrAYyJg/lTZ6iA1XhDoCdi7t1pQ9D/W\no2HBlZL21ceAH3LBZizlBgiE/XLxldJp3/8KUGrkzQ1BfthqPQLrR+NTl0oz\n0hUc2N2kq35ZaF1ZYjEdFmTqLsvUHmGT+Ku9dyfLTQpIC+IdIn+XlntxbRFq\nrPa2pGXx+L9DN159epAACr6woglYn1L63t3W6RFdl+6VXcvqPzZUWvsQ12nW\nSeC5mPQ23Ccc0Y6yG8Gs5aJrmuIpOV2v9Zraoh72eMiEt2gx6rAIP27l+vim\nGM4Rtp6Sk8wxMMuMz6gl1eyfVbXcHL8kmDt1hqEy2SaIl0uJ52XTv6w8aNaa\ndr+Bs6cckmexb6+VjvPQskk1QUVAgS/fGf+00Bx2TFfmLN9mLV1Pv3xIq8oB\n4kj/\r\n=5iN4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-1c84794-1604845647127_1604845714337_0.6232491350086711","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-8d9d9a9-1604847187726":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-8d9d9a9-1604847187726","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-8d9d9a9-1604847187726","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fc2eb28191676d92d6ece823bb39c4ee70d5da0c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-8d9d9a9-1604847187726.tgz","fileCount":7,"integrity":"sha512-GlUgwFJLhn0e4V/KXDxLdIFR4hz2ctjMS6sqvS7rrDwfQdgtKhAAoMNxbFBQB6fMEpovyJvYPbkh2rMpWBj8IA==","signatures":[{"sig":"MEUCIC2HiTLs72rxrFR3axIgds9Wr+CSqHRuU8lSWIC+xilsAiEAtgEuC9aHQSUFyIEgVGfc68r5fQF+7as1TSNTxlEXn9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqAaGCRA9TVsSAnZWagAAd5IP/0JBPkjaTmdgYFJCGPAy\nsgXUc1oTz8BEblJvPLLdiwo7CPDTfuUkkH1GGm0vTNOBeAQH8oz+H//J/No6\n8NIJvNJ4eTn8DiyOHySQsxNZSfCljNX/SQdn+Ea5ReiTtWJdUQySEJCBl+0x\nayhTFvFMaSMXGg4sJ6SN4wGaGMsG9lDr1tGoAhSMjIFxyG2PFy53SIqILeHs\n6Hcr5dMnxBnFgrGbhSgFBQnYW9ibVw6BkKd/DVUdhXbNI25Yji1yv4c7s02E\ngznrqpyO/sArYtJaDsE0AamaIGeTDptoeFY7UDxVZidMXC1Dlybcyqh1i98Y\nnkd5ndr7h+kNKJ50RxQGm32GsWTN5ZSC7H7S9ETUarF7T2UEzqX9YiW50Wlp\nbNFJYs49ccXurUv8PQulAFW25QIgJDDcgzwoG22qAKsxwHWijJ/Zr7YQvwjB\nK/RPY+ioI2G9tOCQ2FJpNuSlwZgczwOSp+LTLQhqsy0hOyebSv5W6ZHvxGUt\nV5PFrqPZmiLotqLZi/0E7CwTHv3tR9zkdZo0Co5zIzEs+todAUODAFjs74JC\nmoVv4v/Jc8gGhzP32dk8456I1oXfOFJxER5SqrFRQQnj0KziWSNhRAR8coDZ\n6Hrf2CeGOABHSsB0lbfvAkOaqsZSgxdJt6hE4ZXigCyIa1pipltBQMVISqWZ\nU0nj\r\n=6DOn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-8d9d9a9-1604847187726_1604847237763_0.8729629340408809","host":"s3://npm-registry-packages"}},"0.1.1-beta.3-canary-8d9d9a9-1604847184758":{"name":"@iadvize-oss/store-react","version":"0.1.1-beta.3-canary-8d9d9a9-1604847184758","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@0.1.1-beta.3-canary-8d9d9a9-1604847184758","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"de4b5254ecdd00c411eac8444d082bc25c90f981","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-0.1.1-beta.3-canary-8d9d9a9-1604847184758.tgz","fileCount":7,"integrity":"sha512-safPN6wHMOCVzYlxMwyV0ivlfe0Fime8UMSVi8jP0hnjqs+TJW7zcv0Z6tBnIoCDivashMMTLga/ZBwHUQUuJA==","signatures":[{"sig":"MEYCIQCYAOfk9IfEsfyN9fO6CDNzIljEPim1CCFq8t0QrQZPkwIhAIq0+tIi+vW7U8iT+JuVNaRUtLTnTq1CQd2XLHjajcQ1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqAaWCRA9TVsSAnZWagAA5CIP/jFqkYntJVBBeHZtkUYY\no++1bo/moEJnAELOj9M++JEDnyVXN3Wrew1TnK4LSFXl74J0oBgswpTdK3HJ\naE8cUii+DX43WUBsD6RliO+mZIBm9ml8KcrJw9mOI6h+gYSmec6n/2cBT1vF\n9+Vg4eXc7oUFxrvTy/pAsBRS7T31Yf1V6tWJ+vcoPXoGbs9jMEj2uscbUSNG\nswqrqfntQFg9yBIy39CKjP8zskrTJ9yuVYYVXnvu8xsfqbVy5QzTzcmeEfwD\nacWJFRaOqDF8FvNEHXU8ha1tdSOBom/D1TkcFZicfqPbwtQc3DHqeZkr8UML\nAKXp5HtM+7cdRfXnz8MC406Z3TFR7FAap/DA6z/c/g/mr0vLefFZMpHwLdbM\nr47WBRWzZFMyE9Ej4AVsttkQQnCxbsxTwmj6a7Ei27uBRqbPHnjJvGfwbJxS\nGPP8DkYQ/o4t6nITMd9cxS0PnuWItLkwBUXWYjqBYhA5j3UDzTm8ADXPMB4z\niEvFUsPzMrifkdN2fGwsEM3CJBr0o72+ZHFizqZcr2kIZwBykpGnDZpIOcdf\nb+2KcsR+mctGrzoJwhtZa7WUP8v6Qk+fwgbDyDyXmvlB5TD60cKjghpuUqeu\nJoXJJk6xOIRtPOd45p45SUos4qlh0uVthEo0xaJBoy1Lt/YcR0H552v2kDyB\nRYx8\r\n=1lBo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_0.1.1-beta.3-canary-8d9d9a9-1604847184758_1604847253373_0.3181215583978898","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@iadvize-oss/store-react","version":"1.0.0","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9b7e9a182d1b5a90e9b693f183027b80a483ceb7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0.tgz","fileCount":7,"integrity":"sha512-aHcmmH5Mu92CHMyzJSv8lahXNkBnoHkU+jLSxCb8OaL6dLMQ+vo4IJVxCvD/a48oSHzucQyF6oHFLZdH0sGEXw==","signatures":[{"sig":"MEQCIARb06FH62I4Wo4rAUTpRYnReezdlYvG3Rf6BnGjHTWwAiAll5mOiSfL1D89bfRax0ugMtGCXQgdCn1geiNH+KqbIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqAeFCRA9TVsSAnZWagAA+ZwP/A3qIWDcuGCIRvC4ZOn0\n6puieTbuHVns++tg3mHVTZ+CI27O/n1rimnI3toxBRwNVFHFYgfeTJUS6iPj\n2otSMxonshY+k7ICqg7TRvjBW6dt3KX/pgymkiqGbnhi7ZGPG3MDWDKTi5pJ\n9ghXBkAvq4eRC8Dabq9I+A9bAg1VQF9tUW5Z6McGTXgLhgJFI/ObsjogLSmT\nW6wo78UMv2szLGMQFY8N9Ov6BHy9ksQNBkFEBFygJRCrTB9unWPs+Dmy/5w1\n07wQ9oJtlfzUQFGsoujPLQ6bgbAWQ5LpEekQGjE+4vFG7yAIpR8ZsK0czXW4\n1b3DkGlDBOYYD9x01gYUNTWQuUdLzJi9lp9RwG7tzkKSK8i07hF3x5cEkDkg\nZCZ8BoNPoZ7LxyYjnNz2nr7fd2qe0uji7894InBDBPK1sncnb1adYoLEtLUI\nwn+by4P3XuVnk9zdJ8/xZEwF7UFUuE1w9I6BNfHsO0VIDa09yrUnA+U4rAMf\nGYADkkTPH6p4/jjr6HrcK0nT+vAnyBQgFFYIo9p1bPqIOBDyVt1uhuDvu2Bj\n5KYBUpkn6sjCRaMBKjqiYOCi1rTf/+OZO93tJKwrMtSu6wEOrHb0fJTA/sJn\nLdC2jHe7sQR1G63BMOBbxULMVth01/ytJLclq0qFBRamDyZfbAVW4Pzwdzso\nU8Vh\r\n=KRZU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.3","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0_1604847492698_0.7025907067977828","host":"s3://npm-registry-packages"}},"1.0.0-canary-843925c-1604849639292":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-843925c-1604849639292","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-843925c-1604849639292","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9e0856a80bb513de9a10758294cafd67711c8008","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-843925c-1604849639292.tgz","fileCount":7,"integrity":"sha512-BDh9pn7nAyDgroBcovRbdvgPndkaUelJua3bHzup9bMhiZPLyEVDxjmi8DuE358pLy1ZOimecQwsPOzME0ToLw==","signatures":[{"sig":"MEUCIQCX0bVGXasJBeXtVTto/TdyauaFvqupS0FTIHdVesCavgIgKt2Stq3oyYUB77zbtyJ9swCW5EUoxsj/dvxdvnAyBlU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqBAYCRA9TVsSAnZWagAAFfwQAI8ZrfZK+XCd/Cwtii5k\nE5Dle3s/l/172q7nlSpKjboG9Bthq6jka6ug297i3V25VlW0+/bMBUJ1trwH\nl4vlGTtgpoEdnxqmGO7fmK8qwPUuvHTC+zHK28uQCyRnwQ6HZPxnOcP2nEME\n75Oubn2Fyba/McGFb0WTmjxtlXJixeu2blDe7T52iXnAH9iXb72kBg4ShpQT\nETZ2pySz6pBNMhlaqroAi2MGEl0LpA6xmgcONAWyOe6I7UzmEo/QeeonNgAA\nlEY6jJX9lIJYAwGvRmEIOofrmqnntCR1of31qihqm9D2Y21u15VnfVslLuhI\nBSEtqkXk+kI/KpXCtQeHv6crmRHUtju2hqfl+b7Okx7P2mowEuanmv9Gv3U6\ncgzEz7aG/KzMG8ctxBr4rOKIAvJS+QdEctwojTIQaVH3yBzh3CntofpTf0Y1\nuZfbLxPJAMvMlQdSlLvlhOsllH+WifedKV0CwM1XJsDYaNHzAzgATqYkwDaQ\n3TVa+E+Ex2YdFaqI6YKOr6F+zZ+sEbF3sHWihG/tIVbfoQPebB2whHDlbBJw\nUxLOjvYosYAGsUQxh901lHbn50zh3uIcGzBpc+XqEMNO87z4RukJRr7oiFuo\nNNtt01swWK/MYxkT0VwfbyFEFT0vcb3NNsnrkQ2iOIU+eu98UAGLjEQ9Fx9t\nP+Pi\r\n=3LFx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-843925c-1604849639292_1604849688323_0.13404378496578162","host":"s3://npm-registry-packages"}},"1.0.0-canary-a80f982-1604849641806":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-a80f982-1604849641806","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-a80f982-1604849641806","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fa6509b353cf779333692c52ba0cd4d736b68789","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-a80f982-1604849641806.tgz","fileCount":7,"integrity":"sha512-bBvPDGnWNJOwrfbVwYe2/3fzUyv9zCaMvO4DiNUIBqfVltA974gATgLmT97YHvHjiA6T2RVmyXHxGZRdpF8VgA==","signatures":[{"sig":"MEYCIQCDGiCqzSelP+38SwQiEPYNM2oTgtY1y77hqfYAi0vK9wIhAPmCKHPbFqhtIO7kqy8E0N0HUsKmENewsJ5ngZZ84rcd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqBAoCRA9TVsSAnZWagAAFfwP/iQSOdANwuEhLh9sheks\nU8jdFVgRlKASgAGXgsEibRYbIImqwTDON+lkoD1aetOA5lSP1MjM2ojRbl6c\nuv4EN3EVP5rZPMQK2A6Q2zp+mboplV58RUbPwRzSAOPosfcPefTzPA9rrrVW\ndqZha2NJv3B+13HyFj2Khtd+nyH1COxlY+8VxKCb8QPVS8ZnvJ1ZkOxaVoV/\nZ2xYvudfl/5NAWt6GncJo28wykgLhp+we/SeVUV+RQNAKEZd7GP/lUdHuk+9\nINfUHfgIw9iE+6Gt/XGMD1HuWfy5hpkzojmXT647YmCFE3DpiBmAyjaUnTP0\nw+UhGYaFMjK/no2bTt/O1P7N0dsnWVA63SAYL2KyuNgPaSDyas+4aIlQdI9J\niJl9NVsEpskDjwWy+HcUKGBx94r1BgONVpTdBdP6ZKRpKwqIt4ElTWbEKZrN\njUQ5QN/kchzj8OU+8mdKWb/++vSq0GNXEGalNH7DcZwyKSDQrj2g6SQjreDV\n4f4NA4HZNxYtC3m6tV1qJGdmDgIQrf1D/CewxiVI1Q1jNSsBmxh44hF3DAGo\n4p8MTytNUXDMyGH0+UHmA19IDNA+k4BXRO2MPrWWgUTq8KT4mU9QmpfnqmKx\nwWkHGTzTwMwSRlDCrLNdJeqrsM4hyn9i0cAche+Iw3JlS7zjC5OEqCARBuLI\n23xm\r\n=b6g4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-a80f982-1604849641806_1604849703966_0.12491762041121635","host":"s3://npm-registry-packages"}},"1.0.0-canary-b339242-1605296671879":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b339242-1605296671879","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b339242-1605296671879","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3448ae1a21f654b11a54e03ddf017b844bac226a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b339242-1605296671879.tgz","fileCount":7,"integrity":"sha512-j8YBjNnwFGk4fZN2P5e3T/wg3ZxaF7GGwRRpylz5+mtDQFrFIWbVwUUFw1RcNbOhMoO2hzsFN5al8+cOEZPZRg==","signatures":[{"sig":"MEUCIQC/X9mlfKeu7T5StFlAsoZHl5LeIgnRiHkJB0IBlvZYrQIgbZKMHUqjmuBkcaQ1kwbHkdYQ2ZblwLHKxE/xUeO8LLA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfruJUCRA9TVsSAnZWagAAa50P/2JtD1QQ8oFjbCIo4Cwc\nqX4MpJ+ccuEeW2bSbqfEY9tPQPm7xyYkriiDPUcz0ymY7cZL3SWMGyH7QeIT\nPzLZxxsV6Y/pwi3CBni0EpMIcn4JlDN+3oqfByfV158pnle+KbZyoczRURdj\nWoWlEg5ES/BxNa8XCHg3m9UM98vv2pdw8k8CAnuGKCBmPtkBdZLWBuwjDOLE\nXLBRbU2jz00OvZTMhbK+EOomiE8Gnorl9Ls9TNc/Wwb1ENjybYoSwnvsrc80\nILtHaXAtE1pPDLVUhmnWiX96EQWbP7oDWRXns7s10yDG7prnoDQ4va3WxH8+\nlNA0vcuCugyWNuIGEyg08zfD/2F69GX9orKqb1OQ/8sYdLeSCCGTlzWBdXHU\nlUEuGK5yKAf1H1HPC05tR62lSXd8xbZJt2AV4OKG6SECt8nLbGFmPmeM51c+\nJHUhB+1B7TQLklhtQmgmbHFLdTHlalGN2Z1KVq5kJJKPyG2Jc9QJGPNZO6Os\nXzKzQ4qeGkvm+f5Kbwa/kF8fy9ZFRTWkh/uQbhbeaVzAk3uq5kyxI6N+WPIf\nhJrM83yOpseYHSrzkhHvMkE8S+iWTQeUcim7izRAJhfRO8IvfPUvEWEpkH2C\nwVvPrRB3J/WqeeHgbewhPr2LZJpSPS84FcX55RepcCCnx+pku+hyBkxBSJ/D\nbiOG\r\n=3NkR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b339242-1605296671879_1605296723858_0.641582820209849","host":"s3://npm-registry-packages"}},"1.0.0-canary-b339242-1605296673805":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b339242-1605296673805","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b339242-1605296673805","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"71584e1fc3ce2948f319edc0b643dba904d1a558","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b339242-1605296673805.tgz","fileCount":7,"integrity":"sha512-9IqB0Yld5Ag6d6qN46NLHeZaN/7+cPPnh3P3/uAqd4c89jvyXtReTHPH2Qt/bztD50BohAFIP7fQZonUh6s0RA==","signatures":[{"sig":"MEUCIQDSnUZ+BOQEP9FTT3D8HkA95xM9DS19aJ6cxQjiDP8kQwIgQOINtSjYlCH2mcBahsfQ9cDIv8qzavuCcg3+4kVlyJQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfruJuCRA9TVsSAnZWagAA/1AQAJQFi/ekMA1RvLzjBPRa\nYlMBVvN/S4NGXmLuOGl+netuFIOoOnklKcmIE8RX0zaFF/f1KNBBPM3T0V7W\nsL7Je1OILeYY6VGR3joTSyZ15BpT5qi+bKFVIU6IaHKykMp+ToE1v8rAKJiE\nuy4v0S70CUecV2burqNqOa/M7824nAjiIM0U7rNoDg1hkq1N89JJt+R0mdmw\nYWN81qBt0gNPZtF0zKWOfVhYQOE9Nqp0BtcP+YSvHP+TYP1Z9A421bXRiEvd\nxU2M5V21Ja0vhEJnBDWDz45v6HXkvxzY1LT3+hQzCSvmP1xT6R4/lQV6AIop\n1aW19O1mPUlxMi97vv5HJrXA9/64I0iTiZ6ZvZ38J2OgTavlfwkkQKIEyVh2\nYf+okIDBgtFoAj2uaGdcXY0YfmnWTSxHb8rPefftVjC2aQwvRW9aynKXoU48\n2slQfh+4nxJnntd7QFVJ51FtQXj1tYQIs6fw/BkP8FhHvr5DULUHgI9zANqO\nF4F0j1eF+ZFlvLI0Td07bm/q5mVtXcw/Ij7DSPSQli0P73x1+rxZrX0TDMbs\nUCoWB2pmVyhhlT5ImknsWdD/SmOEOjJxyk475rZG+DJRw/wZg7FMT2yg0fkf\nISwwNQj09VSxxqy58iuuytrDTWgDENI4lQlg5CIgB8mN8P6H0y67IyMoWbXy\nYesh\r\n=7HBU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b339242-1605296673805_1605296750149_0.03204978071086306","host":"s3://npm-registry-packages"}},"1.0.0-canary-f0d7a47-1605363899098":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f0d7a47-1605363899098","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f0d7a47-1605363899098","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0613cfcd39483a7702f8ea45e0d7e091cb02ef93","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f0d7a47-1605363899098.tgz","fileCount":7,"integrity":"sha512-au3CchFBNkGo9kszl4qyBgWwpMcpMR9ZDSxXvD1FjAggngzBYm+h58rflFOuMuYe0PiUftkgqQNZsMdwN+LjeQ==","signatures":[{"sig":"MEUCIEDNgt7ur3qnAGr0+9WNGfS6ta+017Qhl6ocoOzLjUEmAiEAxzDJgcadSEXIe5RbV+b3ewJt5waNO91TMIubi1vKcgo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr+jtCRA9TVsSAnZWagAA95IP/jyH9MuJ/DIT0NXX2CJo\nqNz2dx7ZlmKaKFPxnM/MfJ2VDkewjakMzhxEWcG2yMnAL1mXSpAxwYUCY+tY\n33jpxvwf5BfI6gTpS0BDt3GfCmUcDjxN/fp/aQu8GSyooQRcU2FbN/49OFd5\nlKt/OwcY5TX5kHPn3x1XPqIaaOLwaZ0PMsNHuxzpJW9e19lWGKGTp6S8pGmF\nCAGjtXQ8meh1tAt466bF2OSky2xk1wUbVtE7srMkwdf88XTyktCg7bVgX6mM\n4eVKTbAseN8OkFBgQVpg9QTvYEaEiJKX68ndP7Zvo4X2dGThcxIcJGojUALj\n3ecNYi9I6Xb94qxxVMF+O/CK1LY39xXlWpMntwN8Q0pbEw1wp0SiN950+nJ0\ncJkoSxvwImL/KB8Dz3zkxA8DgjVuFR8Zb+jjdL/LIVP027vCeLdJFEvR1GaG\n1KYB5x1/RpITSw/Sa9CqpGerw2N0y4e9sPWZNCuAnAXEsUYWG/Lgt3MxdjvO\nJxct3pTnJhzocqJ+SXuwXw14tuaEFDUgcstNNNkO/c55fdN1j+v1gUIlFPEG\nW77e1tJJeHS/i6Ryyf6uvGIUOL2G6/cPwjPa5QAOcRHp3dwzBU0ZL8Mj0yTG\n/3J2auQzDGSEFDBxcmhkprzRe9U+/aktO5fr97xCbGMHy2Bn/ghUoYTr4Brq\n5aZ6\r\n=OY5K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f0d7a47-1605363899098_1605363948775_0.31055394874848985","host":"s3://npm-registry-packages"}},"1.0.0-canary-f0d7a47-1605363896517":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f0d7a47-1605363896517","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f0d7a47-1605363896517","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"044e8feb6d46ad7b20a7324771ba1ff7170b6ae5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f0d7a47-1605363896517.tgz","fileCount":7,"integrity":"sha512-uV1FjC/7A0YxUOUX2YnfQj+7wbJl+WRUWai5XKRTH7WYEVR3HMrUNnh50f7LuJ9Tuv9a/r5NcE6vvWfQY5P+Yg==","signatures":[{"sig":"MEUCIQDq6lgUvr71YTrkHG1yWL2+D0XY30d8q4Bk81r5xx2+uQIgYRwvMNsnrznKr8YaSifgj71rWgk6HrM5z7cscIExR+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr+j1CRA9TVsSAnZWagAABvQP/iIYHWHDpoF28v8e7xyK\nSzs+QJNdAEBLMSzaDcgXMJ1MlRy7ib/o3xnRXvEvhDQFflWOVPdKbyS2REaV\nM+I7NrxyzBelTurBRc2FLIZ8HJ+hMbQlxbQQeR5z5zsZiL8QzE+DE6ztndbF\ntev+QBs5WXLJscDvCHW/LCcombn/Zmy9OuFPlPgmLEUe8GJNNdv4ros9ckK/\nssT6snheZl8JDFCGXFyVE6H/MmODnPr9PoLxnjGPb3TfpppU3rT05P7OqiZf\nGpKC7Fqu8AZA35A+Y0qjUJZgcj1JePm6S9YTHYGrNV7amkdPplIOViHa+uRZ\ner+3pJdRmyRR0xqg7YW61MiwX2KhRRbCuZ4/azY2l5RKIjwOwxtECT5cB5rN\niGCUazDCmW0zBzPq0wQNA9CkJrlaN2Bac/L9rC75DvGY+3zijtGpC/DCpamw\n49nzayESZsdblG0pATBCqrHx1Ewkl+nhpwCYDkZ7Ah1dxwiKfE2yWA5vF2Hq\nNpwu8EEW0paoH6/7/fJHbPxYCsuzBOSFnpfX6geyfDxFa16FNzpwZLQW9GzA\n1nLBmXXO/Yj7Wo8MH1oAW4aaizP/6gMfAkJA5SQ0QgzICfATDXnahtuBfx8F\nG/NxaI4HrtuOe8akiROUN6RjBM+KK57CriAVkMu3+kHjo/FEctRNlZIwpfLw\nZCtu\r\n=k4qY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f0d7a47-1605363896517_1605363957199_0.5734364136314345","host":"s3://npm-registry-packages"}},"1.0.0-canary-bc2044a-1605689043919":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-bc2044a-1605689043919","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-bc2044a-1605689043919","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d3ee9394ee83e212860a6b83d8ab99bf77a02705","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-bc2044a-1605689043919.tgz","fileCount":7,"integrity":"sha512-B3YkG6GvWtOY6KFhthYHxz2fgUgfPXTV2xn17xPnnmfa79nhYVNEou4Oo9GI+A+rRCdPOfFqutHvlN3ZQV/L+w==","signatures":[{"sig":"MEYCIQDk0Kwg9BW/f+uiRZOn8IqP8zd5+rSlWsNzhw7fQHQaxwIhAIO8Ocz1lDknoy7jAGOlXuPb5NpagQ1zbycAqKgpeyRh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftN8KCRA9TVsSAnZWagAAI78P/jg589HbMjfMPt8i397p\niE/jvVW3CZGmRrkN+UHclXs71FGzQmOlp/TKdVTfViejzjs1eRfJkfoH+EfU\nrm0S8pLKSg8L9HvlON6A+pyIfjgiAwitMuvAQI85vWZ3t84CPjwomYXBaVqf\nnD9/A7nnWkDiWam8ErDV/T9uEOUffIP88KcNLuHAV+aPgLmqiFGBL2UT8doj\nX1FkvMoh42jxPOofQZJNQMI0QiHYW1LimCGZJTiMRz4Xi7vBpVCVHtXWOTdH\nd8xcsVLq9oGP9vJrg35DU4TebEBNYMMl77cC6Sk/hf90p5vWHb8dwho8FxxL\nksdfx1XrP578gtMh45TQai1Vq71glErb8b7B/g530HaAbMbOQsD0jy0SdkIO\nyDlpusnfUDLdCeEKA9raydGHk4dfgvgNGs4cFD3ZM5+Tn0pGkFsxo4kJJe1V\nM8Pwt3oOltrxKVhDzWNpK359C+qC2wxEO20FIfmS/e6AQ2cIOe6UnQ255Wml\nminYO+HDIjKosfpjosO8T+XCpnviMEIL+9/ZQm/IA9NXdzEQ2yJAqDnmWVG6\nzr/pLQZ5Peh+pnLJRQZOtWCNk973vcuP+SPRahy3nhz6mjUSM5gJoXn443rC\nYt5O4fJgT4DerLhgsXicA3irPwoW5Uygpm/tX9CdMiSwKmEvNiWdGXq6LoE0\nFFOi\r\n=E6/z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.13.0","rollup":"^2.33.3","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-bc2044a-1605689043919_1605689098046_0.45881709880604715","host":"s3://npm-registry-packages"}},"1.0.0-canary-b7225e9-1605912888030":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b7225e9-1605912888030","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b7225e9-1605912888030","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5e8b5fd5c85fc0ef244b866dff499fa8775b2dc6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b7225e9-1605912888030.tgz","fileCount":7,"integrity":"sha512-Uzqj2TlhOHc8DvF7S0etjb2QW3xvKfJLVBZE0h1O40vDoyMNhw4KAO/x9a+tXdKVVqHeXdvri9Xm8ItP5pqRjA==","signatures":[{"sig":"MEUCIQCARzLObkh3I+gbyZVoEfIJoJdItsWcxCiYJa40QiOUPAIgYMXxEizQSdBElYBXTZd2F5U/mRzXUnNz1aFv7/G+UWU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuElrCRA9TVsSAnZWagAAXQMP/RI+xcvaD2yQm5dq7jPI\nJj/0FZtvTkOWTCeZRXmGirbj8J1pkMKeu6tar15wIwwJQ/Kc1jPuFikjx/v7\n0tOuiRbeaRRKxfjLKx7VVyRUlNr/KFF9kRdBaI0aKF6sFVi74cZjhk2Xloso\n+7SJVuEwe/MIvIGQSHI7uMhqRWLwTk7a1njWRR3Rp8Ji16pPqA/tnawEM7SN\nH0597nHbZtai0sbVNqsS3+HR9KRndA51Mh9E/bmMOTI7rHltrAOXiZJy/VP8\nSU04gqHHW3Sq8q6SpieVatOfsLY3rAJW9q/u2HK6Twq4KbW6yWldhyo1h9kc\nXjn03BjmtnBcIlZqVSin5I8UWyQEBrM5LIzPPSexJMgbLy+5D7NNZFIKxpJM\nw06KMWyK++svk425LWIZu2nGDEB89FSzIzWQuKk8Uc54/AlcwVj6vUiSf7uA\nAW2YT9O9V64gdTWD9H4/mIa2D31DKBtv3Y9DYC9f8D7Bu6cQ23wYpS/AdJRE\nMjvMMb0+Ocvq3kuIP8dg72pwSINIWdoYrAZuIWjeFqHaYblWqv7oVsDWX2tf\nagQ5V8DWXzQlPjAmdqpk0LIWQWBNOzQ6NlVRquY+sIqM1mQuOpwFxHCttxyR\nfoaGsN2EKST9XlWcZ/KZKoweHUabUAQIlKFQ9xpUYpJz+2+FkXgufdSOFzBT\nfTPm\r\n=Y1uf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.8.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.33.3","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b7225e9-1605912888030_1605912938541_0.6521928991557389","host":"s3://npm-registry-packages"}},"1.0.0-canary-e5bd7d2-1606127962817":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-e5bd7d2-1606127962817","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-e5bd7d2-1606127962817","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ae270c19c16b3e5a7f06b689baa929d5fc3a3ae1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-e5bd7d2-1606127962817.tgz","fileCount":7,"integrity":"sha512-wCOLoLrdF/i/BFC9kvlFHscN+BfZzLq6DxzYfctTZ3NHFT07aRheTwluUfMQsvJs1+vejuFsiYgF6szYzZckZA==","signatures":[{"sig":"MEYCIQDyUagLy2oEU8E7tOBAqW3lSGq+xL0VTxD00bcKovtmRAIhAOG9Dz0GLM/A7ZGvh8mqmsg2bmxcaJRTTAzbu0KvfVDj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu5GUCRA9TVsSAnZWagAAge0QAKFXMeUV5+O6n1c0Z4+7\ntgHbowy4170akE8AigpsKihyuLmd+3XYnjuunxHkdSMhkXPeDJ2Q10UPOQ/W\nIR4doabA2H01u5GjkErB136DXZF/au+A6qSsz0bqgJhowdl6z+eEffDTJyhm\nxcq48gil6TjX+zw4IBs4LkieChOxsMJLNwQIg8N1fCQkcefwXUiMRkQPVyCO\ntr2zwNC/M5A+/cPQUaFbTDjJn3ruQLfFXPShfjIVhBdnEZEmuacxkN572/nV\nG2hmkEHpAJef1vy00Dm5XdStvxyI6ReS+GlTumnfwj3MZy3rOwSEUjMOzAKX\n1bVmwGvxVfPqMN8xxfa0FCuU+4qvcREaS06a8jDwt/uqske97vJ5IqqPw9PQ\nEY9zP10M5Yn/0McCcZy1n4Kr7gAiGs01Jbn02WpZvziCphUj2qS1pwOxa17j\noOCx+eZAUn37EP/tS5GRKx1afBffNPfjxd98ZaGJuhVn6I+xU/zr/CyjOfsv\nC4EnHR/384sQW0XCyeG8XvqSPo7XrsPOXu6NKpobIp2o3pXUvrO1lkNOUYqF\nxJbjND+NygXecnAGRaiUHhloA2Niitx6D9hYLDJdPt9yH++se/cI6t63llbu\nSm995jF6I41bvqIXZTbw3qP5W9f4zdOATgMy05Cd0wZmJRrgrE8pFUCAdl8K\nFU7g\r\n=Gw42\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.33.3","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-e5bd7d2-1606127962817_1606128019896_0.016466871974047725","host":"s3://npm-registry-packages"}},"1.0.0-canary-b42218a-1606630076978":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b42218a-1606630076978","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b42218a-1606630076978","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bd2c6a2edb19dcc067018248bcb887c04290bdb7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b42218a-1606630076978.tgz","fileCount":7,"integrity":"sha512-SfvNdxvGQU2CeHjLZmr2HKVhuYlsXzqfO8GOrplHzt+Bo0VNFq+rFeBPBWJRQKUZlOqOb7AX7CXZewdP4i8rYg==","signatures":[{"sig":"MEUCIHK+RWLW5yQRQ7/F2u7UyFmPawGy60KrQetajgmyw6EdAiEAsclthaQuYGaBIgq4m4rZ+yO0yRUkjF4ustGoWLcGseQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwzruCRA9TVsSAnZWagAAHT0P/1REmaHkJ716qmZdyIy9\nH0f3xU22Se8X1kYtZ4CaoU5YfoOMNODwiltqrHbAAysMtL+49omV2FDeQEUE\nnK8xse5rBzwZWdrFq+gkk0onXtb8Tydt9pVD2Y7vcRMXWlSPS33XtvKa4eO3\n34oEIlruIikeYLE0PmNh4hErFEPgbqyVzIM/1ipHvG/woMmWOEy9GUV3Dh3Q\nzEpeh6hMiLRgsFm0F0fFMx75EqQj5pFfQvSZGUThsaW5z2AedmWtWoK1h7/4\nEdyJfvnfeJ5rFlkzM2DGgVSwVwhNv52EHnfcpEPqTzLY8tagoazmwR/T5ZUF\nJgg0rdnebEUP6Zb5AYBgX+kJc6FIIP9vnu12gzBp+6Eui1734MxWNOCjJVYC\ngSnWRgFa7St5QPIk1pR6hi6CVL74RwHA1v04/kEPgbOTvoQ2sweiRuxTVyXe\nSEwbHnyLg4kP28ah55Id/t/x8eH23IrZ84snCJRZKA/Ai1rXYtmPC9Dbb9V7\nkYxbf7jUHRGDeJBBzZJJwHhQQEZaDXZ7AmYGO4+xyNQobrShQ7qyD21EgDm2\n8LXasRzR7Hz0phaHUOXLDr+xvjYckafH557wkTv7ifMDTu0LURj2fHGAj+en\ngi07Ra3i8ZHPqR4cDzLVjla/oJoHZbVak9mWPgdJB7IZ1KVqAw00Po/DL8Lv\nTUHW\r\n=XlVn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b42218a-1606630076978_1606630125898_0.560759349554675","host":"s3://npm-registry-packages"}},"1.0.0-canary-b42218a-1606630078909":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b42218a-1606630078909","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b42218a-1606630078909","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"54c8946ce1abdf8bd402fbe5d747dbf62d2497c2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b42218a-1606630078909.tgz","fileCount":7,"integrity":"sha512-nKfMbPUUFT6yRtq6izgmRaWbIpS7v+ehm208TRcbTMfG0x2PibmNq4ujYAQ1lD0xpCpEnh7Tf9zWUiiwNIIqBw==","signatures":[{"sig":"MEQCIFtuaqrEqFCF2XEIQsd1Ir5An/2vLJ6LP1VNHhj0N7HyAiAoSjO1YJvIoL50QruRvXRR4T5wQ0nvlwopmjCH7E+pHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwzr5CRA9TVsSAnZWagAA4fMP/A583nDA1glcuYNxdp5M\n/j/VSKE1OcWR/t3rBvPrfJOBfSlk1gDP1SPftUbl9BjMeWB15xfk8KdpQnDH\nTlV9GSd5UfIbIw9ibt4ldLT8Qt2G5/QPpVkot/z2pqEpZCug2RmIiHSIicCU\nVayLn+R/jQBmtCCgcrSSUd8Pv6D2QlRAgu0bcPSbBo/wXjzBhRiqO/CV8hGQ\nlmF9CitXNYgR1FGDpwZcFLDonHJgaj2VlYjU1XHIVsLVHAU9CmMzNjDuGMGp\nNcPh0ItKVgtVE+fFUo4ix6ehrfsCTPYyOehakSabKmD8mZhAsIo/FrQz2CLR\noH5mMdYBXytqQj9MpYcQcyPsowNyc7C3vceUzUdrR4pNmaSz6S5Y8ZyTrfcl\nuCwTZR/T5+ESUwYpbnstvTb4j6tsvU651qBKUrqiBY7LBfYPp5s7XkTXCYgw\nG+S5O1U4z8ud4hmE21HowKooNfQ095qipHWYwfdKjZhiWPy6BjhYIc6uenjo\nItXw7ak/hohQcKudn2vfQQwIsmlU+6YCkHNS9s2vuQANehDJJiNzFQGQ6fhA\nk+Y2MACNmkFB4Jq9mj634tMzDF66P4Uy6SghyCjd8NMXTGMPtv0NosAW9xZJ\nLdXR88KwHzbpd6YlYJr8WnMHO59p3CexG+PwcDopNgEkJ6p6KWjzt1NOzo58\nZsVj\r\n=IfnC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b42218a-1606630078909_1606630136562_0.7176925242976977","host":"s3://npm-registry-packages"}},"1.0.0-canary-725cb88-1606761735673":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-725cb88-1606761735673","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-725cb88-1606761735673","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dfbfced418cae60a53f127b8536460b28b8eed78","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-725cb88-1606761735673.tgz","fileCount":7,"integrity":"sha512-6hUHdIuKE5AzreVOQc02bTvPt65kkfBPI4dqaNQpHBit49i/AiuTW5YRPcz7LeT84AQawhj3hz67gZjPy+W0mg==","signatures":[{"sig":"MEQCIHsNE+RH4HekOhCBFBwcx2JYWTjYd0Ggfe2PGgDwrJbSAiAWbBap5JiDz57ofePTbWg2MkXeJjpc5IsIL8BPk7XOmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24473,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxT05CRA9TVsSAnZWagAAZyAQAIpCXn8LwX2xIh19Au+x\nCazHwz+xfE3CO7Uou9cKrPphSJWhRr4+uFuh+1b3IRpKoOYBbzW6wc5bbuDN\nw+2SHhqfbdqbTS7FGksek9DesJSpXoEq9NktD77p61+yglMLpOtPsYpbDddz\nF5SnaC7D+2E3PJi/4Xq6HhPQ/DtphiozddBiWZAsucZn8bTOUk4nPizBP3pQ\nrrRGxWsCJ9sgzzklz5r+oU8byvpPgzS/X8s6GyHjbmjL2r+FhbcXgBBlxii3\nI8u6po9dic36IE7oO70DkBBCtS9pxXSLyFKNTPSYiQC2GVU05M+6cAaoxJyZ\nc7RrfJs+p1XQZkUZSGQKJ1Uvo4dL5vRSy4iI/qKtlPx/04LbXAci5PUBzskP\nlz3vcLC44Eth1HZL/J3h9C6bRHbJXcgZjdLdX5zYGsuMvAr5IC8rGZBP9ess\n63jWWYUsLXBr02z0FKJSco1D8h2bejJ8C908vVOS9rUMwXasutUEhF5j6vlJ\nR8RMiDeuVJLOvvii6dzwqcptE90dRPfm8zAXuSnZzJCISh3scEszG+YxvJ33\ntgKxM0DiOrl+UG94x+KRaqxk+HqLb7OXk/fQjLDUO4ywJdqH/im6A8ulZ1Np\nOi0k13IsCzheBJIKyyYemcf6LF806Xofqcf7LxEwCxo/Got5eUF1zwDxjwXX\n+cMJ\r\n=1P8k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^16.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-725cb88-1606761735673_1606761784890_0.4698680896338667","host":"s3://npm-registry-packages"}},"1.0.0-canary-2fd2ed7-1606761937987":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2fd2ed7-1606761937987","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2fd2ed7-1606761937987","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3b8cb1698479bebb394ea46f8ac0f1cfb248d300","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2fd2ed7-1606761937987.tgz","fileCount":7,"integrity":"sha512-BVe73q9JHX75zNBMCtHr7Lfkg2t77Zl2na4R0WofVUe5cpLXKcuTdHMSbd6166/uZx7V1qSy4bQ3esCuwj+fNQ==","signatures":[{"sig":"MEUCIQDi5HLSBfilJ75tOW0foH8qR7gQNmfLuPISBUW8g32e1QIgBZjAh0vfGquyQPaKxh9cmKYiIqvz+qocGEe9oe23qdM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxT4MCRA9TVsSAnZWagAA0CsP/39pkUG5C8/w1Cdcvyik\n3ukByaSGJEoLKmxGKR4dxqdtSGFtlqjLqDPdec1zOVzaUYmZ/PQ3kkWbq5Av\npIQv5/yEZREKxaK6yEyIb/GLk1NxZ+5bpZIWJiQg/KCZPi9rdxwVTF/VtRvH\nzU9OCGegYEIPTRtuxhiRu3O4kR9qhEXkIsNh7tKDJ+MUdE5+k93DHyft+r/p\nDXil+ZawyDYlFTZk6Zt8MCdA9Ye+c4VSffgjgj59VTCK2gyV2ksKcZtYLPPc\nmTjiGZwIxuHGrjnY+OttwUVPgRFmsqqRMm7YkvT+66R3MHVcYSqJdjlo649C\nL+KtzuNpGxtZpriD0yXdLJCGj9zDBFfE9vyYbdix2gQ5Q0v3ZTKyysse+gZp\nr7oLbq53gAd79HUDimORyXoDLPihVgNBvlp1amrgT1rXEhcW1z63MVKj/BXV\nBDgBjuersndvyT9FQybKMpv6I0H/yYTy/URVKLu08Qi7m8ZGi0t92yWhlPft\n0kDHej1G5crpZydEK17lORpYJHl4sR5x3PxS6I9TEnBaI2comqYPAwfpOxny\ncP142vTEhfMPkiRWBIr6QNMS+ADx2iNeZr7uziHxXI3Q7ez8TGyTujNj1yY7\nQ822rgfz9TWIuPOu/g1A9Z99Oech46bAEqikmm6s7oxvZa29RN+XXQ1wnSKq\nMUkm\r\n=dBjE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2fd2ed7-1606761937987_1606761995875_0.018799518788756853","host":"s3://npm-registry-packages"}},"1.0.0-canary-d8f466c-1606808728114":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d8f466c-1606808728114","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d8f466c-1606808728114","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e5fb8d40887561f1de0adf7d5918bf015a9aaa8a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d8f466c-1606808728114.tgz","fileCount":7,"integrity":"sha512-Wv9A3m2TwjX8YWH0gMaVOWuVWis/Ad8HD8tuC+ZxU6P6wAIcXB+8DTc0cFHvq98iBkwFx/ui6mTT/awPz2WLSQ==","signatures":[{"sig":"MEUCIQC4G/BbAvxrK94Vs3c+TJOaNm1HlciOE/pSFtVwhFfFQgIgKHytIUfClGceVtV6ga2ABt+ITew8T/t3rv/UdL4EN4Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxfTJCRA9TVsSAnZWagAAa9AP/j1kyq35nbk0fpHhEpD2\n18lH3gV+9vqQ3iRoHZN/qgA1WR8GfFyUrSUv+BHfBaWiJ9IIi0Nz2aNqWQoD\nDg0pJg237SnqK8Ybkl3JltrasEPI9B7nSJGOGBeBRlj4EEggsTkSVMKQyGs/\n/V9eROckhAK4veUFGX2PLYSfJTZrrv3Rr3XS/5993kMfvnAAq5IoExt4W9BJ\n1nwuYVnoPY4kZLsVTBFE9mXpKrS12a/w/DlJOoxf8MR2S+TDQn5zSFDUELdT\nACc6pE91kt1Vlsp3iRLMe/59JA7NWJHJjh5117StHd4OnOM3FXBSv3jZF1Tj\n2ZTQkJIEjmT5COjjAgMEBPGPiTuVvR9eArVTdibJdBw7kP744yFQdJVmslEc\n/15QdJkWkw3yxpMODMo2rEbvx6X3KFHqVev7ZcUXoSQi/qxVlTW20TIaunba\nWnHs8rwVYKQiOX3A3k8AgtMlrKsOyzSeVfQRcCmhx5XBDUOZcUbKYJJU+Q3y\nsQWSwm3/SmV37UlHP60f9WJmGh2rh3YlExsBRmzh6Jox8PGC5pkp6LH6SGub\nCNnUvlyndlKlT00p4vjsKpUekwAZVx8YQ4JIVZ8t9UUqpdZfnwxJaHJj5TQG\nB6IdeEIt7vgYPKnuNpWtB3ur63Pood0q1p3A10sahcGxy3Nvo63wFMS0hhkk\nFIQq\r\n=PgNM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^10.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d8f466c-1606808728114_1606808776516_0.46752612293267726","host":"s3://npm-registry-packages"}},"1.0.0-canary-32342cc-1606808931963":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-32342cc-1606808931963","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-32342cc-1606808931963","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e41f48a6664b22426a23e5f791e837cbefdbb7fd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-32342cc-1606808931963.tgz","fileCount":7,"integrity":"sha512-yKmKOsD2P64fhT4VkYKU4MAnspj1ReVDqu2t8vH8GDMzJHu0+Zb08EgMLLRRlnyRzOvHX/d6+1roYi0Pn7ciYQ==","signatures":[{"sig":"MEUCIQDblWJPAKe1BmEShAJ/J6e7VnRCy5LmxpWVFnIAcDBaswIgSvXXPmA7u33+jO7f5fbxjsBOceaU4gAU/r/zbqn4+gg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxfWcCRA9TVsSAnZWagAA5KYP/iKWB0rvE3NW/TLujlJv\nPvDu9RHe8EbwXS/8YAXRpJoa1ZPizss9vDO+GbrUiNzi1IA7riZDJbVitpD1\nLvOjyhlkXpKD+PQhadEVAmG3Vj8Ycv7zxAD9npKQFAJbQLliff5tozWo+QD0\nmmjCWgPcV/jg23W6uSDC691YPCu1JGyPWCTD8klH/tEEMIYiT6nRqLdJoqiF\ncj5kY7UnG3xFCC+x9bLPJzLXituducbh8QGIjfniFtlfOI2deU4cqgMt+ZlA\nGLmaodhXVkmRjjxwKpNkmg113AeWkl23A0r6ZnKBruwCAPSPEaL9Xak+djCD\nluxNYV6Pp7qojsJ9Xc6prfuGNfHKVjs+eVLoqiCHlOm4EHDcPoVun4TKRUR0\nBmWyoS06M4WJAx/Z1Aux5OiGCgON+BtUddgUwMYbAHCt3VrG+Uk7BMPB9+Zf\nTh1/sZ/ojJ9UrqIXs42bl+ZmDEYDuf4q7wKKToTma+uPwYFp6tkxxo0XkiVV\nIbUAG4X38QT5v6zwTkkuZymArh2liktW/3xmhjD6hR6DPj3WjWGV0KaXU8SW\nB8fnTZ5vB221YLp5TE1HoayB5sNwYhEvcLOQzeU27bKMiA8YwtJxjHIc7XHW\nCGkGGO6VN7Zl3JCaBa72pz0UT47s/bw/d7F4yPzojzc15dfLoKQJ4YzKtmNH\nq9/8\r\n=NWvn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-32342cc-1606808931963_1606808987941_0.8333215875071682","host":"s3://npm-registry-packages"}},"1.0.0-canary-f54d0d0-1606809112127":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f54d0d0-1606809112127","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f54d0d0-1606809112127","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"09fbabb814808e63369222ce1e8620035b3f551f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f54d0d0-1606809112127.tgz","fileCount":7,"integrity":"sha512-L5oa+ahCYJYO9s+8X5ASkqOr1/II1MJe03SEVGAK24of1HR3FmaMBSXxOVP4GfAJJKohyy5x2xQrlj7KeBhRNw==","signatures":[{"sig":"MEYCIQCnner95+nJiFpwetdtqTZHFYmPISSqPEa9GsLtMMXJmAIhAMj0OkQuO+hE3Sf6Bbo0Jjl4f4ZbnZxzAtuE0lTkbqSH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxfZICRA9TVsSAnZWagAA/DUP/1062GYWu7PM/uaNKUAU\nYuShuGbH/PgPyUcTPD6L+DI+2LUgxdyy7B/CcKYYGrt5Rc4qcgq74L9C9DR5\nRSPOiVCatmsuTRJmOBKlOPVzhFGqf0HFhtna25na0mMkbVGJPnOXGi0gYnGZ\nm5ElUayY9bBWRjvelMcpxVF6qoNZA6GtRaPpGHnU3BU5kt8A8zqrMrn+aSbk\nsRpsmUv3/26tBt7apuw0DRB31TVaRAhumAul/rdUwwV2yVKfvMfBlevFJmCJ\n7k94rXlG8KNKGINAtCV2Smjwv4H/++6YUAL6H42tjWOODpE+PQJLQEf1dVIq\nCzZB6PJO7NH2OQZ0nano0rrQsxuweFLlCXEHafeZ/t0By+2lq03e3pRI+o0S\npZUhbUhjuw9SHPhCD8Aia38UIkkUFCcq5s+kMC/7aRNkl6yOD4XF+DFJKIBI\nrQL3HmBVdfZMV1YeNitZ92xXEe8m7CSpxI2A2Jpba61RJlTF9s5PmdWJletq\n+Qh/isABTrRCoPi+ACovgSpZxa9vG19SG+1z2yrcXil2N/+GA0HDdnuGfLQ6\nPr/F7/1Qsf52j/94/+TCaYh+a0kobOsoORDxXfJQTCADDjndwZ3ifXuiVYZ8\noiaUwDXLx/+qzoBnUtDuBSgZuB/2YU/nwPMNtL/H7cPfO5Q2aDUCX3XDl3re\ncNoY\r\n=WrDV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f54d0d0-1606809112127_1606809160152_0.31334341793125686","host":"s3://npm-registry-packages"}},"1.0.0-canary-39cd78e-1606839802418":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-39cd78e-1606839802418","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-39cd78e-1606839802418","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7f8e8d65298429d59e0038141b300203d35239c4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-39cd78e-1606839802418.tgz","fileCount":7,"integrity":"sha512-k6RVxdta1a4HwR+3ez0+3avHHkCobgBRIHx8NsBfRnqRXRWUEGAWXwOCC2D5y8U0ZbI+0f6OeOlj/cxYe0Q6ew==","signatures":[{"sig":"MEUCIQD7oT3Cm4my5chqMOd04OIniX5rgNWxmYiClXd8aWrddgIgQwk5cPt+mSDIfDNliy3Wc8CC0YcWuRggMbqW1jnDSag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxm47CRA9TVsSAnZWagAAGnYP/RdMBoOtjPM+sKh5jJ8v\nrCuNWUd0PFiRcFlq/e8MYivVdAEAvbQgbKbSpNGaL7GZ8F3TZEq4xXJ+F0/D\n2P4ZXCdFUDCclM9K+bGLuRWOQUWuxO7OQuyi60y8OdPPsJ6r3pMbdsmiXU9U\nZQuBbNw4iq2PWJWSzvfqLZefr7vKgJfFFuPGVR8lBwyEGWJ2jxyPsE8g4K68\n/81ULT0zb1nsf03nFz7aBYeMTcvFB7ghclBi8hAec6FeeWQIcWkSa885CE5p\n1FhihvM9vlvDF3snXHS2plp4NjEbRw/VE7ctjMn5mYSB9e4R6/eODgvTfiGx\ntAsvv5De7KQ02kaWCP9qydQPLRtWWVCXReIew+xmtG9d5qLTGjAcOZlssxRs\n8as1km2U/T/UI3m5yUdbtJSPoF+eREpxgb2kXJ9kbHAtbOVGM+3RTHNzmetx\n/nxbysLhavVCpFFkWz41iO6RSEdtfF7EtTbAhQxxS0NVXGbfpoBkSzhKPZLF\nuur8yc079fLFpIlMW+ln0o7RJ/w6GoMDjLI6TA1EugoS5lgaP8fO/iMCW77m\nVrknR2XxTGm9GSUxl4ORNRzsoBAHu2AJPlV2jDvxIh+u2DLmEDFbovxheEWu\nenZ41tTzyk6eD3W8sSHuxYiuHbBaTycksk7Xg/DKvi3ekP1zF65TLhD/n+k1\nlLf1\r\n=LaAy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-39cd78e-1606839802418_1606839866666_0.12162329175711828","host":"s3://npm-registry-packages"}},"1.0.0-canary-39cd78e-1606839805125":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-39cd78e-1606839805125","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-39cd78e-1606839805125","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ac77108c30645cc06415e81845dd61c14623d074","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-39cd78e-1606839805125.tgz","fileCount":7,"integrity":"sha512-7C96sD4nFCgDKiFth6qMa7UThRECTCfHlZ3LGPgP2znwB6i4RdM3HAeKs7u8ZZzYUci+cMY3b5/IJLbxVZeilA==","signatures":[{"sig":"MEYCIQD4yJMQQuEZqoihVtFmJC6/HogGtAokkurWvP3ahsXw+wIhAPAn2dI9ZG8Hts74+em4oJLQqQ6TYC97AB+7gh76JoYQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxm5BCRA9TVsSAnZWagAA44gP/Rb9T8nwt6QE+JWx8Y7m\nnmpruy2hD6M2HiW4l1StMRk2mA124XqmhcPAWengFVmtid2eQ14Hg9tU5ME/\nQe4y5EqjUG5ExxsXHP4vHeGzbEEa8UKCo7q5wKFJsuyoXQbATg2EFT37pto2\n31NmNPIdChzyvSSYlp0hd7pjT5VuPaDPT3WDjbyy0k9h8p2b9Xb3wQtbh1PJ\ncaMTAuCZCNAJYA0fLg9GVmlDISJB83DXD/8YwqwcfayXnQPQog+SSoaVgX4i\nZ7DeueOZj+2IeBgLgMba+4rJyiKMCydpk000v1NyLqvEweVpun8YqIgWXP28\nmuG9QSOq49kslBPFWFuA6swM5uRjttFAOgbceojp6x/FGKKL65hD/F7kyBzi\nhFicvhoufoKxNo7qgqrCFxqXaxuMJWtJt103Hu68ybFYs5d7NAjGiBKi/3es\nO6Fr+gqqJEAf7ELHrZLwxKxIoomtMja7VALq9pJDesC5fRMjiYPmv00Me56b\nsA+yTsHxp5hWDShkNDuFccjTx6C4yfEqH/Gv4U7wcldnnXvJ94xVWyHDZ9cE\nbhKy1XGMK5pvCqdJZ8cGn2GyIeHp3qNxv6b/D6rDpeC1Lauxuu578E2DR0dA\nKEYrHwoHbJVuIOtqrSuDxIlzdQhspwox4C4I8S1TGk+R5jmG+E+EmHBoTblh\nneqf\r\n=Zkt3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.15","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-39cd78e-1606839805125_1606839873108_0.9398736362993636","host":"s3://npm-registry-packages"}},"1.0.0-canary-28d80f1-1606853046740":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-28d80f1-1606853046740","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-28d80f1-1606853046740","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b8ee7004cae67bfd0a14b5846e0a0a4aeeee8b69","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-28d80f1-1606853046740.tgz","fileCount":7,"integrity":"sha512-AzMXyUYCl6ASzB5PEl5As7yFm/2fhyrNXHSfT/928cMmHKV7I3yIzZYC7GbEHvon2LxMBF+heGhovquh/Wexwg==","signatures":[{"sig":"MEUCIGi+DaJ4I+WUSuD91FHPAc/oAMURbIQPef6PTQkn6/kuAiEA8w0jOnKtglEwIYs9nVkCCkC6Eu3EvvJvWxbk+nBX0SE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxquqCRA9TVsSAnZWagAAedYP/0qmbEdPQCxb2OSNBxZM\nCWo+DQotOcZOxx2YvnW3ldUP8wOgdbvsJCqyJ+5FVRyr3mM3egsSAoaBl11/\nDfoICWAHrCkEPlG91ePpPYqL0HaBipwZQmyDQ6Df1kpCnRP/Ta9ZE1zipZ7T\nFd4XYejqDhmyTFNl8XnA2NJtRgXkP5SK4ysB8UtptrWTjwloQJRDyRsCXyA3\nGG5V/lPQ/EomExtCN6YTK65cLjagAHbhzTLq4BneCk1izuAFEysnwPW3+mUs\nJze3DHWyTWS2aXLjfdBdJtcVsLh5Zu4jzcABqW73lgvfXUjUK/P130kBJYsI\n5JGsEL5DkbK2yyyke/TPiLTwq2bDGt+hUkrHAwPJHifEWmJoVyBAqC0PTQAA\n51jhFuUfJCjg0QZFaQnTq1y7yKZ3Zz1WG3oeYLd+reFoSEG5r+sTnG5NQWVT\njJLEKtiJ0E96aM0rM028l+XyIm3HO4HIYpvLM9h4G6cExmB8KwVV40Pj5W+T\nAdhsijRUbas+rlfomP7sfCaHtTDr43xKALsO+lrqhvEtOsv9pLxNYsDI7RIx\nqtQew65b3P4jfmWO8yEjcdaHJqcw2CkDLzEGX0ZGzW86NePC94KIV0+bPWVB\n5j+ccHlXX/LSfoBVQlm9m1jnuJ++x0kNccj1KiRvMgz02JLTzb7dBmHQkd4a\nIsOp\r\n=9mNx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-28d80f1-1606853046740_1606855594454_0.6263840841781116","host":"s3://npm-registry-packages"}},"1.0.0-canary-28d80f1-1606853052863":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-28d80f1-1606853052863","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-28d80f1-1606853052863","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0297f0e79e4874a7536cbc0efd46304992c948e4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-28d80f1-1606853052863.tgz","fileCount":7,"integrity":"sha512-YjcYWMqLUT2Rq1Ku5jtg5JMQDgiLPEyF2QXwfNLQmD6Tc7xaC+CioOhcPnV4ugwmTmt4hjwgxXiMrz9vsJYTxA==","signatures":[{"sig":"MEUCIDTZCezNixJk+B1ECFF7zRVozgfKP0l0Ls0XIvM4u0zzAiEAopXq5HmSFpyuYtORlkeC3ZLOlWd8EhnlcrMXr1PN1kQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxqvECRA9TVsSAnZWagAAJbsQAIxE6uhQqSEb5tpxgdK0\nUEu0qUqyPPpX62UFjCdDEOHORxueAx12a6KqflB0u/hSpytsakx8TFQPvVQ/\nLii9pV+zvrM+SmeXNLStQn7eak4I8JYVZX2+gSSLduGcNsRpM/ueg+jZGlM8\nrLuTSExFumxpc6J/auGdD0+xjTXIQWLipMtZoZGkv17A70BJnGUp5FhjpDHj\n/0NwOMKS5SZH769zcCqitebMYqGJhrJkDnKtzR9svtQbti7VdlrN80D519Ze\nrS4cAnqhW4QWsB3j291Y/47uJ6amnKRVJc06PDGtpKW27Ry9V0BhQVJR2i0q\nca+gacCK+VVAzUU23RRs+VzwDTTsMuEmG4DfYHPDou5IYPBAgaZ5jzLvLT6p\nfSl4R+yOdGOOHjuCqo3ZKiufWqzvEYJguPEr8Y/ZZItfs9/LTNEklRj343uc\nyIRh4RXDZ+4aX6p7VBb9+cVbB2TOX89ENoT2jOANQ1Z5CNpGCrwYz1d/+LFJ\nhzPMcG6ICHCRN9LGtE2WyRlI26UxEymgZv+vynw8riZx/yrj3ZHD5tiExADK\niaqiz9xNjoe2L9+jb3rjVkBQFXaSlB0F0Joz6sEmMwE7tYTTgN0rL2wFDrE5\neC2eqMd588njnc0QAt+mvIQvgV9qlZ73NkidBVGNCdXi79sm/b20QV+fSVUD\nBSjN\r\n=9rAY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-28d80f1-1606853052863_1606855619499_0.21714364180808632","host":"s3://npm-registry-packages"}},"1.0.0-canary-571490e-1606864551369":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-571490e-1606864551369","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-571490e-1606864551369","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"843b96258a3a4630b990c871d185bc4d4b6ce210","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-571490e-1606864551369.tgz","fileCount":7,"integrity":"sha512-5FnhbKgL6SYcrkvEYiu/2R/JMzMglkQbA/NmhXOAY53kTOU+iIyxbYGj5b4iFJ+HXUQEushBnjgZDiTFaQA8nQ==","signatures":[{"sig":"MEUCIQDNlN/OFpRKvb6cjUXDhMuabLavpY4dUJenzkqaKnrzEgIgbwrYxMiVrPCwKqDE3KC6RhLnR02RG+gkhO0ToWBn0ts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxs7dCRA9TVsSAnZWagAAZZUP/R0T+ddTw9mFpIrdye3t\nDuAiLT8PZRerjvpPEluFgunAxAzSoTfJ5hsIb+knVr29/hBnO3cpvucCuB43\nzWierbs5ABFkoKynZpNHIif72N8fRz32IJNDLRnOeYaNZmEoOiviafQeNDv5\nlRLZS4GK5SVkauuMQIcb4yClerfg0UQ82sw3SmU1DAk0UWz0zU4Z81F4b39O\nFK/UBOmV/3sLpzS9hv+UAI3Tg48Zu2tFh6ccVbug79H8d7z76DsTQ+Rs3BSl\nHuvabYzZZefS7Xu0RUzQorOSyiqXy3yFSQ4kvs2rBjWPTKNSyCTTmaGXFl+p\nzupLegm9L1uzp5NUQZlyIt4t0ti81CRr2DhWCJkq3darq6TU7cQJcdGjF8Hu\nh1bsIJLxhI+/G8Steb2+EnDNBCMUlHtVpR9dwfMU04m7bEL4OdKIlZm3ddlr\nxoGM+iznsKrmNw/b7j7ojqNO0BU8b3r04znKmA/h2x7shgCWvzcFLZtuuCxD\nt0jw4FRh0/AEJReTfwoV9SD77WHZwmlzAEylPDmh5SCeUUjmOX2cg7MoRH+n\nLLLNtIcduZOI+DXqrvxqr4h60yDeJSDbRwatP6UBIsTYrGbWtEHDAQuisJ77\ngWYgLcsKFDO9qJZcsTigfAiQK/Kf35e+3QUzVDxpCFgGPG0h7KaqxIAKCEKW\n7rZ4\r\n=u6wu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-571490e-1606864551369_1606864605026_0.5760522070970799","host":"s3://npm-registry-packages"}},"1.0.0-canary-479bf76-1606984128438":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-479bf76-1606984128438","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-479bf76-1606984128438","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"53c970768960f96239e2330f25f0c12e54ab1875","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-479bf76-1606984128438.tgz","fileCount":7,"integrity":"sha512-BIebba+pYdG1eQZx/qHGsukhr2r1EZDC3o02HQWVMcF1t3LwwBDs8CrMXs3dLIGGP4k7xqftWOrklWnazQxH+Q==","signatures":[{"sig":"MEUCIQCIb46+7XHY0f7lo9cu5Q024OQkVwPiuVsDsqq9OQLWWwIgCSY/bUiHtOjLTZCYSR0m318reYDnq3OVK9V49hRmZUU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyKH/CRA9TVsSAnZWagAAvhEP/R0hnnBxshiK7PtPC2/D\nx9MSgsvXUTZ+OnNV9QFNi5FXwt9RHpGdt049GBD3ctPPmXCP4lHdzqsfRGFG\nyMCQFordcH2ms//rj5ika482lCzCiMFxZa7QQtoV1NXcZED9kQE+KFECtNWS\nJfts3tzlAEzYpmJVsk9Q2OjBiehffdufwElzGitxrp2nvqDGck1mcGOp2XjH\nyBXuwyyGcYTv7Onb/CZybFc3gDSnfRiY4/4aslNoKVg9ah2q8v0fcUe1V2Xs\nGCEBm8ltJM3LceVda7Hp7XObt1ALwYvFzw1RuJAeSlwzZ8q++eE+xPQJdT6B\nxsq9oICYRDaJmBfWtiykE2W3Bb4xyLHJN4LMHQe1dfpfYwdqR9U2Munaa5R/\nVzgoHIBmoOCJbEp/Bso1vmy86oOXtvmFt26iGViZFmb5PodT15wOCjXnHC9v\nQ73cLVLjz9xS7ZLEY+pYVqsVHGm1Y/5Kok070NGXVA5EDF2E+VVIt4BGFMkU\nT5jex2JIJOyEhkxRx5hioPl8fudKepoYIeUZpzuuhTmB2UpE6lvS+e5ASfAe\nWoFsbZiZmyDcobnYJNYzaZZrhMdKr9ye57yj++SytXnhH9FAZh1+cLCZ9K/E\npq4oP0g9Koqb+Rb7KhWdp8PubmNaSGAGH+Z+2/MsYnA33QE+P+4g0VEUonhH\nfV9U\r\n=NNrN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-479bf76-1606984128438_1606984190744_0.48947116248972944","host":"s3://npm-registry-packages"}},"1.0.0-canary-523e336-1607102289272":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-523e336-1607102289272","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-523e336-1607102289272","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4e9ff322951384b294952049c3c9fbbe4580a1e4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-523e336-1607102289272.tgz","fileCount":7,"integrity":"sha512-5EuPOhVouiD12vFX6l+RWalVBvqlEqC5QSH2pVJYzXDHvji9VT1+eytXGh2JsreeQWdSCxlXWboeXvRErsryQA==","signatures":[{"sig":"MEUCIQDqKapobFDI0m+jdXRFQv4/ZRDyoFd7smf15CYecsrTvAIgEoJFZo7KKQQlp6Yq7/07vQjM4201IkYh6SscbegjcCM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfym+4CRA9TVsSAnZWagAAegoP/2iqKL8LkEMCLEm2mA9M\nA25m/XZcH/D5i9vouSquuiClCifbV/jRr4tTchyRy6r5YUTtQm2bbNDVErmk\nm5jDZT0cj6y47JDk5RdL00rt88UBNmTn1Y8nDQ2xSyWMFQ4CoZSfnCNOyfz5\nY+K5GANzxnnQNhY+h0T8lvywxCUeP9MtQILGmmMVemyCrzk4t2nU1aA101j8\nwV8bb3pRGZodY0ejRUB+TFC22R7cawKbNfN+nSWOZHVjqu/2/tM3Juin/f0U\nTBrTCbE2vcVHhGKF71l50SEx/uUJqKdTUCJEsx4DTlLIzuLnsC2CAX/aSMc+\ng1AW7httL+EWDSHbM8WoOFMdeuqXmBYa/5qT8Y0brXHSBnWWfSNaLHgiRnMj\na75+yY/DajpETmNaQuB55qy3xfmx/zJjkh7HCcYIuDYPN7aZKG44retcG6Ed\n040kpyDNnXTjPePsBKYuI/hrGSLwKAjV5zU5rOzsbbHONKzAMDUqqQRUeXND\nKCGqViN8W5K0aHAGrmuPY9eGBEYe0OmOHdnvsmpKyT2t4AdJ9QOnwUpToLxQ\nBcvp0q2Jhv0pagZxsRMd/wnzqhM6J+pOSdE2/AT90tYnNF5m5C1FxFDO9p2r\nUULh5+yKAune698U/az3tDDadMg8Qm3i4NYbJWtMa2SkJSCYZYg71fzFB7xR\n0y6W\r\n=jqv6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-523e336-1607102289272_1607102391474_0.0834499299172542","host":"s3://npm-registry-packages"}},"1.0.0-canary-523e336-1607102342070":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-523e336-1607102342070","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-523e336-1607102342070","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"99428cf16709471b92dbde48684393eb2053414a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-523e336-1607102342070.tgz","fileCount":7,"integrity":"sha512-+pA1PF0DmLTPdPNCWKd0tAEsHSEH3FB8UZH7DRlfD9eOAaoNQh1ViiJWeZgAGPq6L+foQh4FGdP6T2yHVcmSfw==","signatures":[{"sig":"MEUCIFP+HpdekeN5ayKkuP4bIFr49SNZAA6HqNTcYX+Bw+waAiEA3Bi4IwZ80y7vVRP+q1CykJ7r3gWHoDpV/zMXo6/XkbA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfynAgCRA9TVsSAnZWagAAo88P/2uTfCxFN8SzDi1SQ6cY\nvd4OzBgHHJi/TVlmiuNlB6GBdEnut3Goeoc+gcQham38briVsllRkEH2EH6A\nDNXbGAYVrPLD/c0dtjt5rnm8fK8XxOTpDJvDV0mOgboYeZcJUMn2vVJWggSM\nRy5d4XADj49uxbS4iEkBhnIhiNuKkaP1W7Gn2HViWpH/+ayqs34k04g/2Lk4\nOHlVTDFcojIcAR8Koc8nCx4/o29CXQke09JiVm5jf3kojq48gYDSxTPaIMR8\n1dLhNXw+Xb7wPxEoX0cNwL9b7az+Rfc0T8WIPrgOWmiLad1ve6BPvDyCc/qX\nOU24/7YMhYBC1e1oCqYsBQTEKJgxwSJFQ3m3gwt28gDIkHIx+NJs7RfbM94v\nW2g4FtX+fimYcXGl/q5II7MW1C++e0h79fGDkODVcaBosjvEODW40tUp5hvl\nLfQbkYjHNqwaBeLBQN5kCG54WxE7GPffM4tM8z2t5+r4sXYwp66ejFppH6Qb\n37UwPj0vkU3OHyBDdxBqtqNkjSQ1NQ1frQSbb60wzUZSL5b6PidpzzuH1a+K\n5H4ie6XRgdR/MfGwuOGTCfgHEvgkZnihx9IwFatR9LS0ElFJEzs4yI1/4w9W\nx5SimRQfZR5I/6ASh7bd/gRO9L5jEK7wBEZrKS9TMMQlS97y5m26TqfqO43f\nFb07\r\n=ZCYU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-523e336-1607102342070_1607102496138_0.06373875820441466","host":"s3://npm-registry-packages"}},"1.0.0-canary-523e336-1607102292005":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-523e336-1607102292005","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-523e336-1607102292005","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"141123b9f29e6b96bc168617737de898ec17cc77","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-523e336-1607102292005.tgz","fileCount":7,"integrity":"sha512-OBd5VFwn3CPUuk7MDxxz1i0P7yeKO74hNIOe1jPOlA68uYalK2JNVqEhIGLa47fXJj1t4rAytOpx2SIM7OxTfw==","signatures":[{"sig":"MEUCIFh7NGXMt1GZLPzSusK6WNGTf9cqYyZTwXgaLRrybpL8AiEA8wZ04AaYugGvMCU+DtDQEtJqBHoouH47/kBZ9zx1kZE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfynGsCRA9TVsSAnZWagAAeP4QAKAuOxKM28lBmQ/HU00j\nYZi7fPU10tEo6oW+TXHgB0Lk1kpTla7VrUBI9I0AdoSo8XDk/0J/N+25VnNU\ndcTcV6NiYRQuCLauQ5qLDIjO16Up6on6B57pktjeiwWim0QSnERH4R20zXKF\nQ7ALS1o261ykDAeZAKZ6XTXLiD8rmTSKP+TEGxG6ey1Yo7v1rRqd0KLjkP4C\nELh6JzkWEEmRQXcCC1hEwQcoP+mB7IWNjHnNEdgfxfsTFMSjBdiVFj5qH7nn\nDCN4ndM+VNZp9WX923EqdnXwU/PoV8oMa8z1JwzCv+3Jtz0yQyhl9C+o9BWA\ne8hFj3DoLAJwiA3mPm7H3ME4FWFTwGLgGabGBWI0CD5LMrpC5afb3kUC4sHc\n4Fpu+iEhW2aYWr+N/yC9I2lT1UjN/kD+V1L4RuWYoUY7j1DY1r4XiBpDjRzN\ns4Xok5+XIwR+j4kL9blWgymZ2vxg3mxVvmWzSLccC2TqQJjo18eO7eC19XEI\nqoiushVyiPXG4ae43mYIY+RH5i9YNgZt8mdUboxGKND+ipWgrSJsHebz2IHT\nYTF/RGrjZWTvrNFpsZaiAKkYK4B8JdXLEfWq9z0EY7tlIrLv/jd2yWY+UQA4\nx8lSPwV0hhmsVwvWZMyiK0snU/5i1bp6cxchmM0gw61M1Qzv8ALLiKh9gufs\nE2Xc\r\n=Q+Hk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-523e336-1607102292005_1607102892149_0.18855509050630426","host":"s3://npm-registry-packages"}},"1.0.0-canary-8d85896-1607112455445":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8d85896-1607112455445","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8d85896-1607112455445","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"883e76bded09ed8982efa1e76c45cc0eb3c0d22d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8d85896-1607112455445.tgz","fileCount":7,"integrity":"sha512-zrkkhelhBrB7Ym5Fei40vD/sGSL1C6ysvZmpjbNZoqrJp37QBXDcvnYNCbmC5l6gE3RY5wU45emLclupsEeQhQ==","signatures":[{"sig":"MEUCIFI6kX2zjopG1t93vvYgIfL/R0MDYdQSXeaVUlPyeFEtAiEAsmW5fkTY8DUd8nti6pDP4OD7TqCFPCd/D4vmKmOaZ68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfypc4CRA9TVsSAnZWagAA5m0P/16Gy5ktPHtMlXlIiey/\nulSksqPtrPG8/ehEJ+figcZ0rJ1f1x+OUUHmCYeUzOyHknxpaiPigtr2b4y7\nubmsut301D/cgplmdWdl+mAnJ2AThBkMrrXV1TaNyWUQn5hcOvCJgXjKsG9e\np3YD6GBwc3UyEduItojA5xSmZVEfJmSvHyxVJDCaUTbD1PtFmHIcwGNy5xOp\npmtBXDgAlk3GhTqpHKmi8ANyk0+uQp5d3t5QlJO5StETSDtu7MR28HkEKwQr\nYLXKfHSw72pFQ/LkogxH/Fj/GtupjTTFSxH2h9uwIxfZyLJsoZ6Hts2uzysL\nVbLA4Ub264uLEmy+DowLIEqhJBeXit7ENfiABeT7jyQnRzsJ5+fNLEZJEmjV\nIr6zzZn5wWe52tIV/hO3Ux5Kksy4YKwBUhYXjPWSVsvnrrs/pRVfvdgj5Eaj\nYHKwRX7sZySV30iR12LB0XpfYooanxvRnlYmfbYmAFqJo558bh43xDP1ChQp\nCOWQsfI4k/yYUHMx4Xkb8PpEw3Q/MQyGn7AEpV2iCzHtMYQQUZMPFiKQ38Rr\nF9frWHOalXRVqf+goN1LUtPtculSSTrnLjN9Kgg/dDwy3b57pMPhLpC4Omre\nqVkhRLYUfxlX+Koazel8fKDPKcVV8iiytQ1aq5f02hGfW1K7dbWliXqQEn8u\nS4aQ\r\n=cK3F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8d85896-1607112455445_1607112503920_0.7336443673277708","host":"s3://npm-registry-packages"}},"1.0.0-canary-56964c8-1607112615299":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-56964c8-1607112615299","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-56964c8-1607112615299","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"08a26719929dcd61f749b72883fc4f3349b891c7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-56964c8-1607112615299.tgz","fileCount":7,"integrity":"sha512-DP5ZxOh/zv7Y3xnUW2SkkafGhSnngkhU1F1hDcf/7GpRe4Gg++SFc253jN8DVRy8BfT+qLUTSPn5gj5GIDJXlA==","signatures":[{"sig":"MEYCIQCChu6MRp2SQ5oH00BzCR7SZ+bop/dzK0Gez0JM8CmJTQIhAOAsaxm9tRllF97KfAMTTDoWQjoEyfmPtBGIERv4HEHy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfypfXCRA9TVsSAnZWagAAWoEP/jtOJDTxc/wEYrU/rEZ9\nFgoEVsgVuz4wDaZ1mkrVu+m6BHcb/0SM3+n20q0Qa3LE2TM4ZZqmuUswhXf+\neJHGFoj8BuzxtxUIi/E3bIi99MF9Q/jSW0gz8czj8msXZswlK0tXu0Kcf7e5\n5BBARiHZFOLOF1Hl+AK6v8VmlajLRuKOb2ldN6nhecl624WyZ9Ce9M8EZKJO\n7yxa2/sKQRsjqMU2TzZuMY77fdiueNeQQ92muIYqSi0iy80n1/oyG7PwO/2F\nmDYj7/PEy5s0N+JoJ+2eTGlgx+2Miye0IU4UcyIfRRL9UnyDd/i0fMOz/wve\niv/4eweu4Ha6qRcjSl7L80N8aJfb3LcD8z8IpyBuPvq9GczVuB/cZCLHKKTd\nPJlSnp1MVOR+H8YVI1Zsq8D2Re7pcdvE8/SEz/7e/YA4juiFCBEKBdtLC3cp\nYLCYqgzW24pfUISM7rrjAwIrZDHrLQD9Jxc544rYoLQ/9HlS9hWUZPqBB4Ac\nPtu6RGuMi+2QvzB46oU9VFDgLfIDsfRWsLV8UFmtAIRLtjUu/pSO+xQFNt7Q\n8lJb5wiZSM/Nl1R9ok0SO3/pCng6onTWnlZLoBRU4urWShSpd/7XyxqIHJ34\nZYyroZJ/8cwitRcFFXdkHUbjkpzDEp7hPVckIrXvAZMtUjwieNv97hkJkRYE\njLsw\r\n=90K5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-56964c8-1607112615299_1607112663370_0.8103555666001263","host":"s3://npm-registry-packages"}},"1.0.0-canary-9df56b3-1607112633377":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9df56b3-1607112633377","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9df56b3-1607112633377","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5778bc4b6fe2679e13d977ded035dea25c4069ff","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9df56b3-1607112633377.tgz","fileCount":7,"integrity":"sha512-MLt0z5vR5tDRB34V7uhuI1ijEIZdeugIJ9/TAt9gkTq9XGh2aw9t0noZSX4i4QbaJmB9iLVJ0oG9qOBFg+1BGQ==","signatures":[{"sig":"MEYCIQCJtvaObQ9AWcXHbOKQMWiC/09B4vLPOBxCevmlYAhNqAIhAOZ3IUcRI7GCb4895HRFfBRJ/cM7e2TLy0Im+yNIdzzg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfypftCRA9TVsSAnZWagAAEKQP/jBwiaRo5jt96PQmKYzX\nXIHHT7givQDu/xRFPSaOjpJ6MYjxc6j3oetK9J6FwJ4QEtqVBxdvak5FwiCV\n2ss7q+b5hcJ5iZGa0XQ5x6wamxXrtkTWNEtv16/OmeDbJsc9urD8Lhh0ugBp\nusCOg0Ppl472HQS46J6LcSrLV5Aflv3uvRwHAPoDZfOE92vCx3rxwFthnenn\nlEMf6GT/rZrqmEOBRKycrNy0Ut+/ekC3S10fe2e4XVi40lHqFwtxtmOc8cOp\nUKzA7peZDtZDjJKETl7QRoJR6mNNqAgspqNVGXRIEVcyEgoXzTvasSYJyfAx\nsvPb0y6VVGK/w7MLjWKKK+TsZvpUu9zpc1CGdHxGqg1CCfopFtVzft9+UTie\nsge8e44Shvy36XSTXw35Z9UmX085gH7KO6+OD/zstEtG8/37mkfSzTX4stxR\nRpN/rof32IT9TpYYHTbWwXpZ/qp2Ls+XOQ0MGNGb95/5QOKNCaHxnWHKc/hf\nBl9QClEzDBeNCbvKJ0bbI3WHx8lO8PuHy7TwxNCjVpkRYYkRuz571eCChguS\nuzRA9pPlo8S2bPZHgoofzmVVbsIy1+RK+5Fja9HllzD5tu4EvEdtbEOJyRVT\n/3F/SDC5YeZCkdGu9q4ePRxptG5hvsGuLvKuxI53lkscaQbQw2VTusMamzaR\nFyid\r\n=2Sq6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9df56b3-1607112633377_1607112684817_0.8005607363826566","host":"s3://npm-registry-packages"}},"1.0.0-canary-535ca2c-1607112746114":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-535ca2c-1607112746114","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-535ca2c-1607112746114","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"687254ee7fb31022ba065bf588d409a2311c919d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-535ca2c-1607112746114.tgz","fileCount":7,"integrity":"sha512-TpxbqUD6s7GNFh7nllXO27/ZyOWfE3Y9y0uBtFPY/QwFYOZx+FU42YJ3BjTRBCWfZ5Wgr9BiNEzb45/uj9fJGA==","signatures":[{"sig":"MEYCIQD1hsDOkBhby8a6XqtuCtEO+cDIHfxCcvVWnCwwpfKSLwIhAJQtTOwE/AcjRliPt6YzznpgWISQtX7PVCUxnLYxiBOm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyphcCRA9TVsSAnZWagAAwSIP+QFObLgdhwDoBFb69YRX\njAcIc+GBQzB0UL2bIt2AROSppjhtsjDDueebtC+UR10Ec1auU4+wQC0C5sxD\nD+cl3Y5JiknYqVNu517dwWFDqBHLR6wl6fxeIvB7IPSTnj0KIM+5eWK9e2Qk\ngC3aFT3rlUqW/cTq2S0I/7+fK+UPW03c4xUQ3OAerDUcCeGhjolfBiEi6tsL\nPPhsl7gN7gquN4ZgmAZEgVMH9K2vKSExXi6YJEQnRWFcpKx/hAzT7b+6vmA3\nuXLEyVL+iq4MIdtZO4DTJc26Yvgt+k4ihHuH7W7YjsK1moQuT6STVtRkViUG\nuONPdCvUaZFETxDDSxbiivyjy23bNUDR5PuwATrQZLZL+sH5aNudkjbcyVZw\nvNbeoDd9S6K2S1WaWhgEFcd6MigxunNDJTUEG54Mqk0keEMlfu71B/tMezEF\n4Qok7PeJ3S9/OTONwrlpnBUN5dkYo5jgOlvchAzBJ9SHX7WSjDEGiOK5qcev\nJs/AlmK/bu0XKfsZTyC1Yn9eiFxKzCYSeaA/51NcZomd+kCT7IxXNdy6ENfa\nO5SGSw4Ddvcrmlba1vOeyEr5Uc2gkqHv2ofx2/sduHtOa3gSD1xLrfmuOoJA\n5YmY1x4iwRsidl/0CPwn+EjxazRKSLWPjUH69YwZErJKKsNnu8DtFlkPZHho\nhrTO\r\n=dpSP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.14.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-535ca2c-1607112746114_1607112796050_0.4202077260487511","host":"s3://npm-registry-packages"}},"1.0.0-canary-35ee376-1607156448975":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-35ee376-1607156448975","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-35ee376-1607156448975","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3e96928726da82a4c48904005b9ce5be5d9556f6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-35ee376-1607156448975.tgz","fileCount":7,"integrity":"sha512-Jfho9IpNDsp67uM6Sy6R0V7omFr49wualVEst3h+juKKNoCnNHNH0eNjHfKv+pM7MqNNNhjgKW16zKVBDQmpkQ==","signatures":[{"sig":"MEUCIQD19dSmp3KMTJ6MmE2mRRJ19DI7fis9LJlZukQVi/nLwQIgPMYNpJhxoBe8lkXqHzgqPD3Aa4FJ7/GkpkPa8ditUhA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy0MYCRA9TVsSAnZWagAAYSwQAKFooAGuGkX6bYqeUZvi\nbD8lZUjyNAxv+qDIpuExhJVhNEyoYWEyBoAWdzvnIaTLkYEbhhPtbozGG8zq\ngpaeXLUGocRmpoa6GG1VJ25UaJ8KD+HLgAKd+OF/D0RlKY6KDPYkcnKBpX4J\nV9vdhjPdrQymdJG7wvbE7JUY50XInzBFHalbGIR7+iIHiGAko9GwMxwiyTQZ\nLaSYKcbGNdfRyJfGHtw9EKY9qQLFc+u1yywusMe1mFiPStnAiB3ELU5ZFkUT\nLooK/OT5Fg9xATsZExCujKtvGr4oz3rGYYT0NGhcKtr1fJ79/5j8N/N5wMQX\nQM6MN+n6AHbnBrL7D/mSbdVroOS/A54hroLzBejsxh2swDzBwG3Ve8dkD/b/\nAp3kEVd63KA43YajmjIafcWczbfrHFKAAReuyW7nBBf2Wbth9gAFL+1jw8FN\n9e6yhZiQveEvVrwfZawEJiojjQGSjCv2lV4rlRNaew3cPVbUx6+kdJulVPah\ngDcyN7yZI1Zc8lnNYokSU1TtpiKRy8nwsUSymttcZCKSh/9kgy6JNf6G2yKO\np9vOknpkGbKTH4yhQzvQfIbkNIN6XlOhBGog001oh9KJPYds5N5EAZqF4L4G\narnwzh7RHUOiuCStd7nDb+8yiUVYysKVOHEAUboMtTUIL5hL+1Jw0QoLWM+9\nqbTR\r\n=2JHU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-35ee376-1607156448975_1607156503707_0.5750108331103778","host":"s3://npm-registry-packages"}},"1.0.0-canary-35ee376-1607156451117":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-35ee376-1607156451117","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-35ee376-1607156451117","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b9b81ff1647aa8bd4215ed415ab25741e67b255d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-35ee376-1607156451117.tgz","fileCount":7,"integrity":"sha512-Iy1zPTbWp2jdqL4wFT4cfoVQl9ZmX8LovDzDFxNnrPPVaPNcboJEzAwob1j24jUpUoiy9EXLnGz119tte+Vj5g==","signatures":[{"sig":"MEYCIQC7a7HT9dYCBZveCbjWf1IThOyHckTkWmtHLwXiAGLWkAIhAKl+XKlXa2C/mXFRbB4U2YQZIZbVsQP2zzkEAvX4I7jg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy0MiCRA9TVsSAnZWagAAQhwP/3m0fR9TN485mUrVG4y8\nK+yoiTRt9PO3ChhlXJrce9Q8lDNA0N83HUjdgCJX2AhHXfTycheAHnOqpzqX\ncN6DubHvo9b/uxsuPO89I4+rlO1bbDFCvXzIk803U+QJqPey6Ge/3RKxT9V0\nA1MYILG7rd1fD1Y1aSLTw2cE1W7OWtDwuuCBTSpYnJCRGZj5Qc+WLCKu+x7b\n7ZNO6U0GddzQeYyMbjndDSmHFucpQ24vSB6J3Tc3BqFhc9zneJdgTJAztbqW\n94HaDomSYMB63IWqZl7pSf515StpRIc9JvxZbZDM00P/Iot9avqTvx63KCrI\n21ZDsxTu5WpBse+RAEM1YjIP4zsp3K5/3iLaf+YzH9m6BCFNM8ems2xMYloN\nQMJZNAIDSabvbmlN848Bm/k/0uVSH31wDTW8iE4gTTA+ci0mv93xeEP0R+jD\npLTkeE1Adm9Qh+7A/6huw+c9HQOtj9EH5nA7qNezksUZRoQ/Iwug7G0F0+lp\n9l+Vk4GqO6m6GVDxgKQF5XQZRWC+0hzHqJC2ue7HcsOQ2tvtvzxEr+3HITTp\niEbvWlOXn4MyaMja3h5Vlt/CwX2S1jA0X4UjsRT8TePgDp3Lnc8wEj3Kq6Rr\nYS1TMv1kDw2bYdw3nQGWYXzL+MBtK6YT0KV3B7jtA5C9kHUArr2uUDsWsSj+\nCgkp\r\n=AGrw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-35ee376-1607156451117_1607156513874_0.6470318577103014","host":"s3://npm-registry-packages"}},"1.0.0-canary-d3ffc32-1607234663453":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d3ffc32-1607234663453","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d3ffc32-1607234663453","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"62e80ff8e951a103bc7c9bf7e8570147d16cd16f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d3ffc32-1607234663453.tgz","fileCount":7,"integrity":"sha512-4NLfIoJN2Ul5Hrlf41K0sIw4rP7sQShomhRaavIPrZt5IbUyvTlfoEv2Cs1drSb5QOS60RwXxy/dFAgXEBo1jg==","signatures":[{"sig":"MEYCIQD6homWckS20ivyX3e4KIufZCA5HVsAZQLr0455wRHFWgIhAI4L/9gDZCTy7njD7+QOUiIuSx414KFsFGEVfzIxY9wR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzHSYCRA9TVsSAnZWagAAy4oP/R1g3hnKh2U6l8hEPN0I\nRCwO3cpdVeRzg+Gs4q8ZhJgnWpsV2gwVndczvmYmZoa9eQUaQza4fueMwVne\n+FPIsdJEiohLPl+RQ+GdgxthQZnncl3ivx6PbWtaxOJDZLIOFi2RHPf1ZBd8\n5xNj84w9vliwUKnLPLY5+TumZrbUgokncPXupr0DpWDndfsmuwjL9WC4ds0T\nT+wa4z6gujBuBFxvEZxO1HAnxw4PDXBjcMQd5Gw1KNK0Vss6+ZW09HSCXqb8\nxf0rQvN29lgSpdB6zcp7nks79g0r7WEELHuPvQ//QoVsQKKOYjyd3SzDNPF1\npApzr843vyHllu0OgKMt4ibpQDnUg1wO/xWnjaGtBKNqwvkuNAmaz78jjgHA\nvKtUGROct8d1HBTvGwA1/TyA+uMQSAID1ZxudOWZgjMu1RfHlqoUnCpfpCNw\nqjenGvQU2IECwWVSbWBm9D1HYLaNRZypxgqcPJ4MwHZKa83UOGm7Rl9aTCtA\nlY4ifIp2FTkjvp+Kr3XjLdmYPZdDz6LXiIbqXrxKxQ1u3X4/M3DvC0TWma6A\neBIxmvf9Jx1QY4reLW6voT9lINxTGShM6mMsUKhzeUDdtD7EfDfUu/TJom4V\n4HiXXNqrXwkc5luH/3R9TzOKNIN5PljPP4ZQ/ieZ+U+SAA7IDlGWk2c4BjYk\nfkoQ\r\n=jAh6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d3ffc32-1607234663453_1607234711858_0.815346057572397","host":"s3://npm-registry-packages"}},"1.0.0-canary-d3ffc32-1607234665033":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d3ffc32-1607234665033","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d3ffc32-1607234665033","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b236b49077e3ecb7ffa4be57be70c464299f458c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d3ffc32-1607234665033.tgz","fileCount":7,"integrity":"sha512-5YOgtTVpns0oMYr5mbqqYw6KCGhRkDdssickwU7UYZIICGfb2HihOR1D0f3NfzeBD42HUQ2ZB9g+lUxEsHlKlQ==","signatures":[{"sig":"MEUCIQC6sAOlD+4ApcNb9guhMpkgj31o0F6D/0k0PB0hxAeWIAIgYLODhi0azw4HU15HudoeGuejQTisSWgXYam/AQbvRws=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzHSoCRA9TVsSAnZWagAAUTYP/3CIjh1VSw3accIEFepp\nnOdCSnGV7dTcCEMGVrSF21ze0FmN3J2LLHAK8PxanYYArmqVN+Qy7Py2j5On\n9EzRDcMhNF5lsgYTZAmhH9CzgIJPKoqU01/3wr5oKx4wxi9GIDPQ7F4MX6nz\nM5mZpOnzMaoe+heqm6s9Blf4SNMDdBa94TyFEo77VbtL+qM5hY053aJs8Saf\nliGLQYPPTSH7VrdU8kxz3U0TLQH7n9uSXZoOCnW+5m+pzbTuTg6/JZ3jSi3N\nKykuRoigWqWD+AZJ0lWr9LLijhmtkG3JRfOuFJ3CuPBg8MUFwa5n1LR2lJ0+\nWb17MvUOT4bUg9Owog6R+s6FuwKYnHjnV/y4Kbr8EGBEmmOu/lF3yLM0jwqB\nvUKHcDKcCDBx90a9rCPrgg4pWQwTZW8xdinsGioelaAudpNVII3bEHtoSMhq\nyjawMU/NTLGkOxx0VdFUQquuSA19RNzpz0dVTivfIdj/2OJUv8euF+fIUWED\n67qXWYDRfwZGlmZQJlTi7YdPqJNymtKad7EQnnSUWvhX+k7mDOz1a6nNzgEH\nslgVddrBaPLb5feI5TdjAMZUhG8hmoCtImMbNf0e4krKLXmRmjn7DpDcu7y1\nhWEQcCRc8GEbEk0l41kdJwlLOVVp7pTSUvmBTuuZOJ7lE08iLeEsS60UanKu\ntyXt\r\n=vU4B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.4.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d3ffc32-1607234665033_1607234728410_0.9703349788950557","host":"s3://npm-registry-packages"}},"1.0.0-canary-263fcdf-1607255882096":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-263fcdf-1607255882096","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-263fcdf-1607255882096","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"794bb07b65336520f2708f42e738c77472f3d3ea","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-263fcdf-1607255882096.tgz","fileCount":7,"integrity":"sha512-67Oj7CG6vzYH2uEVUAPRNYezy1bk3dg2+HR2q8W+OM0BS+maxJIA983UO3Dl0HZLBbeD95L3xpbfPX9dKhK+Ug==","signatures":[{"sig":"MEYCIQC+j/qJcomNWmK/tWh+ozIAuyFBUt7EDtUnf6GCwmK5RQIhAIeuEJkWTf1/kHh4J5hEx5bQ1oae5yL0poZv9PX6l3GK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzMd9CRA9TVsSAnZWagAA5ggP/08zgWc1QrMnkZRrSg4H\n+9t1NLYM2UkubeyHAaBfLnFLCr4X/AiXUeSJbQCanusiBX4i1E9kHZn3sKaS\nMFSBYPsgWkutySmh3g2ewNEPdRL3iq2XTWIL7SJ/EUFtKOSj4U4TQWE5DP8O\ne+1yTfungNe4lPQIpeCt0TSzHsI9/5Tr/jRCy0Ogvd000AoUA4dHYe0czmab\nuSwEd3i1JpVNRCDF30UKCkkx94rEsf6gaeio01c0mJRZF9l8MfV54CbN45j/\n8RzxkFNDZpV35RDe9VOtmBcVylgSv1D2ztlCVGrsG9wni+tJc/mArpYGLgVm\n+3G3cyQVsd3wpBiwifBmQWSX0LZfbW/KcuQKRbK77uM47+MYKdE9JOZqn2He\nb+cB1Gkk5jEiafCxizJ/5XXEzpumz+zVbahaYzPW7mHUVcp4R7/uko0Z7cjv\nN3SvkSdaKJKkzLzFPrZD0aOidI9fD1gAjVuztvRkoNkRhrATIKMbK8qYXgt+\nxoCR68A+hFX9PnZ4BGPU5JELY/D9hC+Fg7omBoZi3cRf9Ot9U5sG94g5MwYH\nTfgYHhVW22QHj4y9aiWV3E81KjB3csKF8ThRKxgOFbyFQZGR7Hu5kAxn16xc\nN5hxiOojMfvJa9WSMnzFYgeWkyj8nqRRHyCFZ6yciEVdkxW47RUwjC1kVSYx\n5Snz\r\n=6d4H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.5.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-263fcdf-1607255882096_1607255933055_0.3539565899710819","host":"s3://npm-registry-packages"}},"1.0.0-canary-364ca1e-1607342433339":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-364ca1e-1607342433339","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-364ca1e-1607342433339","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e28dea2add8aa7c6fa6fd79ec8682486d7b27764","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-364ca1e-1607342433339.tgz","fileCount":7,"integrity":"sha512-sMT/W1s1Z433ZkS+YoHb5h9xcb1q5iSIyF1MafjuzoPd8bMWsnCcaeTNVvM7S8m08bz9cPZyKVBJiD+D/0NM/w==","signatures":[{"sig":"MEQCIFYSOSO+y3FFwMI4hh/eITJAkYoL3P/EWjMwiBLpj9s5AiArV6H+3GIeh5J3PJ/fyxRUhhwcWvzBVmSRU3HA0SvpxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzhmaCRA9TVsSAnZWagAAJKUP/jRUIrmeOX4IIYXwY1q6\nSBvWDD4MfsxDpoPZqcGrog+Iqtnaj5sz8jraa279mrsH4BVK2DjgRJjWjhT9\nl3lTPpx0VehUcJbE1N+8LEYjvtk2oubHhAqnPlg7RJaHiFS1KZbEzCahr13r\n7ZzAm0C1QUIQvYT2eybxNHRVqfEf3nyWevB7/+3SXzRs7FYQV7fqzHyYEXdp\nrWEQwlxxT1/30oSIEXQUzn8UGDw98qRHiOoIm871mGNf6qLhkB5zOscWL82U\nmcWuAP7Tx0xcn+XFJRr36nKiDd+0gwkRrMhn7jBikKyVhoWUPdCR7+dWWTfu\nvgZoqQLWjQLkeOfPVHE+INSbkU4wDfQ+2H1rpNwgRJjF63hnoG9V5VL9xI+T\npZpBEVoW3VOesumWN52xyETxjGRENhsHx3qL+Z67nSqDQPgQ0Z9Dve9P4lbw\n7xiRrm4Bjoh8jf1qbu5e7PMoeL5HRvmOibs0aczhNzkVWatZUMMY03UMxzy1\nRyZFoKCnZgAu1QLVGs0f5qH6WEojbwkj72CI+ccbfvfWvipQPNMtLw6jMyqA\ncROiKn3aZgZ2guWZSlWiV90By3m6huKZxLZjgkflut1GUR1gJVvcx5NEfkuo\nKdgngzWSecUGgOqlW/YssBkimkbQuNCvcbHJJHxSrgj0AFnCXoogD1Ym/2mC\nYagu\r\n=LxhF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.6.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-364ca1e-1607342433339_1607342490277_0.3030515009430681","host":"s3://npm-registry-packages"}},"1.0.0-canary-364ca1e-1607342434099":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-364ca1e-1607342434099","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-364ca1e-1607342434099","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cf76a56152e147c96a94bef739be004ffd798e2d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-364ca1e-1607342434099.tgz","fileCount":7,"integrity":"sha512-xSArWeGRRPUlc2+CoRamTgANIKF5yWSeBYiOxNsf57PTcOmskQfBvfcTUxJC9U2otD8VwYjk71YNL7awhzOixw==","signatures":[{"sig":"MEUCIQD9w34U22yUYSjbDHzBLJJcWId5h0vPme+G1S4WmrKEBQIgN1XVX02vO6o0t/5yhPUoN44xO2L6xFnPDQZ8bmy6FTs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzhmjCRA9TVsSAnZWagAAvLUP/3yCFASNjif57lFQ0ujX\nV0vK2cNl9mPKWkNjicBHJwWsqYIYdTppM4TQtslWW0dLaxC0pNHBCRS8+tRp\nbMbkJhGfak4C81CFsqLIWRt6AhtaM38ZjDO6Z/SaPzwqBOCY76eElmOnwS9V\nPqzK0k8+7+wfPn24H3TnpJbaPd5WKZMcdLK29zhf/p0sqVU+XoXYmv9YDg5/\nnXgASAxZBxAd9LrboW5OaHcxYQ/mybp8TzAEZBz8cbRyPxkgFsNyK2b+wZ/g\n/ChfBlHNm0CpK6I8cOek1/Xpm/QnT1Cvt3kWRe6mAsg6EUqIMTYqp3vw7vS0\nndjnaKlQ6qYHnPuq0kXXiS/grkS5FU3WjmCnYqkZag2XUDxxYqfZ62mQHr/6\nECj43VVbuuxtO8XN/bSJL1syMaby5zenPr08Lh548Q/07B/c4ehpjnfJLC3d\nOwNw82jg2mjm81jXLIe85dZRQLSg1QeFaDZr5/lToiM7TShz7s9S4bO2MDjK\nDYKqt1+dmHdSU3aGtTDI9R/RDxjLw/yjikxTA6ukLhAk7S+IHrrw2N87Nc8y\nZxi08s/GW6v8b956K/86PrI0zoRm2/PfTe0HSHUbRAZRDnmdbyXJx1wXmkJE\nM3LyDQEGFWvzJPC38mgaqeU5TVR89AXlg5vd+OhyNVWwEVYMykIg12TYGY0J\n8EBF\r\n=MXWh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.16","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.6.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-364ca1e-1607342434099_1607342498939_0.9094482355073252","host":"s3://npm-registry-packages"}},"1.0.0-canary-8915322-1607405148678":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8915322-1607405148678","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8915322-1607405148678","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ac134c8298b685eb051b224ac9c4be721a27bf6a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8915322-1607405148678.tgz","fileCount":7,"integrity":"sha512-L11Uxm4ceKyhGgbCrE/YYRVbfFFuLgBUSlI9ANRjcXo5Md0ERoIZOG4b3jIWoUER04auH7afBkpeRhc129ftFA==","signatures":[{"sig":"MEUCIGyNphuMHUdwb5FFE9DO3JVEMnboQABq2/wYVqHSD6qHAiEAo3de/cwCYFN9pabqb8DaeYQ5yC9S01P9OuZXNPA5OmU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzw6OCRA9TVsSAnZWagAAnoQP/R60raYfe/ubI39cXLkF\nUEmebE3IYjd5rsrpYopbwvgN1/f8v6wdG7wyxlenCfM3lwuCWaXGvDTIA5VX\n48dNCM5u9fnuMEjgps7Z7NgVKLn7Nj76din/Vk2NizeTT76wVjTYn/YtsgaH\ndaVgaRs4vZl/ZX4kiYRcouTByYk0xFxKWXLo1Rf6GBD8qtH/OYFrdDaZJy57\nvsEovN7GHEgftcWBVn2OzdwgeqmcUZNw2phLh0cfnzLXH6a7RqjAjiwALRMX\nH8YZp3rkhksTSPL8DRUKdLng1ZKg4Qop/SuIgskVMp7GSSyQLnNg4AZDUNvw\nC8Mxz62HXB3OGIuGDGezN4KYN6D0JadrZfVQm5nHUhtek29rn2xg42fvJpKV\nWH9PmJ12WUvk4hP3Kupu700ClH5ksBGoSVS+L0HrnnN31FLSNbigKYQoewbS\nDQk/I7zyIK5GUlMjLHtU5rdXqY9BNH1bZeZM4SVXabkVrDJPFOGinQWM6BTx\nX+Qv25ZaWdvtz6qCQW/kA9moObeg+dU1WrnZ2qGyCRIyTXKev09FOAEJovXx\nif2CEQeH0JaMpP3VMEY2+FG8XbaziHhtMZA8eU54LIRhLBCNNYiIzICFoTxU\nzmuT59NMo5zBETUwQVzYP4/3BA55A+HkFvcM4gIslMV5brgjfruIe4+nfdzP\n04Qm\r\n=N5hK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.17","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.6.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8915322-1607405148678_1607405198012_0.22296997687979436","host":"s3://npm-registry-packages"}},"1.0.0-canary-8915322-1607405148731":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8915322-1607405148731","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8915322-1607405148731","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"98d99886e6ad97e8cf200222a6e762920c695515","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8915322-1607405148731.tgz","fileCount":7,"integrity":"sha512-fG8wuvKhj9S9s/iS/mMBq6WtxwnwCjHS/XG3lrAwmSI7aZLzyDIEGEW+DZ6vfFFOYm0uSmxPtWFIeL92710Npw==","signatures":[{"sig":"MEUCIAKMHd4ccujvPoxr4TFaFnabu4a2iy3woB3CDT83FIJNAiEAt1dY8uwZ2EAET7OwZFwLCys6FJcV2m7IU8haISHyxS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzw6XCRA9TVsSAnZWagAANwsP/27uhyAGjYjRkby3jiFi\ndg2GfJl8obLlQkIG5rhuRZ8beYhm+M5+vz0Q4eu6Z50Qxao1u621V0L9MdrD\nQ4M9qNTA2eHgvfBeLPLeO+pS44E70pSCaC9mH6XerXnKy3VkbbWo42Xevjhw\nuFJs8rrqOswZ18/6d4DZijst0DAvcPDNksvLJe25vZQSiSeb+UK+n4EzZIKa\nXftWJoj3ycNLgYeX95PNlFO6lFAepKljjxRj9uQ05ArJKX1B4Tz9zviPBWU7\npYmDjReW8jtzK7uawnAVdbRfi4xluKl9ng4x4/MUGzAc0Suwi65wOTpTuzie\nFgDbA7GxXYp4k5fHizZhetxaKqJuQiwOGPXq8AhpOCfNDU2ZoaOw0aorKe44\nttz7SoutuxJe/XBqOIcybsAZTZ7CSXswXnqbFx0PX9e6ymk0VPGUj8tYfE7j\nVNwuzqQkZBnHDK2iVodY/MU/TotLYJ9v0AvtPUriTg0HKcyWJ58O2iPkny/h\nBVC2a7t8p17fSiDHioZcTxeuDDbUk19e9IpLCM/H3o7gNZOR74wWQ0hymkAB\nCo9T06CgKH7IcVWlLejt5dOFb5AOlhiSG7KKEiMJ/i97uBNrSKPvl+N7akXt\nv3n8uzdiwn449IjH2loWCESR9upHIyMqwSbbJaxqJXoDsv5mOOXXT65+T3ro\nTE+r\r\n=pDbC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.17","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.6.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8915322-1607405148731_1607405207478_0.3127117433245079","host":"s3://npm-registry-packages"}},"1.0.0-canary-afdf59d-1607421066497":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-afdf59d-1607421066497","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-afdf59d-1607421066497","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"02a39d1d6fbf11b9538998c4298b462ebb4e25a2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-afdf59d-1607421066497.tgz","fileCount":7,"integrity":"sha512-JO+YWlNmrO4OU3BvCU5Ma5b5ycW7BctCFDxh5GBtGUvax4nhSrf/Bw4rfMAYVDN6KomcqGPsxBoimLvR0j8mVw==","signatures":[{"sig":"MEYCIQDCbssg0KZR+6WOj71kcpZKKPlAeMmsxhNVQk8H4GL3vwIhAL1BTSyjPSN4ne6xaC6j+QKdjXw7qHm3yKcPD8sb2WaA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz0y8CRA9TVsSAnZWagAARXoP/1vJobJYaF081GCZrPs+\n17hfDrTgwNzESsHJJhOr05QdWmFcaD3VXNU/ySwJcKl3HP5mzc833nafOnBA\nLvKyeUpX/TeqegzANpxQH7oCg2wvyO6e1giqPEvdvWDWlRvnJyeHKvsr9KEo\nf2CdUBbPARM7jKVDaeZDmRkpCzX1tQTLIGdm06V935R5mhydhpGid0Va4AdW\nExJ+myfiNmKFvSvFOPxo+Xa3JFusDPVCNBAmJ9AwRncWxLXWrWWhV2vz90ez\npP0Co4Tv4rYLg2Al8p9hdrehr0/nJOFQHzwZmZ7x4r7TONlgpP5sOJgs50dm\nSVBIWwdrPHlp168//AjfvHxqFwW8G9hib8s1M2CxR5e3ZZDnTokbvlWmN27T\nrMTuzD4SR8xnNbXy7YetTcRQ8L8IaOBOVzVPkr88yuZozN2XnDjJHmjh2woh\nd/Ijs3ScETMLcoCM7VbQvJ4zRwJnD5IvsLrE68m8AD9SPtSkBlRc8hm10gMI\nlg7wJG1t/nVjnpRXlQ9tcZZnm/iQwPye8vbAcPtFI51e49OalvtpCdlVo5nB\n1RDQONTLx/qaOI9/zoCqhn0I5002s0JadgxLVheLuCxq+RhoyTl1yjMVitl3\nyQAHqq8097cwi9uy4Utws7P+2T9PYH6SMmBDL34aLKJv99GEKu3NMUDdXgn0\n9L+Q\r\n=byJF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.17","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-afdf59d-1607421066497_1607421116389_0.993192639993236","host":"s3://npm-registry-packages"}},"1.0.0-canary-f83405c-1607421073163":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f83405c-1607421073163","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f83405c-1607421073163","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b690bf09ebdfcfaa6848e46d08636f59f40dd198","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f83405c-1607421073163.tgz","fileCount":7,"integrity":"sha512-WVz7bp13oCO0BH3f23swbwLnNnmSEwFoUMwJlOzYmdr/1dQuzkWWtc5jCBhRabo8ssLTaNsqrqbu5ea42NaQrw==","signatures":[{"sig":"MEYCIQC7jY/zpKDU3jiB66de3jNVXcNeUh4RVM8TdAQq1I3qkAIhAKNDzDBuC+8U72XZkwy7N7NP2XmdodS1+fpV58Olpgh6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz0zBCRA9TVsSAnZWagAAsdsP/0QDwh9JdIOBZxyfZKL6\nwGXEOGp0nIncJp4ncK20PcSWxubR/3vyj//Tvopu8ZlAI7qc2cQRJoowJZfp\nAgM/rK7013qkc/c+R/Hno3yZwmYQBiLHmEq2sXzqiS7HHoWsneDEh5DNiQFV\nh7idlPDKKg9GCHYGx2/mh6FhV7righhkCLD+CpH5vsjDoFcJKy44AaNWbZPI\n9pqPhws3vMQmi83Uz0A2LMICOOccf4z3PGVphgrNcFH0vuIFYXC4jHxeuHLp\nNEp3T7WUv5amHoaq7cBBlKroO/E4XaAjnS8reOjloaAtXWKUvid1pS+F0Spt\nevGIGLUI9+DBuWWFTXbqbQLVrP/hgjSvmA8ZPEhJyyaJeZTCNm+BHZusfNsi\n/PPF1cNxl6wQ+S4eT1PIohOoSYsVoj9/vvAvfLgLVkDZnrT1ZKulL76COQcK\n5ouUpopFdTufXlB+Vk2p2RUsHdxgblUOLWrO5okvlhldCkkeJpi46xwhMEaI\nVr8kE9Q+YBD99qw0C2PtV+Lofytt7btfjjUvktv9kJeS/t3Jr/0DBjIt2gnT\nD8UCU7E8ZEaw8HWEuGIuc7HBVNYe8dvznBcVWHpVQbeVCpL+9Q7Mus3ZiBX6\neGQUO0/EqU6IVY+MfSgKwfitYkYbV6B1XM1FGtv16yiD4BCNkRfKbVpOBCgp\nMETd\r\n=DAFP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.17","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f83405c-1607421073163_1607421121314_0.26498676631697293","host":"s3://npm-registry-packages"}},"1.0.0-canary-9236731-1607461537065":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9236731-1607461537065","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9236731-1607461537065","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"913b23ba7447683a2385dafd025abf88192dac3e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9236731-1607461537065.tgz","fileCount":7,"integrity":"sha512-E5qc5INovG43L46pfz7wvm9fWd3xpQJpYRYMPW0fZ36C4CZain2iy0bvrmhaagMYSGKjE1ieFt0FONag7HNhSw==","signatures":[{"sig":"MEQCIBasOc7K4nfrj8KXnGxQUO0sqX+t6Ky4p7aEf4Y3fhegAiBl4PSrrpg3H77oI3X6VzLES6OX/dOFE8U+mHsVqFCY9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz+rTCRA9TVsSAnZWagAAqO0P/i1Uap7+VzCJAfSJp7K/\n3Ovq8J5uEW5agZ6TkNEB/tsuxPCEIRNGBIPpoEMC6fDN7lvfkQSLWfiJVfQL\n7Mhq2+Ye74QHan873fdG1UL2B5EUMsiiebHjLv+1UfIvOhf45uixaNi4yypq\n6Ep1TMRqo6nwo7Z+X2YHqSLUY4eB1bMcBg7b18CCJ2aEybFpXtfQEXqvI+bQ\nVyjy0YcbVF/y06OEbGA1YEw7ceh/5FDmv652Z/hm1/SGzGRvjTyxLzo0XIaQ\nnFq4rjQfwLVIMkJMSGZMMXu5ZRQZyGGLOc0k9WXG96voSe6WhQUR2CMEVH2j\nxOBRl7r9ORo5Ws0wZS6vw5/RVKoSFJBE4ozCazj/dzjohBSH7YpJE/8oE4GZ\nLLXRDiBvQ/F+CSiFllkEcafwiKVT5ggoDHk/1+MvftePNliXV3ywMOrpSl7x\nYu58stnA4akIgBXj2DZzgsD9CBUn3Uj3mc4ILe8+l2VT5Cq31cx4Au/4xFij\nJWXvSjihFpwpdkNKNLmGH5gXftRypUW8FFt8TVoNhss61AkSsHaft+YR+WPq\nUqdjUgJptxW6h4VYRlr8VlT97dPYozTvFna5Q2MrD9QEyO1G1/rTI3vaGGw3\nbrpcPyG6o7uRvr93buDOqskfjWEp9EcfWbcDhZ/uwb+dwI/r4b+RJVAxMO9R\n92x3\r\n=zxBS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.18","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9236731-1607461537065_1607461586487_0.8460789912911155","host":"s3://npm-registry-packages"}},"1.0.0-canary-9236731-1607461531131":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9236731-1607461531131","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9236731-1607461531131","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d01e952e093cf5d64cbc3c3949f3d30bea6280d6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9236731-1607461531131.tgz","fileCount":7,"integrity":"sha512-uKQX8iRoP4sY1N+RShybahHMfpZKdopilc/57xypnLvi9iEI0GUhtjAYpVhX5cPXWumy+nbdtNNR/m7jxwJ76A==","signatures":[{"sig":"MEUCIBOTjdNVOR8nTqr+t2HPqMiYoSkE+LR4fQ6IX/yMAhQJAiEAlln3NSG2sf2LvqjCvThTkhyzulxgywIcrA6ddFyuX8E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz+rtCRA9TVsSAnZWagAAm6wP/3hXwF9ctQuxaq8dYaYV\nN+a/qIZ/vOnWIoo4ffTehegvuH3CM1x9+84Yeo115H6csr2p7sly7CQvLaUR\nFEscFp/3rFgGKyQsej5qJmSiJB92zN3i8KrqWrEz5BRCDdOwpDcC2j3hK0XQ\nRrxteZSsRTTiYjLezT27Anse+rdXqW8a3S2nSRCKkyNPIPNOjSkCWXmbTV1u\nzFXIDmwMUGhNUIFdgeubzGjttL7lDU9rdqNj5K5wljAUv1W8RkOe6WlL49VP\nV7785chlRJnA4Fa4FS0tvQvcVcgsku9oIoj5tRPofZGr+7lDsz6izK1vCiBK\n6Oa0XBAn4MfwqBrGlQ0g77ulQbhQzXDUOvEYq+bIzumPg5E1lkn1Hmqr44qJ\nKzWsTSg59SGRbjTR89P2TtaE2DIErFGZ+D+G9ErTWt6t8LR6IkuT14iOYMM6\np+ntJcBhQ7Mwo2fW+2BRrhsdeIqQRNu4oCAUvECyvvG6XukSOphMs8HA0Sis\nQSqYHJCNBd0hSbz9b9DG2SUPOie2Nj0txJCk7581SOWG7YD2jDKhvjts6ngJ\ncD5GDKUgNj5V5tIAc8kdL6MdZEiaWw95FJFMP0phX6K1zIa1qP869oHOA6fq\naPBsb3dvhqVhfdG5qjzxO2mbxliFZ0Yhfcg3lIVrp3haldbLoYrga5YDO6B7\nYthf\r\n=+/8w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.18","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9236731-1607461531131_1607461613216_0.5126411856114428","host":"s3://npm-registry-packages"}},"1.0.0-canary-023c726-1607640079386":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-023c726-1607640079386","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-023c726-1607640079386","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e5a5c43c8e9a434fb47dd188b4c2083945313b7b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-023c726-1607640079386.tgz","fileCount":7,"integrity":"sha512-lf/naYF4FxXPVUMybYi1/h1iVT5ofWGYtkgckBHdoQNNU1TJYSuyhxifKWai01QiEge5u7DOOwODgNuIYSUMlQ==","signatures":[{"sig":"MEUCICxDozYCNK4gF1JmG8IA9HT6K62IO7KN8wAoiqjDzbYtAiEAnjTAzd2pxDPukCxeiLAmVShSYaDg1V89Di+2N1/P2Ns=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0qRBCRA9TVsSAnZWagAA45oQAIftuuZIt70poS9SiFWp\nQER3QndQDcmAT3A3geB5NjyT9cG6tlaaIkKE1rzqQM1unbcnbtRKEJMA05kv\nhQ5IDyNxK5nL0CfZh0RCH03Q7fKK/fVovfL28fYvGgu41++l9RuDG9imLssM\nr2DTujHJ+Tiub4DxFbqQ/WItynr40kdl29zVrrAewikXCr+SNG5cu7TCH4Pu\n8LwzZkhLB6G2x/rsSFp675Es5nvyb5wIRua3RHGN87YwwCH5TIwG8F3VFVNK\nqdt6G+LnRZJraWGGcRnvbBvwae70qq+k1sRZWboQ0FSaGIO3xmu1DB1HYih6\nfqcyM8CA3yq0VnwdavLfx8cxvlBrKrB2BUIkdQQDIxzcs50V9YLsZeNpXgpm\nDg4zrxjDAVNLCPJuxAuzKwYqPby6mWUBiOLElWE1xH2Z6YLipAxldWhLfBFH\ndsiYpDbDTOs1k5q0fNHh6eQn8VMdOdQkIwU6vUaouy9j7Ho0EpVv661PRTxc\neTLTfv6iwriwMZ639co1VBOpP7UpN7vVTHEfTYCUvNS1flGj66MjXXtuDDtL\nhiJsIeH4pZ9aFTIGHiubAdf2GQ6k0J8Toav1kKEyC4jnrNLerTl/5mEWq9/O\nzVtLjvNIIy9VcTJQi4ikq0MGNPufyW05aauoxyqPt9OBKT5OgnL/cR69bhNi\nHT+5\r\n=++sY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-023c726-1607640079386_1607640129119_0.5248579521034271","host":"s3://npm-registry-packages"}},"1.0.0-canary-5575454-1607642142770":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-5575454-1607642142770","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-5575454-1607642142770","maintainers":[{"name":"tgenissel","email":"thomas.genissel@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"pagury","email":"pagury@live.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fa4f54c371bcb0838ff4727f97f0cfe95ae5698c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-5575454-1607642142770.tgz","fileCount":7,"integrity":"sha512-uOfSaouH7k7uORW7xmxcapPNdUIE78NfG1ddjomiZy5QEPLEE/ZiEwDwUTzLWwc3pofeFNkr22f4nQkrIzbZWQ==","signatures":[{"sig":"MEUCIQCSWGVaYB82rYg1htlWUMBizrRtcqWmMHdInIzXRnS4XAIgdK3tUwFJugj1+N2C24dJVyQs9v1t54B7xtkv3pd9dCY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0qxjCRA9TVsSAnZWagAAx90QAIwY0uOPKiNaHtkqf6tO\nFresykW8IeznKLeyIu0k0ZhwSDXroW3QDLaInkHViS1zYdQ1Vlrf5JMB2tOA\nzBTP5ALvTDN2socXzrPXFbAQFNQVO+BmcIUSvFqcsKKlTbRD3h4Q2S+K21Gz\nd4C4Vfed678XEJAmWdobFpkbdJXboufD6M4auc5X+rHF/UiInmW4KJFSsqCx\nA88bMvZ/Gru8silPQhupT3ULpwYIkSYXVPhgdf16L7JCoLVzmeeT+v2A2S8O\nt8N4mYIvBy4mUmfIJ324rOoBWBNhwCUxOCVRXR8g0qqz/ydwzf8CgJLeaqoT\nPpNgYlx8C65xWQ96NG5zt7uwmO9aoqv9giPbu7a9gBqf21hTPYHk13Q4p2jv\nG9wVmuZtP+24TrJse/UaikJwuays8IEXAZ1sul6WC0U9LB1NM3CsIJ9qF6L3\nEWXdFhHCBnup3WQzM3MRTv1hFfmVzlnee30Oo+HubW0XaComxZpI0qc4jL4w\n67qtMXkD+keOjLCqYwMFDrrr10yLWD/bUkNMwC3MprVxI1L8st2rGvFCq5tR\n2NRQrcBEvoOyKdMcStyiRDhukloL8Orz7pFnv5elzjqcUqmD/zkrFBNV32Tc\ntb9V3AN0F73rI1prMR+g3aOKjCNmWtQ0BLf2HYGdRPnuxniNpT5IACTEapZD\nD2Tu\r\n=2fuk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.34.2","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-5575454-1607642142770_1607642210578_0.36906396756575877","host":"s3://npm-registry-packages"}},"1.0.0-canary-ad8fa57-1607945188531":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-ad8fa57-1607945188531","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-ad8fa57-1607945188531","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9dd89368cded2fbf439e14aa10edd674687a53a4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-ad8fa57-1607945188531.tgz","fileCount":7,"integrity":"sha512-SyiJUms4MbcQFYhzfXW9nTQfbp54jP6VxyIYH1VGyw8DyOo7/W84x0+QEsq8Lm/EAd30ooEK63qsCwsvdoXsCw==","signatures":[{"sig":"MEUCIQDQK2Gbb5280jmRtzPOzRnGEtN2hHVpRYDoYRP82B5IGwIgF/+bp2ErIq+Ei4NnJxiyi5wxPdbWhiksmwtspjDSDqU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf10wXCRA9TVsSAnZWagAACx4P/0VkwvGvdmSlOXIqI6uo\nrKpdA3FTM5JQEsBe54NjhL4+Fv9BozH4HCIKS17JHhmZdnf7m7nukZw+R5PW\nDbMz84Gv4rhOxT8jx5+k1AEVr1j8P5KDy5/szF7QN+lb2y3JYPs0qVwfuZfe\n2vBVPQ9yyhHTiHuuBfkO6JfqTVUD9hxmCZnqUeQu+OrNKgIAhddkYuUecMic\nSSiY5q3NiqzraLpvlwdVP9xf77n43+fE/aN12vGnKobH7GAqbOptaA/xe70O\nQyiOqRX0oqtD0vAEzBzqDaYMIOMHsev6EU3CbYhPkpGQAnQGBMn9UjH3zEBx\nLCtO1ap7bF5pJpsfdhTa7r5EhyJji0sn97dVFjV190xG5lSMuKpzve1jC8YQ\neHyj6B5n+69VCspRDq4v0i2Way+2McV6huwdRVmgdxTa32vzEvXyZTDHSxNU\nKRvadpuNUqZf6Z3eawYWSTEezJLXwcxwVHvausquMvzGDnyMXEcN6uaPovVh\nDSpqQtf2uOg8DWD93sLEzcqwFFKEqYXMC9D5rjgewI1VV4Lg0/Xs81dX27sz\nO1frXoZavXYbMcJUuQCxP652l3R+PqeTj61tvTPz1bMixeGZElgc812XQInX\n/JoWDCngsmrgHqP1lItQ95PVFndoHo03jsMEZB69lg0z/MuMscKqdEihTtGp\np41G\r\n=iq8y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.35.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-ad8fa57-1607945188531_1607945238609_0.004740519866966553","host":"s3://npm-registry-packages"}},"1.0.0-canary-ad8fa57-1607945189853":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-ad8fa57-1607945189853","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-ad8fa57-1607945189853","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9b22094b1ddff8c0b5a63f6c92add134a3cd0cf7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-ad8fa57-1607945189853.tgz","fileCount":7,"integrity":"sha512-75z+OxOhCzGb/ugg1QgyxtKUOTXbl2dQE2/x8Le86Ybg7iczS8x+PvVZd4I666xMvhVyk0j3M+fo3QaN64BIWQ==","signatures":[{"sig":"MEQCIC94pIJxX3GOaftkVTKe+hIZbgofFknsoDRczvo+Eua8AiAL/snGrhYfwKT8XIM4XEHKjxkYvXHyPIBjPDmcsRH3zQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf10wcCRA9TVsSAnZWagAAOKAP/1cEHV3Ud7Ieghnt3Bv0\nLgCBsAIiedRpxlXk9amOKjBQQPZp1KodJwOuOC+4BJykqfq3LeUmtU94C6aZ\nI13oGtUcPt71UBhZHCBtU7Z2TltY8YL3+rGpibsRwoYZx4lpKf6bhGhY5HGQ\n8Jn8Tv1QNqdQAsxhaK7/N/kxHvdAKVZ90lj1XQd+N047QK+Ovy7bRhqAzHcJ\n5wjV6woGuOrsIsCVuJGIZdPszQyz3ksM2zo2nzjuk7cijiE3tWdIxsPRK3qn\nVw8TTrPzcw29LG/ao+fToR5CIiG2pHkDACqjygcnF+xWqiqFF4dB9AFGWFnR\ntqIJjkXTnRm1U+tD4jEZiItEgIiaLtxKApp+FPDubbxHbtQKhkf6xJgeFBjZ\nbRpr+xYE1pHis3XAmOqtQiE9gKMCbxGZnghHnl3AthTr8+psANTVho2qUDRl\n5C0CgX7Zd4vYbNCgqgeakxmDpQnjoqzGwEdhBLVtvqaxxi6TSE+ITB8/eifQ\nAGytD6xxSYvtXM4PIpzjB0EeHybViAl/VyVqoFq+xX3niwBKhwBQuN27hRE7\nrFXH6cinh6UPRBB565I+x8FkfcEtjTtz2AQOC8eBdY3OCe7U7SxczIcIUHup\nnxa4NbyQTICIJnfPdJcfg70uMzRDrImvmDavvh+AOAnNtCyXRaK9Hm6QfXGz\nq5be\r\n=nbSz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.35.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-ad8fa57-1607945189853_1607945244338_0.7766025942399839","host":"s3://npm-registry-packages"}},"1.0.0-canary-86c7591-1607945545179":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-86c7591-1607945545179","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-86c7591-1607945545179","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dd4149f7f39edf6d5195cc42bce96da744af6c69","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-86c7591-1607945545179.tgz","fileCount":7,"integrity":"sha512-+3LuSy0W+SZkK8hpAPBY0m1F1xG+q8h7QH5sw0KHnLzjYlFfQYxB2QcED+seq+EYfg0dY2mvODRWUr2WFlct4Q==","signatures":[{"sig":"MEUCIQDRgZqnvZgfLCJGSOBoPmyyqfe2XBc/vbgqcfvquaLEcgIgZmmpzbnVJ1NXvX8N1NhFQuqgy8/ulvDLI0d6WsCWeXE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf101/CRA9TVsSAnZWagAAjmwP/3cchIpInErMsFmBMzy4\nHFzi079rUqm1hYBRAyhkx21HKuSOyrQsrc8qgtuBC2TYw5e15Ld76QJo59Vo\nPSTJZMBJr9IovLkZapbIeUjFUI/1OZc9WDzrjZ/I/IGx7xbI9oByycfKvAOX\nDACOfnI3i+jSjj/MGPnclHL3eR/ukihcy6r/9oZBO6+ld0LcPVKKFZPmXJbY\nZ9vjFrS7Vn3cJOJkDQXijYq3eBDZeRbs7R1zVzKDoYo8+gTaDYExx5whebnX\nq6srBaBiL9YmSnPBD5i3UMf0J8HfsVAWFPeOYT8CiGsNKBFTvSG/s4je2vUN\nhwecSPTllumszqsEMuzeAIGJMPK6e765oMYRBrowlYUqKx0cRT3eCl+tvVBf\nPE7w8dryvhCJyvgXqitZPQMwO9h6BBcTwURZJDvjIDIRlnE/+cbeMi4J6DYH\nN02GdfZOTD1J/Hx/k2qVbQZicF8xLLs9WXP/d/LjV85NXiEqwKsABvvtW5LO\nMXF2/BAM3n7kmutgqSO45FSBXmeTJtyv3SIxvNHqhvBopDUDUkhKLWxz7QCk\nG9dhqocY2k41FbmkoFUkT2KumxOyko3or5hTHLr7gEF1PAtF633TUDpH9BOQ\nkb2Sd7X9J1ZrI8cDO0c+OZ4h48uXafu2vD1upwPMS8S0YHq9l3v68KEXArVT\nLgA3\r\n=vu6b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.35.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-86c7591-1607945545179_1607945599143_0.35623811600039756","host":"s3://npm-registry-packages"}},"1.0.0-canary-c83a784-1607957983914":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c83a784-1607957983914","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c83a784-1607957983914","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"318d8fe4834e518a3034bf422365dab93cbd6eb9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c83a784-1607957983914.tgz","fileCount":7,"integrity":"sha512-usQESqu+v5PYxWmGa9u1yuomghnhs+UFEkc3hGygWGhEaHm/bwicfiWaREwzYSLWN5hjKynbHEHo5jdHq45zDA==","signatures":[{"sig":"MEUCIEJWYmpxKsmnI/U0Bo0+VCtZgdDRt7Xw36Rz+3Sow3SOAiEA/0/+609wPEK65smMtWPwSmq46JofLP3r7KzuLwA8PXg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf134nCRA9TVsSAnZWagAAiW8P/3zC9wjT0iJJYqoh6wHg\n4VhiBfPhZ+oMsZm18AqYPjkw61GLHjvF/eOEfhpZ37ypy1qAeeh7vGUZAGXV\nfls+3PXCYaDKDeLwi/tE1gJov8c2wOb3qZ7XC6xuKcfa5I0+Oob1zo+ZdAyi\n3MCrVXwB9Rr65makJVxilMEKlqabwH7z3W8AYdKPWsJ2aNwP99kzU6DebYro\ntjIYJbHMMVOnwxq4UjwCkM3cDajGKl8NZ5YsMkEZSM+8nd7p/c7hrynrRTjg\nXgn4nruEQjMwVUCzYC11yTkdelNwiFKY2Hmso9LWMZ5lpA9rEhWmZ+11K9yP\niW1BA5lfC1DVvoZ4InOhAvUW8fLDV4eSk7NxducTvunnFCEc0w+yeTO+Dpr7\nDlF24IzraR/qASyQkVOKutW5SdUrHEPd/yv6zYvC7Ql0aAYuI0DEEAWN9X1z\nv7J7Spy9ditOZxp5DmG2yATiY+M6vKCsUffZHcrq6lCc2nXXzreWj/wzYPZe\nUiKi+52QXSp9z/6kEBQykQ0su+00x9eD6FHBdwvyNQ2adBlSrSiwdwiiOiz1\nmIcsxM7xz2d6xVROO8PzfnFT+ahUJ7149+o1DppR+wCx+ONcd4UUQuUkw3G6\nqNbfYhKnm/4z3HXTfsYtMQw4NTfFoUdSKOkx12ac/LWyhuLPJCnPyaInTmtV\nh3pQ\r\n=+YeY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c83a784-1607957983914_1607958051291_0.4236081068397912","host":"s3://npm-registry-packages"}},"1.0.0-canary-09d8d6b-1607958461576":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-09d8d6b-1607958461576","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-09d8d6b-1607958461576","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9f4f52509ce9c1fd9f072456dfe111cc30203066","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-09d8d6b-1607958461576.tgz","fileCount":7,"integrity":"sha512-NoUtAYudwTv4qxtEtpnPAXRZZdSoW51G6SLbv5BbfDPQLV8C0RNzN3yh6QzY99rNJABsPyeNw7dEa+J0DvWmiA==","signatures":[{"sig":"MEQCIGCL55EK5XV/MbdVIDqScBGJhD/Hy+1Z6d4z5m0LtafvAiAaXSk5w96YaOcqqKYY9LxUtMldGcVwZ5Y/jUcJYa7Lrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf14APCRA9TVsSAnZWagAAZugP/04D4hzNt3xv5dMOdSc6\n1n0Lsi+XdUio78xLR8UShOmQMZ3aSFIH7Hj7V/oIzstFhfEZzeTWlmXk3iVq\nFRd1N5d9YVinw1kF4Tqm6PyC2U9hnxFkbfGEyD1Ra1Gl39zKL9N0oRSeL5xv\nj3fgf/lcgUPUXIz4R6Ba9duCIZ9IRRzNQ87UVsjuLuZ38w8FxSYeeCojzll/\nghJI1eBGqpmIk6cXZ4OgB/Ow9avFjhOwWb1/RBgKCrHRxi21DmdJJKaO6NiF\nmTDMCXkZJxn4f+ezoZwqpoBuHvTX3VKOsJQSmyHyceMFXpQ00xnvTMAFA9II\ntpig9Rhi/BAd0vzVGPaUrragOV5spCU0SrOZHJWFM2rRxbpCP4Lo703JuwST\nFvmHilhaUoAXVfF/YMcnXLhA9pRWS32Cg0GvCP5NHcL7wJ2kw36hukT9fne4\n/5pcJvxjg9CrLtRXlsBAidIWJjESXl+rBX9lQXTKt7ovYgZMPb4ZUbKFWbZt\nlucEM05XYFQbUB096QD3AMyRBQwQPPOXL8deF0TXjsla9wyKuU9ngH2F/NVz\nQlM/+BgwuwByiUtVu9muNNZTxql0b3NjX41swpGo1aHhYGygCtUmLxtoX7pM\nqNMSUxJKe0ND0LXwyzaJi1NclOrY3xC5zAaxvDEjgjIaPID1/8J9IvjzbIIg\n5GqL\r\n=hDvl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.35.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-09d8d6b-1607958461576_1607958528898_0.12299711205112396","host":"s3://npm-registry-packages"}},"1.0.0-canary-09d8d6b-1607958472748":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-09d8d6b-1607958472748","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-09d8d6b-1607958472748","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"74ca026c7a8ad9c905a697f0789dae3851700612","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-09d8d6b-1607958472748.tgz","fileCount":7,"integrity":"sha512-Kg4IOMHzD+n0hEkYH+0A3Lc4l/Q6RWvXnt0J3oD8vifqSCdWyFtg0gTK7hZu9w9fO4VVrTJYmq3T/Bfa5P+uaw==","signatures":[{"sig":"MEUCIFEGxWsgWoQ8ehI7khuO4gIGwIM4ed6BXbUKujYux6xMAiEA6vPlIIZlKANeiV78z35BzRRFpSY1gu3m8nTC++0ENX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf14A9CRA9TVsSAnZWagAAeKkP/3M3vqGdelp8m+Nu70zX\nd4hjP79jPd86A1FdcJzA3msFvWWslqyQnSYm/VHZo8HbYy4CwsNOTYxJqKze\nP1EzGGqrV/s5dremJ1Kgad15m2o8CfZPzc0zwnslop67gSc2Hje8LN6dEhaw\nHqyt/RyyftUu3jDvItLKGS53wwePY77DcqGufcs3HTP0KPaBUO8vxA4lt+8X\nglEb2jOXjWvUbkY/YTer46wRv++1kc06RiQCIN+ubIhht3NoW6Vsn5FAYSH3\nFjSmiFTcqDQ/NmU8VsXrn8o9DSNJvXH7hEx7ar93Rw/BML4/fsjrJy/H8J4S\niVYHT9QqmY8Os0R+Z6BvJkqJ2whvqMT9Ly1rbx/gIEOeIy84rJUTJlfFS9aJ\nFkCOeERzn7cbs5CgCGfrtUpB7UIVISa1zLS0PqAAHQA6UyD9tDwEZm6g7pBc\nHFU5rbJ8QA1N2TrHim0I4nRaYjPDbiHiDz2oaVNDuOsVXS5QUc5W6j2726sk\nlB7fhbPNUgZEKrOfnqfE04EYW62KI60o8DmRi9mWkcxAaRFeDL54MaJKHQ6D\nmbuHxd1XJ59nwqMB4VTyi1DXbr5yf0YyhKtCQlV7aIWZBdipzvGIPjiLYoCF\nbTqDZHxMftizIzTVcZLokeraYCqoygx9L86N3maLCqK9yBlMi/lHmJARzlqd\nkSb1\r\n=CN2i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.15.0","rollup":"^2.35.0","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-09d8d6b-1607958472748_1607958588729_0.9394039110426617","host":"s3://npm-registry-packages"}},"1.0.0-canary-867ec35-1608328915928":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-867ec35-1608328915928","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-867ec35-1608328915928","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"be8d151c97b8b7b27922e5bfd6256890eaac631f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-867ec35-1608328915928.tgz","fileCount":7,"integrity":"sha512-sb4En0T66w+R+fHfstCYtlwQW15H9zY/pJ88ptPtz3xwjauX4Q3HaBAawncxRD+RHEaNZFBYSrXoXdod8JvHeg==","signatures":[{"sig":"MEUCIApbiLbDt8tcG7Vv0AXTTUekqqFERUstMtVzy+m/na3cAiEA4HegC3hkDNCgIp66Ih7KZhOT9XwyXwljiRo+7N7GOAE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3ScaCRA9TVsSAnZWagAAt30P/2RFBs/x9MYk2wrtfXMI\nVQ1KqzI14cN5t5n4CLTYDAnPwZV9IuzFtzukDTA3bQU2sU+G9EaN9hy8fstu\nogd8sERGjCurTzqvPeXXHe2Ka9akgHevszIPmw4I/SYWZ9Q8aYaIz5eJzBTh\ns5Gbee8126Q6lFAIgNILF7YEYJ6xVOcZzn9LntmDT0ajFg7FLY99KAQwB7/+\nIlL4/YnNiBEJu1s9Z1yVfmVbMSSQ2DHiSI++ywNyyfEYV7Ly9LpaeGqFdzBp\nDObi0DkCmes00wAYdyRWaYdRyTgOSvd6u0NCMQ/LmsH22Gq2P+/DyX83SDHB\nMiwhXxdYOVoILHs8BeORzifjDgMnsDRDJyrnSj3y9JDoK8vqcEufpN78nona\n3wMsFJ66UvZvdU5SI/YWhnC5Uc8SrnevMkVGk2zmf/yESjnU9qi1dqYn7nZR\nc/NUByAqgG6gFmEx8acsmIWHSleQOuJYJ8N6joPOR6kfHSVGlbzLZqt8dsAA\ndH5pXFL7MKB1j86XByu8ZYLA20bzIuQlHSHuqOoLjvOkJktRjErLGWJjH2Fu\nNYv7kizWr5BocBEUYwchUP+StP5wWpDMe9J/vbvohXP747b9Jsl1rMb0BBI8\nZ70GTgMw+efaeXd/kzt/z6keVfj2QHeOvMDKZ8FM8NuH2QzV945r3/BHdaWU\nRsr+\r\n=mvPv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-867ec35-1608328915928_1608328986049_0.011581052004657533","host":"s3://npm-registry-packages"}},"1.0.0-canary-867ec35-1608328929041":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-867ec35-1608328929041","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-867ec35-1608328929041","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"db9c3e4887114cc3656e1fa0f59ec3049f000d17","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-867ec35-1608328929041.tgz","fileCount":7,"integrity":"sha512-Y82QdaswYyZE/cnWPO1y1tsMhoVlx8dejVvaDk3yLljEe8FBbtLF1E09ENb4j+PnwnjXsWio9L3nwDzB9J87GA==","signatures":[{"sig":"MEYCIQDoBNDlHdTF/q8xoEHIwqXnFaovDYR3ZYOciLfNDXEmvgIhAKC1HUckBgpV/UtjJlizMCwMPs06cFcjGeYivPIrpEfk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3SckCRA9TVsSAnZWagAAcUwP/26pbCZ/5yFwmsrQNB6Z\n5ISPu3MwK7JuvAu5ityGo0MOaPpLrafYQ6vOje8EhFzQhZSHdTCEG4buSqd9\nWwrexOumirTDxTj4nVDsVc9hYP3c+vjzH6nQsPq5ud7fJeXdSFTe30nSN7X6\nzIuwlmYWHed6lEve7cIJXwRqkZX3BbxnT9wTF+Q+744ebmoM3xiPam1FGEid\nfQIbtJDLnF2ahn21f2XjUkTxuDBv9XlR5wtz/PM8ei+EJRsEtYj591LAu2/J\nYFX32v4cWkVB2kwP+cMzaHDnz1C2yW+cbtjyYLMlyOKHqlrW36VB0aHdR5JB\nyTnvk99sYlcvzxmB2Z69MbmiYssvmktNAzNUhHBF9EtOQ7QZfH5DTCwN1DXD\nW8U71OCSuKy35l2ZxhI1NLb5rdtj/t/A6NzbVKLxaXIs9glAlmq92RER5OBN\nw4I1JNrikJ2gYxEtJqjEfFTxTCdXv0mkOV//vet42t8y9at7RlgvFfgM1Yw0\nzYqOMeGWnYHg+RzB3DviHPPUr1jrT/YUrqziMnIqVtQPAJ0lT21w6piM2GxR\nAwknwVrINbA16RetQClSFTvTeLn7qW6Xk6j/yDEglnaxeA8Sd9naTgLrLw7t\n8IxAtlbT9DI9Gr1pnQIj5dHP4QF9t4PFNSC2yjhlVTAe3OQ3LJvI9eO4CCaO\n0y32\r\n=Bfno\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-867ec35-1608328929041_1608328996276_0.5376505210872669","host":"s3://npm-registry-packages"}},"1.0.0-canary-760f15e-1608570313820":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-760f15e-1608570313820","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-760f15e-1608570313820","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5865e90b045adf38cea64f673780afda67695294","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-760f15e-1608570313820.tgz","fileCount":7,"integrity":"sha512-HuftMMSQiiNTF1yG4ROlQO50qz4Xb01VKKsn/VKLgHyIFmCJC404SEzBO5yTGNvaH+uPwGg67B1jXTSRrwLo/w==","signatures":[{"sig":"MEUCIQCOArgqP9JLyv3pcMAOu5rWCmm44uqTFaHTIoKQhfsY9gIgEOtZZJ5IxwZIZD7skq+63tsiBmY7unWQ0TFQd4/YWPE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4NX6CRA9TVsSAnZWagAAJd4QAJ1oCCZe2yXzHydKkW2p\nYG/f2h895rK19GDLi6IWfDdemcEL7WDbE8n6EOUjWBTP4KGHGWXHO7sCdl51\nRNoetZm53DG+iCOSc8BkCATkc5sGdnGJYWm/y0nX6b8SD5ZsGXaoSosjUMPU\nxX9vO8pWo+DZP29xPWd4rMg3QMWErEVvkQNgRy6Mo12ca7nyko4YpeK+asg7\n/wL6TWcWYGEZ2Q6AL/vRXAB4wKyw+F3u4Z5Z2F5lhBbTtAkhuwgzV4FcZI88\nGgchpGGg3sSCKziNQhotwa0MltIZIGI1NuAIZjvq2lVI1xBlRtgbRsOjHiK6\nwUjIrBzZr2IEOK4Ifq1t0UL/UfWdmG628QKO/mWXawEtPjzDO6h0kX9vReuK\nAoYvfX/91sbgSdsmU6ONsmvQUy4yhEwzGLq9bY0E762YfgjLHxALG3YPmX7Z\nwRS7XtPaSs3/SA+10PuyorzAhHMEMiXOfOpljgi0V9f1dhNnWQekvQtg0a98\nEvtOIK7CS7GJag6qObF6FtWA1ElGAPrKqD6NzRZ97/+98orioWYWCIG2xLmf\nlddh8EJlJigvZ5x4djM/9EAo+G4DG1/McbHPvCOo2uCnfbzg+zrFKaJGPNt2\nNCvMISBmUh8Ncsi89Ctdt0FfM708kPuAlVRNTkftJgUZ5ErrJmPBuoSydrhc\nyeRm\r\n=bitp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-760f15e-1608570313820_1608570362021_0.845484021435841","host":"s3://npm-registry-packages"}},"1.0.0-canary-760f15e-1608570312493":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-760f15e-1608570312493","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-760f15e-1608570312493","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1503543009c880928c1572ba391f05069865397b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-760f15e-1608570312493.tgz","fileCount":7,"integrity":"sha512-CgEGXW9NSfV9SQLf15StQM6ruxRJbL72sfvd2I0IR/eU9KHIsTHS0zp0+e3VS5wgUI7XOQFEXjn3rB6RHGuNUg==","signatures":[{"sig":"MEYCIQCP192Gxqa0Qqhe/3AjIcwgC6F2EiaMqbWddn3ntpGIgQIhAMGm+slcpNxfM2cZhU6fJFHanSKcVYsFSqc4y/ncly3h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4NYCCRA9TVsSAnZWagAAqS8QAJnqNNLDtMlmG5XuWxZq\np1+zC5+rUstTkim988aH9lKfKPUKonNd1wzSTEagkbDNqnYYWBGrMB+xJwFo\nPkYkZiGdnBBKFjD46QCH0MytlZNu3nkkLjiuZt2SuTFDXNFQauAxgzSe3afK\n5WQKFIPwio8sc/SoAm9AQsQZon10AOMqYSe51XkHFcziwE93SCcRqpmi6IRP\nRK1FLzP+c2jt3zSCp4DphTZH6edrVxM8ja57f5X0xh7/0kDN/r5LIdFiP5As\nRVWRZITcQeMFn850pthI7UjqkR8YpAEzlmW+X1qpli6/8AZCfnO7jR8uYIr7\nrje5HSGL4PgrfI6X5VppZBhOFhHddnsPIbqGcFX/cCbGOdpteHffgkLegwRS\nJJgvphTMzuRwLKwxyWKdpSrTWqep2InMOL0tFYG+ewP4WApUU4ELmljOdH8m\n+fudFnsk370+ZrsSKp5HUlSlYSNL0vIB+oQ+ZxqBZa0miDogpCus50d2M30W\ncv6OR+YMIt/gvYblwb3+jZ4Po+24a793jTH79JQ7XirfKpz07ztyNYu5DiEA\nJp/VlM1xhQTrl8x2Cr4PRRRv6W0P+HbM1LLoMYpzW02aAKbHF2cv3WOee9K0\nR4B7hF+A/kws10UXVkLC9P1jsKNqPnYHP2EbSJYO97Dsu72todsIbJJt+cCy\nryEP\r\n=YUi7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-760f15e-1608570312493_1608570369995_0.5669823518219999","host":"s3://npm-registry-packages"}},"1.0.0-canary-ba58f34-1608765290728":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-ba58f34-1608765290728","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-ba58f34-1608765290728","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ed041af83d4d2f8fb373554d2f103c4c05c57cbb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-ba58f34-1608765290728.tgz","fileCount":7,"integrity":"sha512-6w4wDXWlE0mbKfwdg3OjRnpVkG2wGdWnV2V4BlpXLQdbs8B3SjY4llppuV3OjZ38yKYaqR+cyJFvrm1qcsvJ3g==","signatures":[{"sig":"MEUCIDam1UnSbii9kkrVs5be2g8eKwfv+Jk3ECxCG+yJFeNBAiEA9M5mZCehWawjXtDMPqG2AkjpihDVy7MH9q7gQZW0g4s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf48+YCRA9TVsSAnZWagAAM9IP/1kry7pISoxgetciHGC4\nqF72q4eK/1qzpH6ykV6vkMPutIyWFyCVeO8j5Ns3g1//l6WboHEAyKIDtdH2\nohzJj45+IUvsnN3MGAS5GVQ2GPVWGE9CRB0kmApRrcpfkekQKGi40JgFs500\nSiyWuQ9OeQkxNkMfIhTosX//+lF3IdOUx/ky1Y2/kQKsMbFupvffOnLibPLI\nBzUXxpaP4sV1cV8FeeQNVxCvNJ3oppqWnln6s9hQNlpywEXL7hwaGikx9R3r\niVy7oRz4rEEg+cNQnXyVzbEJigWqaNQj+jKD1UAEWm0YybpuKu+JJjWTCpF3\nZU5aZMuv9U3ubxLJ6b106NYPObLVFlvxUpIFnAhLiZjlTziXo3F0Pu927N2q\n2bh3QsY7LnTUJ4tBh1aMaT9SVjnR80GIm1TFrf2gefLheffsQgmu4WrWMBoz\nh7gm4XQtTwamKE5petM9FPPLkpsmPVrwDTtM1IRYK7/jWoplVOUtABO5gnE7\n0hMqB5Ymk2dx9Zpx98KE/rgUduFAoQsVBWpxDyFjorUcMkbXM5llGwmCCe4y\nM8i8WfkJ1ivcj2zfAZxEjYunFYIaGgJLAt4bO2PFC2N1shkpA9fGwv1W0YoJ\nQA8cvMve36xzq9GWo4w5bwZBbo0R938q+1M3UrN0Se4fkEAdHYVXrneSwNWC\nnAtX\r\n=KHZv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-ba58f34-1608765290728_1608765335798_0.09446774211509656","host":"s3://npm-registry-packages"}},"1.0.0-canary-c1882ac-1609165025425":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c1882ac-1609165025425","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c1882ac-1609165025425","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"456c8302e7ed6f84ccdf9b5ad56ffec86d5e0d24","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c1882ac-1609165025425.tgz","fileCount":7,"integrity":"sha512-yGvJfdNv4KOueAuZvmZGq0GlqcROoWw4mqcPeXTKs7BPay8xc/IBDdBTzG2FU4QjJcFjXc/keL24FX6IHqJJLQ==","signatures":[{"sig":"MEUCICb8kyu67akq4DY853AWMF2MqrLGaHEzGN9eJk+V4ptVAiEAivdhKwgjaDEs1uZrNAh8HiaZjR2+LhqWZaYpeAGONBc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6ekQCRA9TVsSAnZWagAA82cQAIP9QSC4QWewrm4+4tc1\nfrg9ZNfjMsC0G5KpPZzOh0d8oPSHAJz2aOM//0kaoiKdR/d+igYzQluN5if4\n1lBbMuk5Af7x4CBOORwbJ6VmeKxXY66acEUQcJ8JIQ0letubzrb4MGDOBFsV\n9IAwFEEfVhJEPXPuOqdfC0EkTHlO+eBt4Rk+gv8oySnvdqkRJk+y1Qt0Tvrb\n/x0k9US2oFN4An7t+14FE9lwVFPVoMvUqMPjHZg2wp4vPmFbDYpgUS1TmKzy\ngpKPGbT+dtb+HfNLmujZ6l1dVnAVArOf+u9eK8Doq7Z5EDwYNrAvvx1S+4vy\n6gJTeso8705bV+MHpqxmiQekVxvLxPAW9mEhpMnauWexjC+xQpnqPAkA2dwz\nNJaFZ33sl67C1vZHzk6jrvqQcJ1FUbY3W8BfiJsbecOdF4YRNrm835N9OgNx\nzvIH3KBnJP2dTQG0Tz/2wWXK/k7y271EZQvStK2WxDgUc8LbYPo0Znsn/3qB\nY4TNXDDAf4oRLlcj74FeztdMOTgqePvPkU1pco+YxQC4m6eMUrA2LlfJTFxV\nqbGMY5eh/4vBtNbqQmW3Pc994c3kuFvqzzSe9HE/XY2fk5bOI0Ea0tV8Xabs\nHoibhZOJU5rZio9+vQqrXB07QDMMegbFuSbtBB0EnKR+zErkHbaEA8clPONl\nroPS\r\n=io4O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c1882ac-1609165025425_1609165072126_0.15862995176252292","host":"s3://npm-registry-packages"}},"1.0.0-canary-d6c63a8-1609181407613":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d6c63a8-1609181407613","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d6c63a8-1609181407613","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4d56273c6ca3e0111163ff35a27ff3d8183c0e7a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d6c63a8-1609181407613.tgz","fileCount":7,"integrity":"sha512-fm6dpQI6gYrXikT8XX4NEX2kOh3bo+IvTKSLpSAiJN75GVTUqDK+WQ0G/snMFuyZTNd5xKW+p2rb+ZdCuwMRWA==","signatures":[{"sig":"MEUCIQDk8JO8nPvpFLsouJagS9RecvYCQgh5bjs4eGpff1TWWQIgNZcuJenIximVZ2PxU/1GSG+eyv7SaDsQRl82TjEid6Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6ikRCRA9TVsSAnZWagAAAowP/1g86bY6OuhFsAYyhGLD\ng352+eICYgcawNN3PfetPFgyb1cInGf08KY7vmZFDZ61NeWAPfyYDWi2V5iZ\nfiB1SDXdkrfsPpfg0gOIgM7CgRgbTZsOccKCEAZ/iGAQkyyj3jW9uluDRZ5Q\niw7Aj+mgD1tacFAo1kpVmHnGYts9z82VxkkKa7iLNXDV0rTGP+3Swev9mXFK\nRHM8fxxeFNAgaPqvRenLIQ4V2lDOO/+Mpyyf7BuJziBNSSHlbr7Urucm0USU\njYnwhdCli1ACqWFiT/6Cw4pq7o+rn1+47nrhTxxJP7gXIv8H6KYt+iH7uOUT\nDkEd/qkLM2WHU44aFVeUoFfBIXcih27LzWeZ8RHRlmavfPnjKMbeLIcuMM/O\nOHzKypQbmzLgS5hFM035RHfk8b/2WahL8NNKfr+xONbW3Pj5q2ibK78JxSqB\n+3AJe6um216VGLvVrVfvg724QaPDOxc8OpxPO/NZvSGdzdBsH2TPkhMkQWri\nrDgZ1NrDbm/f3nJoGagRQN4vQslMs2u84wdWTpEXjCiesdi/ZO9ZpS88tdtF\nNVIqF5svOPBLvN10STeb5FUsHOdVdmcqbIRG5uO+F4WQLs47AId+hwCnrxRo\n1tbR7taxB3gmXm7l8E/79qPuZmhQLohWzM4fu41JsISN+ORW4z/B4FrD7sGS\n0EVQ\r\n=4TIF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.0","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d6c63a8-1609181407613_1609181456742_0.2863101606867624","host":"s3://npm-registry-packages"}},"1.0.0-canary-799f0bc-1609219587922":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-799f0bc-1609219587922","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-799f0bc-1609219587922","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3157986b3a32154a722826753d88df156bcec82b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-799f0bc-1609219587922.tgz","fileCount":7,"integrity":"sha512-+ZHPs7qRZwlEKk19EJTx1PgynD1JxjXJt+H5ANk5JJH9y5+j0l5IQRueEUOdEl44GFUcDkoHr5X0B4FDnfquKA==","signatures":[{"sig":"MEUCIQC1W8X7oFqGnOlhRTNZ1rH4jES7gdQPZMllzB+huV6/iwIgItunvWT6m/LT/1pvNSUaAZV4mIrpHjxxkPDTaNJw5l8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6r45CRA9TVsSAnZWagAA4XIP/AxWo827JE3pMpqOY8LC\nX+eqQr9vFkeFbdIxw5eYx3soIioH0r25MHJ2IEeNa114/8ZrJU2yma1u2tKg\nP4INBJfHIvV+I4vuW31eaO4ETaEKQL+SHsMtRJI2ClHpHLLFny/FfR6tjMB+\n+7b8SB+I7vfz/RfLXdXYkkbBpYLvavKJyrXVo2EiN+Y12N49/hZq/fs9NC+e\ndczoyoAAoVQm5OjonbltJz4s/Ih+9SH4xyIZxJxNSDpmfpaT9vCjF6wXDsUO\n/pEsC4NFaPSphZERw6Eiw+oSZJMa3ZCJfeEY5zNC3CBFMde3TKicwB1bFbWP\ne+J6jabmrqzjzYOtK1UlXCsvVH6ULbFF2tPFAYSuZkUAtmGp1iFS+5k+PMWD\nKyjrQMPgy2pPL0j3j9BgtYnJn+5FlX9dV+wmbZFgvG+5ZqcmWoabp1GqCLr4\nXVaaW3QhKqi8x8qkOcpQZy5YU6nescsSC6Mbk5il4G4VTsjuAYdT1xQVdcJR\n/wC8uUcCn7d1H1enMbTVmylGYvDVd1hDvvFEiRr1cDV1s4rwczpxzDxrAcnM\n9XNZF9GwKyQLBaSKHGNBGWd5ZkdrwdXXdQfKAaqg88ABAPsZ5IPUQVtSyK3B\nit8safUodE4s9DumGfVdnOWArIkh/mXhWNgbGmNjZz6wuQhaS/mQeyncuUgr\nFbPe\r\n=140u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.1","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-799f0bc-1609219587922_1609219640712_0.6448962786212262","host":"s3://npm-registry-packages"}},"1.0.0-canary-cc071ee-1609244699563":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-cc071ee-1609244699563","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-cc071ee-1609244699563","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1455f81464680742390fd7831931cda733fd3568","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-cc071ee-1609244699563.tgz","fileCount":7,"integrity":"sha512-iy7gGlEJ9Jg7twOQ3zIiz4PaH8EPX5hpHJDR5wW2ODxIUY/MQWE+DrScs26KZegAXr3qld2+XEcDGCjs4HX8IQ==","signatures":[{"sig":"MEQCIEjj3P/9+4IZ5VRm25II6c8rUdFKiRdn/iJcSD4FHm+5AiBBQML7BnxpSgevQoSGkxJ3tI10awSs2iiTBHri30GSyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6yBMCRA9TVsSAnZWagAAfrcP/Rgk6hrLg4Osx3BKhJZn\ndgw0vzoEDk92im24YGFa+2gUb/vgyhN35SKoQi2PeGyJNAOvz75J/C2kh7Aj\ny0wA6hjca4zrn4sa2bJAAneGzkltdC1TDuy/EiRIxQXsbwXLVAsTrtDjJssO\nGVGFMyTd5fDLq7P7bgjUBhxcjZYQ68qX1WWX/4WuyZ13LWXKw9vbHBhvZ6YD\n/rXKwc4cUWIWs1P7nnVfSjsPZ2VxmGkBenq1XzGDAZ8rUpY0SmunnAyFKzox\nVSySOd8ZrbK2fPhmMH/WqzBGgx3I6FrmYvlE73KRAmu7tzmUJmetVJgqoXkr\nUncugBKtG+UvxXRXqnAJVlbkzLv+hmo7vIkozz7lc/5P96+4O6scaEvGLjyk\nEaR/iz7BwDJxJOuNx25QjgwLPs0+FH6JxjZN9PTDx3cgPlI12h7Uz2Qqg6fi\n2dPcNXptfiEWAVPUJJ55p9wlkElxdCU9nxmUdRd3qtnpU3IVwHSUhlBXxfPN\n5ORPRVT94kJ1IfedOhOO/VVgtAZ5zgNmUokvFdSpSXb1oQSBgGB8sZO9WlMa\nlOCiwwxSJ/QCZP6thA+ZmdCxIxH57iq2do17mjx+YrkwXDvuUnIY9WVzv1mX\n0IrnvhNyBCkD6R+OJeupkVCZcwa/Wo8KVEP3MSwFzVPwJaYU/KdGkWM+GwRU\nV99d\r\n=pbLX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-cc071ee-1609244699563_1609244747807_0.29366972112525547","host":"s3://npm-registry-packages"}},"1.0.0-canary-048ef93-1609264799433":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-048ef93-1609264799433","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-048ef93-1609264799433","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9492c41ca6e1145659c6ff6900421b7c114bc944","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-048ef93-1609264799433.tgz","fileCount":7,"integrity":"sha512-7yY1HUBXlpEjQ9eKIfpsP4LSuDLUdnQqMh6nf+RCv7sJW7sp6g5LFs92i208JFqd9hy2A0nqfTZcMUqT/S1Q9w==","signatures":[{"sig":"MEUCIA9OSGvkTln3cgEm++z/e75C4t+p/Y+uCmiAnbqhfPXDAiEAioLNHr9BzR2IGQRtfbpCYjZHDPilhemH7oH0Sz6VHx8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf627PCRA9TVsSAnZWagAAzOsP/jWVL7t/dqiab4iI9izZ\nfGx6531L0naNCM4q538IOEfk4aBZigTHBSIWgAjTB2ySStYgniAL0y6pSCOP\n7w+oG97QxsVzCqqe1u9rzXXD1nUS5MRTcUnxBsgBjxFldw5zdVyP70RQJDPM\n3M8shLJOJXXTrH3HD/WrSGIUng+/e9KUy7T0BNUw3XweYsxf726G+Ncg0J9O\nP0XoVKRv4NMsUjQ4XRV/HtMRQs9SwMLJ+eWcgliGWrcA9I8Kj4ohe0WPguzu\nUDL9DguDCcVZuw3obz6bNXeXhK9wV/UZ+UAVARMRhc92uVYvi/IXQ5xd2iHy\nhEHjEbST4jz5oiE2x5mykvHUASGqmOApV7ZOT9nLwMYjVYVv4ETk0/mkcqL1\n80EbpwFsjZ+YSMAs70Dcq5rDWqB0jYHkl9MgletqdYinsZqw2gkLiIsQLXSR\nv4OMCJ8AXTbt264AGmhKINPvA0JS3pkXZplHlKNvwnJPAjyknKlUcYitKxnu\nngmNvfsSg5mlQbRk9kzHvwezpvFTlVMfK/4mt1BjlMImfCuhpD2XhSwVMvxR\nGYqzEKRcKlx2M7sEpNI2T5V/HioIeBUicVhbbwdF3FyoxZlR1UijcfpuuqfQ\nO3xLh+KpUnMiseTVEl4Wt3MLoULYdgVUFZjFALFsMT08M2kh5GyHQHcfrdnO\nuEn8\r\n=+R7T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-048ef93-1609264799433_1609264846949_0.7482040238883696","host":"s3://npm-registry-packages"}},"1.0.0-canary-6504eb1-1609272427153":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-6504eb1-1609272427153","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-6504eb1-1609272427153","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"398e6cc978f3ae92f95dd011bbde6f27325eb74f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-6504eb1-1609272427153.tgz","fileCount":7,"integrity":"sha512-B8bmRDXQEwWxB4WTDo5g8YEH+k4Xe92p8Q5XFPwUgpeOOrqejORIrB+WuT/UjrOVVEAlUmgSd+q1qLgHSScpow==","signatures":[{"sig":"MEUCIQDBRpE8cICRHTJ09PPtJekEw/UEFbeYxSrlIIi85IorjgIgQ2UbLuofL1M2Dj/u5mOCqOGXk9i0X2tOftUhmLQR034=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64yvCRA9TVsSAnZWagAAdtAP/ijMSsD3sVPfl0Gdtim+\nyLCQT3ciph7nVukcfI9aiW5VMFJpWJctOUnGR5LXrleb+p8G2VmpUYqYsI9o\nPY3n+2QoZU6bYg+bQri1CiOMBxFXIhqa1hO3Ln2debUNWjBf6xInvtfpuhoi\nNoHcvShl2tyUJyKlZNnEDuYgmh8VNUaWEmoxMiPrzok+kUVeY4ykPN58Knif\nGRXqPoPSG7dzbpRgz6QjY8pzqVK85KbK9dS1gr2G+8fmTkI+CsUtAMTtmFOV\nSBEx32ATY8Y6qGTyCjVP+JN+BBBuqFwKSAyZuFl0YyxpTavVlydCGCdIe2N0\nozevysY5wai+iB72fJdF5Wrms2+X5mhYQ3lXeX4FxRszUv1Y0swSx++Xh15V\nRRvG4uCmtMPLkql/lfLGyUwdL/OpxFEm6GooeQpUbpd7Qn/P4Ts/HDScZbYm\nSdm5KXj4pnVaERK1czoDKAIFDhco9+oMenJMXNP5fVqZG2c585b5pQ/XuPPC\nu4lK9nnP5NXvBNjq+WMDq/8q4yP+gFR60JrxJnqPTsDQgwqb7EJzp6B7ZAMJ\ndTafmAf6uh5u7UCgAOC7HwRdOMwEnFbVZRIOJEBE5x0su8ZirfkaB/7crP6X\ne9Avef41EMZcx3+uuG//hUlqGCOOyiSsBAaVRD+ZP5YfPX0KKxLuSkOj3i7N\nv8xR\r\n=gWwU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.3","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-6504eb1-1609272427153_1609272495303_0.28126259027805167","host":"s3://npm-registry-packages"}},"1.0.0-canary-6504eb1-1609272426551":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-6504eb1-1609272426551","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-6504eb1-1609272426551","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a40ef5037f24093100945efdf644aa17ace034f8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-6504eb1-1609272426551.tgz","fileCount":7,"integrity":"sha512-ivA9OapzUollHlUOrLYMOBuFi77r54JqljP/aBo0IALCB5yuKQUgx4qAisr17dZYit1CkjY17FBVOeZSPkYFeg==","signatures":[{"sig":"MEYCIQDGJK2D+tXZr4nZLxhNZOt0/My/dXl5Aa8pm8rh0yywNwIhAJsLfHaPJTH9lHzTbkRkJoEeA8YNfv+diSVHGlG6Moue","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf64y1CRA9TVsSAnZWagAAv+0P/1YmG92q0zDNy1KwikdH\niWOfKImMq/5n74xR2nHbDs+i79apc8ztvJAk6Z6Dfh8ot6k25DaEY1hhznEf\nCPTM7dLDUa5PV+A/Jl0WJ9Ei4Lt7wQP27DnQMUhnteoRwl05DRnH89tD8NcE\nbUXui+geCCVZvWiMOsPecA76AetBIFlt5GQ+qzDPN64StQJc3Xh7pwH9WYsy\n933aE9hmU298wb9We6wUFXgawwozp6r4dRWar7AHwseo8dFlz3ldXyBbMIne\nehyXjWlVA5QOnWgXc8hoH1fs9UWNr+UKDdZyxxgJG5aI+QDmF5LbYufO+lRr\nH3WSV9yXr3sDVcr1+0O8+kopkwb+GcKfkiWtDZk21njUyClZiGwsuHw7ZH1/\n3i5RqGu9x2m+JGAm3XLpSquZOiWVB47v7Irf/5f6NfluCgvNbVXH/0fknIP/\niFabKS1jUc0pd2ptzqO8lVtg3I9D/bGHTtsk+98l9rIn4HCeGQ1zPbXYGTWS\nJopHkI/+2NwThCgSJd6/gBNmRYP1pIPT3UDcF5UYHDrF6Ugr1Jds0SOcIwn8\nQUtiZBy3eiqUutQUfh5RiC6EhmlyFQOT1QnKiTAmGVor96Kq5ng8ugnhozFt\nfsj32kK5hKp6gWDRpsYFOCdMSoWvJ4q1VmmaiagHzp12yJD+EwWqVoG7MNyf\nY5c3\r\n=SFRa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.3","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-6504eb1-1609272426551_1609272501424_0.79323204124226","host":"s3://npm-registry-packages"}},"1.0.0-canary-2dd06aa-1609286731488":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2dd06aa-1609286731488","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2dd06aa-1609286731488","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"19f3261f16dfeaa6f1c891ee724755f380111930","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2dd06aa-1609286731488.tgz","fileCount":7,"integrity":"sha512-2loyH7ssrJ4Fw5bJnofSQ5nxq7sS3Kz/ur/pmyqrAvHevtduhTKGT2RcgiH1JRAga8GfzDQ10ve6eOdEEbCkUQ==","signatures":[{"sig":"MEUCIHaDYApU4SLCNGdPwKFKKQOH285lY2HDHj0RUFToTOX0AiEA6qMhiqhN33lTruKlZ1OpxikSEpK/JrSFFn9g/rvXWDg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf68SICRA9TVsSAnZWagAAWfwQAI89yNDFvZtOq995Ol/3\npiQ5sIgy1T13SgNWofa2WjNufYPE+xD+JhG/0amGM4uExKCdaveUAULji4PD\n0Za2z9rT570h8EQBhGr8/+mHgaOiWJZ9+lhjhu+3pSZL1U75xvC1BEFXfg79\nOEEdsq+BIc8bqGazRTffCEHImb8aYzRRiGN0ZlJ+xPYvqGeswVP5tEtJlDpg\nyaUg5julYcgeFjq6Olu0AkWjUOXi5yOzqOPlIj4VXipgQQtVvtMDWDholbuG\nrRtrWpvgPNGJW99qwj/Q6U/YiHW1gMlfx9bVpcPMgSDHHQPVHTLv2rNvZMBl\nkhkFd0R4GoNEG83WfewjaWZs9lbxQFX1XhTx/YbHa+6rz+VqPYi8vleO98he\namVXildY0vcSnep9d/Dsl6A1kH308ZamiyfBCzcTxkhaSYUp8ZmGPC3Qlza1\nynIgx9xBcmmUKk7mmOKDNryzWj/dkHXeqi+MUN8dx8VY+9okp1QUTXiDuDKy\nJIuiXFK/VcN0Lgp7rdu1zj3UYLQ7pELA286zC0YQLlD3RflJ0mNT68ALu7zL\nNzNyXeoHtkFnXO7kPqkW63LIRJWoGP10Xs6dRe6wnnQbyBlAxWpdKIvLRiC6\n0gIZ+sxLuTSDUUFUJmAq1mLp6pKK1RbFXHlDiQswcP0iKigXGCUTmzBxS0/H\nboCK\r\n=ciYk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.4","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2dd06aa-1609286731488_1609286791767_0.5116914756778559","host":"s3://npm-registry-packages"}},"1.0.0-canary-2dd06aa-1609286730461":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2dd06aa-1609286730461","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2dd06aa-1609286730461","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8b398818cef6d5764a672be61e344cb37ff3a2aa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2dd06aa-1609286730461.tgz","fileCount":7,"integrity":"sha512-uCWO7Qev0ltblgi44Z5SDPbDq5ra6Fu68z93K1zCX2nkrDDoNivla6Kk5lenvsW++vmyki3lXq6BlWlMkbrx7Q==","signatures":[{"sig":"MEUCICXQovvLlJTrJJi6SnhJX8uzJadzT/qSwlt1VPU9D4fAAiEA5ySlv1t6kK/o1k81xwRvGyCap4veE2bZE0a/blUiEtc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf68SzCRA9TVsSAnZWagAAYT8P/AnhtQE041QPgGqJkhWd\n/IGtZCDR16CZHw1RGjnw36uvxGL2VX9kJPYAAm3r/N3srsMQPC+w6nOFEW3d\nk2uFPOQjAJ+vcjQz8TmsH1DyCj6g2kdrnYUyv9+FgYAhMC5gNqP/nhQUeDKa\nFU/sE/HODLpAZjOWkZAUI50Nu/rv2/riUpxS+L6BHZaKqq9pQ9tkoi5bKWLv\n9oXxeSNegyCWg5QadKpXrvDbuV33dDWi55PRdi5RGVF932WyzGB0sBwD5DNt\n9sGCN/SN8scm0i7UyCgpyf3of4rt/pgZF++COQC22+fARuA2PS074vJJM9qi\no4QbiIzoOrLT8HyLJkYWmBBI+YmUN0VcUP4m/R3KPoL8Do4hc6hwZpcbbrRj\nbTz5B7O5r7JqFkLdLa2zkW2YNS4Xg7KUxI8u8diggQY1Gsw9xyrQbxV5nRwC\n2pgMZ2y94O0S1sClEBu9S/M3LRaV/zkOWGQXCYKWtVKp+nWjDsGC+m6YlVH3\nJ/4U/VmkUOOnkmi2btj8CMntVQMhAQZpeiBZDrXzeXoHSjtq0h/eeWN1Zc2L\nUYuUyxCYcIgcxdUfsIcVMK1/fbsT4VR+BjtKqWiU304HMtb1joo9yZyzoVBH\npdOQ0zg+mAeQ6dIMXm76uAtkWKin6t0ussCzP8K8SO2wlJZgANgaOACU/cpR\nPsBy\r\n=Bgtj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.4","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2dd06aa-1609286730461_1609286834903_0.4806927008223034","host":"s3://npm-registry-packages"}},"1.0.0-canary-53aff9f-1609363176044":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-53aff9f-1609363176044","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-53aff9f-1609363176044","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4057a1e4f98572c2e3eb77a31f74ccc81a83a22c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-53aff9f-1609363176044.tgz","fileCount":7,"integrity":"sha512-hljWUMJqOvlS1qCGw4QBTauSUor+hoRfiXmXen4/aNx1LG2HEEgjZaxJ08zmkGqk+WMWBP29ys6UFmSWi7/zbw==","signatures":[{"sig":"MEUCIHBE+YUGsr1VFzuvmAkUqxkMZrdR9Bh6yy9BelcA1MEDAiEA6mj4YCutN3GEPPNE5H710NPRwMBMEkQ+2eG4zGmYcB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7O8cCRA9TVsSAnZWagAAxdMP+wYOWbrXpQOaaDjwzhd8\nN0iCOfMJZ/rKygGGxK7i+VVtWrY4fSypQKXyLzsgYiNQLKCsFR727Fon9+3Z\ny83NbtstAnC+aI3jk/Bdtc3VTVolffGKNriDNJMiHZb0SYH6/5f+p+HXkP1z\nYHoyQVkxHzP4HGh5R3j5avWvVunskPT+BAPJNXlflDfQkYVbxqYRzO58NMmO\nzjBBUV93HmJnjMihShQkoUJ7UGFyc7JjUo7cFPftjv/eB5fuVL8IT5W/kied\nbvUyMFZI45B+Eg7xkmV3Rt0vfweFunO1/fscxRli3fK5Xzw6cw9AdtPt2s9z\n6anx2aaWnGuCfTY5tEsRXSk4r56JeY0wGS5fV1JyzxrdzEHINt5FgqHKQ3Ij\nBKs7kXNrjgpHIjXTxiauOHANpSruTd6ySDb7KasWDiJkTqsWp+GuIzKDQfe2\naYZhcw3MRnfnWaLIIUoRJlTbAavvCAD5wZXBVXAp2/5w9OARekhg61oJs5cd\nBsVoAPWq8f5tqXgN/v4JYbpLaNpbLaoQeWU1v0nV+h91qsTf4wJig/2JpGw2\nxT57Bo2mrAK3hhyssU4jk+cJqsdsLZb5aSATgyz6yJg6dWE7bFJdfrxb5Wpm\ndjQhnSLr4+WX8ASY5nSy7CbbFpc2YI5F0+/CtnQAns42bIwGQvvfpeePlZKL\nq2Av\r\n=0QIY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.5","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-53aff9f-1609363176044_1609363227641_0.46411277057748634","host":"s3://npm-registry-packages"}},"1.0.0-canary-53aff9f-1609363170397":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-53aff9f-1609363170397","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-53aff9f-1609363170397","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7d6812e79e95e53eb99dbc51c4f121202e26c86c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-53aff9f-1609363170397.tgz","fileCount":7,"integrity":"sha512-b3t5LvUHbxtVM6A+KY0qVSXXb1H0KYhIEUZ2usgo0KK6yYO7GG/GPAyNDFXPMEflWN4Oaknt4qVwEcnN201xoQ==","signatures":[{"sig":"MEUCIQDRe9JsN+e4fVTr4weGJrzlXrjyfDkt+wiz+fNwFYeWtQIgF91rnShONbRp+4xyHATYLMsUe8EORgsPl7UOIDY6Ziw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7O8hCRA9TVsSAnZWagAApLcP/24GJ5RHysZIOYZOavIW\nYhnwUIv1vG6hV0IsCJQ/rIg0YAh+kKfDQTq57YENZaTLI8gHNg0dvFYbuwOp\n5i8d42SeuL0q1LUyhlG6rRllYl2pMOiSeyErlo0fbNgPU+iKZyTJoWiUhnAF\n0f83A1l3qm9L+GhGVHlC8aaz9upJkKm4h9uC7uBCx6jetcpz8PuY4hxZ9gGr\nrhPmVhE7WonT/vycMMisQGoOxCDF0UFUtbRyRmj0im3KwavsbutgeewvhORd\n68IWlNDXp/ObFiz+pk/PqNbyOG5nl/zC+n6YfGwF8DUj27CN4hqf/ke13XBi\nIbq6Dl/EcFDnt92zylARL3d0coOliwe04WhlwFVKI8oD8tiJqLbzs4tqT5KK\n4S6+cCSws/0lAN148CQGNUxknO7RDmzAr4m0CCUQUsS0/wJikKYdmZhgS51H\nqpZc05/Z0ltbzIxnI2ALBCdJf3xcZWSlae/WbrxJ/mKE1mKH5IcX/xaYcF6m\nHe9kx9544z/HBMD5713YIZYB/9Z74sm76IE425vZdJVBc6l9Y129g8qrgeKz\nSFqyEut0lQIaqszL1/J28j9nFBwHqR2bRGIs/2RAKNJmGLNXkUeVaJq4Pswg\nxiNtuV8+eE9mvH0eY0o1U1eneqZmCYj00sxxNiPDwKeB6njv6jKOv6KfXjsU\n19fq\r\n=jddW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.5","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-53aff9f-1609363170397_1609363232708_0.41018949630794643","host":"s3://npm-registry-packages"}},"1.0.0-canary-3dfa82a-1609465249555":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-3dfa82a-1609465249555","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-3dfa82a-1609465249555","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"95ef81fe0c48c48e053450a657f1fdaa3b4048f7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-3dfa82a-1609465249555.tgz","fileCount":7,"integrity":"sha512-jq5ZrkbI0u83pt4Qt0BMdCqW+HQIOEbhJMeabUq52VeJO+4PGAbU1I2h4PubHec9JrCF5j6bP4qFTHW9IMGaBQ==","signatures":[{"sig":"MEUCIC08cL27iMKpBA/4SFT1pCpI+UeJocrp7gZdCDk2ZIC1AiEAkMGRVvJnv4/71lnPetkULyZdB9SbjO6JOVaFTVIQNeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7n3aCRA9TVsSAnZWagAADGMQAImgEEECg4RUOBdvZ20g\nrKohjgVzahhjH8/6oVZDBcnvqHQDqv8ieNTuMNi0qjdH2Pa/huxqw3THZ5f9\nN5iYdn65cU2FAIf+nC5yLGs+kiX36Tf+9TiyLqTa9Vzok/GSpTPQH0vba/lQ\nEg3tZuvuIDsvq5YuvNA1aVAcRQP+ACQNR/FL9X5DnpjnMHKMj1rMkqQw0/IA\nzbOlLT0Z2zdv+S+Cgc3lb/NEgfWL832nSfIoFI0ATaeqtizogxn6Wi8skFYQ\nyt3W44JP25bhwtXzqoAiX6qddZ6zBe3Lu9wWovz9L8ba8h6Wuknmwi98eZl8\ngJSSB5Xs5gOlRweB2KERMYyN3+Hz6JoOgJW+utR2H3FKxykyQmxNtSoOzWl+\n8grRB9eqY6jvX+9+DTOsPBXuScGVg9qAcI88uRifnf6STAvb+HHshbV5KA0O\n6tBFRSXBKBDLs/xG6ul8PhU3RB55hgUHgSOnI97LDJ6m/cXrFQVm0qpnjM2h\npZrgump+Xfd94CrKFXDUDCBGa4l7VM9flVkNPaN5WQwGjPwKsN3m1e2NxzzU\nFZUIAQS64CGQGRSYRnipgpnlysUvRM9Ux+VffjOX6ljJn/Ygp1882jJnhPdu\njDQgP5jEPs9BJakLU9ZFHPVd1P4/CkQnBcv8Dfuu4DZqt92bbgW+YpYnWkSS\nw6Qk\r\n=KRQP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.6","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-3dfa82a-1609465249555_1609465305532_0.3546396319318821","host":"s3://npm-registry-packages"}},"1.0.0-canary-3dfa82a-1609465246292":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-3dfa82a-1609465246292","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-3dfa82a-1609465246292","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a0fe18ceb6bc31803abf3351c31f9c7480ba4a36","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-3dfa82a-1609465246292.tgz","fileCount":7,"integrity":"sha512-kv/NKMNiJytkD19gGzyvGAo27yqffndQG0G4TbWvw0QWccZw3Ul38HTLBYTWDW3EI6oJUnpVWAmjmP/of1Dydw==","signatures":[{"sig":"MEYCIQCPRZvhXbWNEfn8Xqroaym+PpgLseKvINJheMvGo1leygIhAMr7gbAORz3B9bdbmz7K6bmcBKtzFo7wKkgCDy0Oreeu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7n4bCRA9TVsSAnZWagAAKqcP/juCJ0ggnoiGzQ4mNJCO\n9UR+6zMVX1/twlGO3ndj+nRHQmpmQsBUh3wo6lq5WxO13n0OQzqPlaXvUzn5\nhNdN1zbrfQg6JcyJMsGBr+3/y8Ucr6P/Z/KD6PmPeoELJ4dOiPwVaGqQp5xA\ncCzV/W2Kpr2apEN+Ivg4tC+ma8Ksdxh7upFpUZW7ESbROyTtoz+TCR/vkMFM\nte1AOzdHOJwrSxtjMwHwWct6gstCh7ZHc/jXDMxUVkRyM0x48PwmD/nMHFcx\nPD1EDNgjT4Mt0R0WFGTqkziZUkBlX5ZuKoKoxfMwVq61dyLTL1TT6ZZZhIUO\noYcFik6QToBnrLKRj3lC7zm2ELlmIIsZrE87Y5T619YtzuU4XqKHvyVcdGD/\nKF3c2no/Nyusy7zUkn9Xy6xBofwZuS2/U90rdjBpxoqjARDCb/npAAUZucCP\nAi17hvZoS6YIBY7qayHAm++J32ci0RuJH/UaV7K03zmXCnDTNOpEA+b65Elp\nfkK72ZD41DPVC29cfcAO6hvo768k8i2MxIjFLWBrDdaDmFtSQebZPb0+FN7R\nHOxVYytUR9QLIRx/Pz5idOe2n02yhnCeW+C3MZkY8xiiUgPHR1IaFOkjDhP0\n7CaR/jdWHrKgJF6gvtEaD27s0Qj4Q7VrhiiUpmKyRkwbuGYReQ3itD7AN5DC\nlR2g\r\n=kjpr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.6","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-3dfa82a-1609465246292_1609465370549_0.43368340617554635","host":"s3://npm-registry-packages"}},"1.0.0-canary-2512319-1609492812645":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2512319-1609492812645","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2512319-1609492812645","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"946c82bab699b2177d0e6ae7ad31fb7429d94665","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2512319-1609492812645.tgz","fileCount":7,"integrity":"sha512-yMYDlzhat/dR8odaC/Ipti+SRsrNvyS+EXLujJ+ZY3klGCglKGMOKRDeq9FplCPZiODhfmsRl1WkRVb14B6XFw==","signatures":[{"sig":"MEYCIQDqdUAk2X1pbjBl+wmhlP6YZIc9Hx6ClOKv65QqVSw8OAIhAIbObUBqZkCvSku+xkFRXyDADvHwmJOhCg16Z9LCkiaI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7umACRA9TVsSAnZWagAAUD0QAJvN5BglHGBNxIKMzSzQ\nziHKX4kOARMbNsWQ6JApsIApJKzN/AIqSor9NBmf1hdLSfSxniek6IMS3z5H\nHYlFJSgEZjg5TKbeegr1upNNNn6CVtuutnJC+Gibs41p0DpSSYmK2pYQ7vY9\nKl0QuOFr9P6gbl5nzMQvQZO8rUc0zVMzmZ1e2AnaAGCwdAPhKRzLUHK9QkEK\nNNm3dVUBFC6pgc/b1BGM3whOwewopukyxqGi2gc7gMzo8KVBY61d7o2DhBfa\n8yUuRvC0hItxpT/6rFsYP+aWXC7iuu39CF681whKhBDAJ+KMWLCxFuWbwbN0\nFadIz6Pc09zB93njN9NGP4xvjA1ouisbGlR9DAXAtGU2941O27Q+P7BQXuJO\nLG5NgCE5ZM2uQdkY+FzLnUIvuXO1TbU5il4ijl0omJODiBXm5PaQeNpWxDbq\nPdm8RF5lTS+xwIAslMH5x1ZoGN2u8xcVoAEDSOnsV3INR+ARKGrd+7W1V2P0\nBbq0FKTKlSD6JQesFWaieHCoezYlpeB2v4mFpDkyo1UDqhHOYc2VMT0sVOEt\n5Ts+Umg8Ew5PUayTSkPBDHRWG1spHIcrD9rpYYaeBQVPN+1WbVrttN3O/JvK\n0KcOcUuy0teZtZf++uQV1eXw7FQvK/Wz15c2xiJWnnnp+8tDl++iifbBY/ud\n3JbW\r\n=pqBZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.7","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2512319-1609492812645_1609492864457_0.7191872535863446","host":"s3://npm-registry-packages"}},"1.0.0-canary-e0de39d-1609541251073":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-e0de39d-1609541251073","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-e0de39d-1609541251073","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ddfaeb9f53dc5461e213119d33180e93d2e65e17","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-e0de39d-1609541251073.tgz","fileCount":7,"integrity":"sha512-EjsDN9Q/o+abxVg0QaKUi0fQegnCmGz8MWU+pvzchDM3hVhfNnH6YdrIxzyN7sPn4tNTL+mPwcThkAtY79vvWA==","signatures":[{"sig":"MEUCIQDDCrTtt7Sj2xFsMO4s8jwFdIav/8cwEHiAVnA0fcQjuwIgPnI5P3/6UvHgQbv34DIsgsRqx5t9M2S7yXnSQgN43ds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf76bsCRA9TVsSAnZWagAAXv8P/1pDuIxetJ740Az4ppO8\nCPfvm7DiWgu+wRSOjzS9I8wYiUY3zsBrx8H5uWRaH2CJ+KRtR2vL2RBqeHMF\nKxk9jeMe9HitGdd+j3FWU0keU1vmpPCGd2Fzri1MCbbcKP1PfpRQUx5W3+km\nmJzVs5MTBIUoA5iQ0e4j7ZSrdsKvHGLCuLq7S3NrRgcF8i+gJF2FgEY0zMgL\nOfAwH8yC3d0J+kiXhkSxoCXYx9YgzdQwPHMa76iw5HCbCgrAreLnfL9wAYkt\nqolJUbNfhsS896B5sOEvOmNPROWKO7U3bWMiDcAzDz7nxLGt0LSkBW+H89fC\n64/652GXmeW3i+lGB81SWZMyYvmlED6MdaR0YZSa6fWm7TaJ3LEiUcGuSVX5\njT2JpasrkmhEYt3fLEEW7JOB2sfEBfqQ6ukeKnOREAFL/a0qlIpFWa7su95F\nzj0wcyN8LtC58IUo6y2ANDozTlbJ8j5sC63vGR7tSDIPlDv8sVGPtyReWeei\nfXE+bfkdXaOybsHYHl38GwljR9L8SYk1pJ2tIQdpUQJaZIga8aYeQi7tStlo\n6Y8dLIxg62LHcrzs5HbANG198sNluyzqHhOeKs+fTPf8kHxpv3SchwOIn1YU\naKnR5mWTaTr2d0D02DLhB948LK+p9mQy2FQ4E9aapllefQr4J2mq5qjAxBiV\nwad6\r\n=l6JX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.8","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-e0de39d-1609541251073_1609541355564_0.7360385368276292","host":"s3://npm-registry-packages"}},"1.0.0-canary-e0de39d-1609541253072":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-e0de39d-1609541253072","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-e0de39d-1609541253072","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2819199cd7e178ff00e2050666304d7501d2af72","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-e0de39d-1609541253072.tgz","fileCount":7,"integrity":"sha512-3yNapTzrjrzaiNtikeaD0TBHYmkOSnqirGYYjJ9SWfsjtcHw4L+7EsM2riWYDMt9AfZ/VjjrX0Ov8d/PZEHE+A==","signatures":[{"sig":"MEUCICDw/VAK3NfuVHN2TjJWBvzbTG5Ktq8wIZQAAm7VYpAMAiEA06qYdOcPp7C585UbGCChim2WLN+YP2yQV7SFzId50ig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf76bzCRA9TVsSAnZWagAAEekP/1paUEBlU++5/f4vZ4FJ\nwMobpTkiVCtgr9Rl6+r2BnuHClOv6/Zto8iVMgIe8dd430/EPGNHMgfi2jKD\n+de/hcIucc9WDGpIJp1CR+reoYh7kExTOrHZFuGjNy4YSZAtdfwQgJKl63W+\noWLtEaLzSgBe5COGIM9a5kufvR9i3icnO8Kr6SNZbOp2WzZrCW1bsxvC/FFC\nZaZOF+mMcZL8jF6bwdZ+ixlGfh96sqNL8zjVhUp/FuI7MUpuLJE13tKVcBE3\nxOKZyIBfYaOloG9Gb4keCShcvT7PVqdc+ZmhdvPO7Kp4+a5O9CxwwCBljZAr\nf+/4IC8Yfwlwa3n7eqT+cCeBnHuJMxC6P+U+mzfyL5TQ/fePHcx0GVf3Vvw+\nlmpMlHBwooc7SFQ+0kDZ1yp1tkjdgXntQQa2+WdxsiNvbSOjnYViRMfhr4fq\nskUEKHKrnQn9eHiByj83Bi0Z0HMJy0z7MDWyAZDhqOZu2N3Z6pYr/FsnVE14\nexmYfNg2wm9eHwF6bcY0ui7vm+AvKk5Aq1vfXdHuxFCvEjmweep066QpNEnX\nyWpTRp333tS+Rfs79n5UeVF3ipxM4zUMUqoyWs9+e6giagsSPRVBIoaLOcLT\nlCjeu0gzz2wkZe+djcaKK4DUcXbbAGxCFRo+sLWkItVnw82n0GCl5eYHHZhH\nvHpC\r\n=h49U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.8","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-e0de39d-1609541253072_1609541362838_0.2395155886688909","host":"s3://npm-registry-packages"}},"1.0.0-canary-c129060-1609557148393":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c129060-1609557148393","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c129060-1609557148393","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d6cf8d6d6cb3001fb85395e74b31420bcc86d571","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c129060-1609557148393.tgz","fileCount":7,"integrity":"sha512-inJyy8fST0eBNkWD8a7tEhv+9ReD5VWj3AEiEaWddXnTkaZufvvn+w627+zFuZER1ZeliyUXyFks9OtPwcwo5w==","signatures":[{"sig":"MEUCIQCXM60hBx/YNvHAsrC7sE5bvPQEN0OOy6F35VROmrHV3AIgGa0QQVJRohdL21V7GIatSxGq/hzC/Y2YaSRJXYGJZGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7+TRCRA9TVsSAnZWagAAbkEP/3+1yd+OWud1zmEjfFD9\nmzgJ/JN8eUc/2H1z/mAf06EJJyTVav64TIm8p/9XARuuVZ8qQKiREHck1rZX\nDE7PAuguJ1c2/M5NrvedPl7WxWrsw4WNm/HKYi4GbF9MHCAGhVvYY1omku2c\nw+acXKhpUT32rCJHhz9AcFkNjUDxt+uDHTXVAW+HE1qpTtZuo/odqC03gScN\np7rwC4snpGwI2FpIaxX5MoTmO3hEmJh4EkKDzeYK/M2+ruGuE8LJ+E21CrcF\niAgj4T6Gcu6bxdSNGyYjUXcdPDuDF60eGaMvHjCmLUBMwVDG+OYAePVu2g3m\npEotrqho05ky3W7X3o3mAd3zgMjeqv7MP7DVfxDaFhasNEAJvHXyEav1jnro\ntMOb5+s6sL0BTvQckLX3NY69i4EtMFoArPMUxlgyfu7AQSwaak5RMe2soEJ5\n7RLskYNNWT1uQXT64YsdpSjv8+QceuDuodNna+htEU6zKwjSAk8gvFpJp37A\nmN7lCf4HztJ526hoZhtC9fi97SVrGceNcGCjiU0hw5Zv2HqBPF8l1ox3sKc2\nGGvBk6rt9c0xMCjUbIFR8jUIF6jqZjJ+JB16xzj/bTpfFyjem1X+CUWg827y\nuAcfP4ZdRsEsJqHH9j/4vddAp2JhoGC4f30KJeav7++Wk6KJ4Vtd3JO0Smit\n1yzd\r\n=gmjX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c129060-1609557148393_1609557200741_0.10684607473767871","host":"s3://npm-registry-packages"}},"1.0.0-canary-ee815f3-1609557259226":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-ee815f3-1609557259226","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-ee815f3-1609557259226","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1d6078e58523a0281b2fe5ba96841d18423c4264","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-ee815f3-1609557259226.tgz","fileCount":7,"integrity":"sha512-IWfBJToCZZ+ZK2aTzssQLLK4lxl0qM/rwnfepiEF+APpVtRLDg6OM1CdfeMaDUfiYX6H68wmvebRQhmPCNWTkA==","signatures":[{"sig":"MEUCIQCDx2Zp51Bhqyt+iF22064uuyrsvCH4l2TWFBr2B3LGBQIgLg0eYvilWeoaLkYVdppfCORfzVI8zfsYoqr4Cqn3nOM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7+U8CRA9TVsSAnZWagAAMpEQAIEvOf0hf1H0+ZZUtGOt\nv8y/OBkbaHZWxFZM1z7Ali9BwT8TKUqMxzdgl3V6O6e7ZDMngqIZ5r0IszM3\nZATfSXZ+0aw1USlSCFMsyx2/U0kORKVWYYaT5BlFtFe2FXneRKSkDf2mV8Hn\nyNkqfSQCVW3xbS/ALy6+CJYYoB+GaHB0/1E/OodarpSwWuvAnIapS1Ppraj4\nG/kuzUff9qOt0ojD1CUqOreRQll4nyiwXtu1pS6kHp5vsMJPmNuAkkJVnl3u\npz3VFrt34Fxo/d/P7UvAxAQEvLfgiXD8F9GViVSy5QZDUzlEk2W/M2QhzyjL\nWQQ3i6HHdrtTsRTmcdtkC9SixD4tfDfzd8saSiT/4kDY5sg5RdKXMQMAgCFo\nO3J4AKGkZt9xvC+B4h3VSbiOFtPP0vWAB9U7PNGHg7nJwLej+Vp1a2oME8w5\nacMJtrQW+3JoLzNf7ww1LmhZGu1K62Qw+S8f0mmYKzF4mslOzf4VzSXdtmAV\nyclsmuLiawAzmpftpsCwxK8OHmVzWJiSW5BaIsQNYuxCfefj5o0NgxFsqFZ7\n7AI143w9WdDUF4gVqzSnwS9PGjAvI5RcBCjwp2s8KgAgBqlS8Xt1Mc/j8rkT\n0tYba0SNSdUMYRQv1lACk0CNc1eoa4szmcrrGRPBrkYGCQOBnJpAIN4HAmhp\nwUfJ\r\n=QrOv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-ee815f3-1609557259226_1609557308363_0.28193390550393405","host":"s3://npm-registry-packages"}},"1.0.0-canary-53858a0-1609564086398":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-53858a0-1609564086398","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-53858a0-1609564086398","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb707c657fe8328106fe76fc7f7ee56616755390","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-53858a0-1609564086398.tgz","fileCount":7,"integrity":"sha512-39CBvDe7alqm18n7YWJj3YMFqqCothYYBKNBX45AfdFcifiYCL0rX4NLRIVVXeVYXuLhrgy+9agS+8HoHsR5xQ==","signatures":[{"sig":"MEUCIFSlN7xalLqtQmrK0jIFe79iRMiVxIMsQ6jd/md9MXrMAiEAmJ0rbdQMlowNcZHUpaJkOD9Bnmg2V0bgQvJrVeo7ZbY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7//jCRA9TVsSAnZWagAAU4QP/intyrXYKHQMLdF8fP9L\nrPTjP+b+clccmCN5pMpgicKwmTzE1efCEl0fhgk1uS+CO8zxwN5EWf/pWdbI\nr6H4wJgOKJCgzGz+fIwTT3FpUpKfmV9bBnDD1I9hsYDb5wKYOFNGhZBP+RnN\n9e1Y5tgzuUEG4wd46XHOGjD2fO3ZF6HLhhJLWlsdBKtgGfDaEp75NNC6BTnj\nMsPlUtWBEs6SClFNYyhMf7ony8vEC9HcAcSRlO+5atZKu7PKPR2oR81xopnZ\nm1paAfZyA3TYCW1Nix6Gp4QUbzzTpC4qBBIN3m/Pza5bKTbv6RvYQt/JGqiS\nH7vt4Nur43kF0z9YCi/3ZGj4AeCPmgL2vn/ZJsDO1JqvhUgACpxDLEU4Z07l\nUZMQp3nLos1pIbK8gOJDk6tl16YxO1haMyzr+x4uzWYG4KF58b5oVoFY03iI\neV8GUyYGQgvPw/GKHk4UY6goKrcwGeeRTNQXw+BdcXcODxl2HRtHyi7Ceu2/\nRGnl8vZcz8hV/JJ0qdY3eZk6Kb5C/EmeyjrikVO7kAl2Xno4SkZZMitX4IKO\nPB/Adi/8eieDBseXkiAgSgwPzB2B0c8l3yIhbwLl0lRUTB1DX9YYRDUTxXB3\n4O6yZ1A/CLxf71i21AHsZgl6SndwDgb791MgX2CBc1oLjOQ4/jQvzHnvCTc2\nDfcn\r\n=ktiN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.9","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-53858a0-1609564086398_1609564130690_0.7540990184485823","host":"s3://npm-registry-packages"}},"1.0.0-canary-53858a0-1609564087425":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-53858a0-1609564087425","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-53858a0-1609564087425","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"07a1d2de0c96625c087cbfb73d92f3b1f03004b7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-53858a0-1609564087425.tgz","fileCount":7,"integrity":"sha512-8LjzK9frLN1VNWKmLkjyxqxa2wKprTlq3fKXmSDTu0sXjfjiO1ilNsi6BLFUzKp6jLpd9pEZpYx1nV8qsuguxA==","signatures":[{"sig":"MEUCIHQ70dankopU7j8ZSRjsOQmT8OZG4g6/2y6hVBNdDkqkAiEA5vvtlOc4F7H/4/3x/9JiSUl5SEiEk6i9EmZP9AzZb2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7//wCRA9TVsSAnZWagAAV+8P+QFq2K8baopw16irHUj2\nFCPCzXxa9iYZrmtHJmI8buu7bv39qS6QfF8FFEvxLL9kV1dLCoEg5vyPBJe8\n05EaPHubhREt/uhxY/UmzJ0encfRgxZx3fQXdCnasSzRNfTm0+6cVtVvnnc3\ncqk1S3ABELbXG+xD2A6gye9xtivixbCvPdwpb/2VbCS3fQHkQE/bnhpXG2bE\nVDIuWcP2e+ZETsMAML0HJ+8AkQlw5Du9oqMotBX2vzCfYybXjng0/fh4bJSz\ne/0b1kYOKr0hfRzRDGrvnnWBP8cGubFc+0pX9ApP7tiuR54AM3XwTex6Npof\nbp8L/s2uGm108+7ptToE3u5xgnESYHliyby9KKx9WAAda9XzMv/vflgkQS5S\n5GQ4F2K43bweP/jdqtqttP4NtimmRpbfIQUATt2k2/Gz6J4AjFkGC3K876Y2\nw8Y0lA2pdp3N9SmgKMZs/styGoWJyX1tBpKsLxI+t0bFDzM6Kgv1pHSy6OPZ\n0PWsJdCf9+WX3ROYZtLEAoH5/HKHiq7p9SYyUfJyPhQqxwkc7gJvw3jth0Ws\nOuimJZbO/1+eHFgLro3mjqMWLWnsZtPNZleg40rFABlt0pHDaXRGatvDPN78\nDiKai2j1b1Oc7PCVcgtEGVllyPB47cgRPY5ewXkpIbHapXpM/7DfqofYeCct\n4SP3\r\n=k/qq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.9","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-53858a0-1609564087425_1609564144096_0.7211077249156514","host":"s3://npm-registry-packages"}},"1.0.0-canary-d6c9d41-1609638938212":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d6c9d41-1609638938212","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d6c9d41-1609638938212","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"69c20ae6dd4ab41262aeb7ebafb4d81d15b949d0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d6c9d41-1609638938212.tgz","fileCount":7,"integrity":"sha512-h+5d/9q1fVfEVhIZxOTbmeM3FBTBm3Ug3T7rXOwUW/YymbVorS3au0+/3G91/o1tURiHWOsBjLqeWbk2gIr0FA==","signatures":[{"sig":"MEUCIGYp7jc4CQX1rmY+EwNUT1t8rDXIBl9oI21sZYyZjtWTAiEAm4e3nn/sTQ9rEgOoXXcuCEr/R8HV8JupHCkZ3nlYqVk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8SRUCRA9TVsSAnZWagAACoAP/1toB+l0VTnmPSZQbPgs\nQp9UwkIo6rhlYiZgLoRwTRnViZkAsy+BOif8RbS7Nrlx81M3dL3QDanBDgKG\nvYdIvzv8ZM2v16jl0OMy9jIPSCoOGFH8jBZtmcAejDQMxDpZkkjGJB8om5KD\nEpuWdXDTasPjtsylvU7N8UKICRaKoS2qVR36Omj/TCo7oyH/edhGRoJH5dLl\n1HW+jfSw5nb1h20QA6GHgdrOBMiTxeN3qEAnjdtY/vkKqPlKfBA+6n2n4XL7\n4830aHjvy8C7QypkfbObrVTOF4Bx/bgNTENBVXZexUAqCg/EYH8n7hAwKbxU\nY6lnwLucu647tu4ceiDzglNqNeR2gYNRaDXOgwN353DD2V07+v6U9cjCEsZx\nJZvgvEQCxe72+Dhi4WlDm4rjg6yKbG7tKJTzwWlePhQFUkv3Gbu6t1yLt98k\nJNt5sl1YassCdg6oDeTcSvLjDh0rGnjUr32YWNC5yW0u9/miZ+oXHxfU+CS9\nN5GqYA8D2USOKvsZuHD35TXT/YE9aQARzfoAUi3amH7raZrRKrD1ISoOvlcc\neySnp5it4R3YZW785xgUOkmR908MTQFC3ybbOBjN9ttlyJL0OeKW+5jELDMx\nBqBPr1myo95/OjGcDbBciHoynY2IQqrUxTUtI5J8gk+Uiz3FiphgC268Wkhr\npXkd\r\n=GRpU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.10","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d6c9d41-1609638938212_1609638995861_0.9137349324995527","host":"s3://npm-registry-packages"}},"1.0.0-canary-b8cd76f-1609715645960":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b8cd76f-1609715645960","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b8cd76f-1609715645960","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"71f988edb33f7cbc8e197753877c37406aee47cf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b8cd76f-1609715645960.tgz","fileCount":7,"integrity":"sha512-ImfN98ZDyMkOEM+Agn9CZR+b5Xdqf5aeQtM7D/CaC+14G4T1J/mSWbfZLcCUciwCJQUyMsgXkwMJ0l1QvtQUdw==","signatures":[{"sig":"MEUCIHBLV7dI+eahmA5GCgAuCNgab7mTIOf70Cej7/TVy0q2AiEA5AA0dSwwvIbxvdlVeNwunkji/WvpeH8ZyHHIf+hJWyY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8lAECRA9TVsSAnZWagAADBMQAJQ8/O4/NXVn9B1a+rDa\nRM8m2VtxvfM8shKCtL+KKj833ORbxGqp74UHI+TV7dQ/kKtWfIxaOHVTbiXj\nbhlDoBNUgyqSEOwxbOh5uMK5rNmDZyviUcrPmyvjQzyeAOHfqyafIbkUtzaw\nig8rniQ38VO4IyM+x/eUfL5f/d3Fj5eDo1i7sGoPVWQPeuBgKqegfLPovw08\nGiqutkAhzRlR4cqQobQcg+UNdDmd+cg/aZCOTM6SaBASn9XIBf2iJuBQxsy3\nh+qLvFE4JpBvQ+PTVErhaZJNWzioKBeHPL2owraCWR35pc9NXbnpcHfYcJXl\nX7BFg2VtNIVcDVp+tvoPmt2okr64HWJSAIxLS8g0U4eibDYiGlOYlzWOAsVU\nsoz657YovpE1iuMv6UMbRWHbAJL/OZuWZ/RJkDej5fsOf6dND67/75m+qhTS\nX5Su+E4zvdcUPlUfHARUN/T9IhyWc41F9jR7Bmcti1GtTcoHYOAyGClqUY/4\n3Fxs66yYMFXZoILDYxZMJ1hZUKzJLaZUoNxldZjShbrbiE/D75k0uxKTyauL\n+dD9oysTPqhKQ0aWaKkIiNdAyUTlzAnlxQYLaL6UAJkUT8b0WLFmal64JEmw\nKRcliLNdjoZF4AF7nXbfc1QXTPBLMrm2t/izJ8DwJDUsyIENPZWHBazrxss7\nK6b5\r\n=kKlL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b8cd76f-1609715645960_1609715716250_0.07512747612588688","host":"s3://npm-registry-packages"}},"1.0.0-canary-6b3bf07-1609715680124":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-6b3bf07-1609715680124","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-6b3bf07-1609715680124","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"602681572b6e37d87cbf9d4ac73448f5cf1e5a03","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-6b3bf07-1609715680124.tgz","fileCount":7,"integrity":"sha512-H8W54Esk9eJT2kVNk9DFKzzxca3eOBO++BUzjme91oHguXHl3Bo6TG9qBMoucJdxT4YlCSkNNmF/mDZqqVDEkQ==","signatures":[{"sig":"MEYCIQDecJODvVU9cxW+sFoC+vANz/hjL4SCJhPvyx6MznSk7AIhAJvI5+KWJrSzpXXHNi/+lPZ80MmbOBMpSVjpGB6unD+s","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8lARCRA9TVsSAnZWagAA+8sQAIFVryjdyYZmTYHWlcqS\n4iiQD1TnuKfzhWw1CFVWea4o8lUjojndly0Ki3PO1dX4Lm31A8YJ6XGc5eOM\n10HIUB6Wol7nTWjKuZuWRXNY+ZMEQwnGOZHwtlH2vcecHjvktLXYZ8uIwnhQ\nh+HIMBOr7GQxGAdmnpa+hl25AM2QTemwvbVkprILspNPCS79OELwc8hM3y7c\nIgYw2tFhqoK1exuJ4oj3j6fatxdf3fQOc/G1kMtCJsggCy0++IqhSeth4xwd\n+2Myt53rwnw2kreV47A+9kKa6hARByuLynnUJwKHLa6Mw7YkvCZZWe4n9yAu\nZtnCSCb2R+afERs/cQhaUJHCTsuOc2wMFh3lBeYz7JxyjsWye+HSLhn2ajl3\nMCQULytYRq0Ft35+ElHPgMvlAUiIdg5uXqLUgcz8FAtm1/URT5cZbZFehnAn\nEAbCXbKOWYwcEUGdmDaVOUhhjvyRNCLGZR2FBitqrXSn5bTBvdISDqDY5URc\no0Uj8IVgAafYz5yFT9YXcX+TSReIfrJmn5ZpdbrRnWEtYdgIbk4XUXZJuPV5\nW1uRAz9XvEIvTx1rsOvZVySWIWVcmqsQppp67SgvH8eOt/Q7xSeWR7sfbbIg\nWQSGc70Ch+5gbalGzB/a21GkjVRMZM2Illybv+PW1vJbJPbzwcoTm9PO8gYa\nX1v4\r\n=QLDZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-6b3bf07-1609715680124_1609715729194_0.22897139649403608","host":"s3://npm-registry-packages"}},"1.0.0-canary-2ce770e-1609715742062":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2ce770e-1609715742062","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2ce770e-1609715742062","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f44657475760ee1b445ccbc3c57699693578076d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2ce770e-1609715742062.tgz","fileCount":7,"integrity":"sha512-X0knrEFrjKrdmfprf3RTG7clDMxSscVin8GroADZoL0pglpJWPwiWMS35zMDIKdq9DXNrFGEUEpJpKQdxmYYzg==","signatures":[{"sig":"MEYCIQCOUWBvl0NPWWfdsmjOaLzQKfRKKvpRNwtuP+HHRr/EswIhAMKq0MYX9HrzS2+Rl2a7vtja93Ps8FjDOT5pnmU6Smb5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8lBRCRA9TVsSAnZWagAAKlkP/Rdv3CrHAuuanhKk2z9E\ni4DuK9prvN2/R1A8PAyQheoxIAoKE+QL5hlORnLE9mk15YosjThdXOwuskaP\nss2ZaTtbBdJ1axjspAxhu2g5UtOCuCreo2/jaDZgDsfH2P3YvaXupghczCv/\nw7cack6EBwDXuvbsIdEawinPjPiDAmKgdDh5oPZaVny9lxnhNNnVZC7R38IA\nda3PEVlSFgBTr60E8S4MNh7XpSFQ7G0v5W1IBPROGA3xr3KxBm2uLqE3Ulh7\ndF1/U4jmVzq5aCeJ4CUjOam8dILbfToN/2ZEoBULEMBygS8H36eT9adeC4qX\nmKCkvqfaZrhWN0TqJsjcVmRkRcv/ByhkobHC4MUq73gGhSiem6bc3wlDwIaY\nK4iVQy+UbvZraJLsDf9KGgMeYA0+GvwQRCmnyH21EnYYAzuD3OCjMIHAlpFB\n65vondtxHiJd6904PktHQ/VIggb1GtL8rpc6bA9zVS6Jhuqnedo/Z7CzoaRr\nFcrCtAOcB9sICZW5scB8DcBdTprXmqXtd3w+jnFK47bvioTj13+zyooRhDBv\nbkFGOF6A0xMFoDl2QS13nFIn94fO7xw9fbn2h4hs924CsnyAG1RbVi1kgGYY\ng2yoTiwZk1hY6HiE5R6nP8H0tMoIZvY9vhhGq1xkXzYxr5Jj5MEWDa7GEtnM\nZ64Q\r\n=qOQD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2ce770e-1609715742062_1609715792622_0.8975397913970569","host":"s3://npm-registry-packages"}},"1.0.0-canary-98b25c9-1609715775092":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-98b25c9-1609715775092","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-98b25c9-1609715775092","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"122078c1deb36789e6e91eb5573c0b47c8c5c3dd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-98b25c9-1609715775092.tgz","fileCount":7,"integrity":"sha512-YCytVR6JVUgLvLlUK8j1kDAO1xPST4oHs6RDMN3/zVKPPDte4wO34zqbKXf9T+bkEAKUqvL16UFayZV771NlNw==","signatures":[{"sig":"MEUCIE8didxaxluhxRMIGfp8sWq5qeoKggaCsncWN9axdEO0AiEA4dKmI3N6EUvR9jgEFxndIhAlWPJquHi0w3ONgdVgBts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8lCBCRA9TVsSAnZWagAAHHgP/2TJOebq9/pnFkjQ6phA\n7nKlur8mfjvVAmT9FYcLB7bVQWT2p9v3Zl4ls8Ygzza/mquavO9nFxuUnwcy\nwn3OGtTyItI0ExIOYbLPxVLYiaPSji/VmMenz2kr9iWIRWj/dqjRJPp80CMY\nsrHXIHkJuPO1WaruU1YG77SL70mkgWDVANiOY62uneZUkAday5tr+4x1JoLH\nDXlPv4CQAS/uaM3T0IVAGILNc0MWsXP1i8Imf5zve3lP1AXZHMfC3jEGFAk6\n7ws3l0+VlDRWfWLI4Ibk0wisiBnawSAKh8+De0zpw2j/PQEaIiJqUG3ntwj8\nq3R8ngVMqKfh38y4jWFAHkvLhDpewVi+u+J4wzfqphCimFS3Hl+LgoKSAYWA\nSwoKJDONWJzd3afx0WjhzcHVBURPCE4STb/wMNGnN5t+QPjEu0hTLgwN/7j3\n6ERDazQkN1aXXmmDblbWK+F5y8BFcX2CNAfLkvdXgw7jWP4QCsGq2CWYs7Ed\nlXWf1cBCK5/BLp4swWvjtInHVaLgjTwuNtM0M6ZFZBfiP0TSnszeZzHj6zJ2\nvgZsn02l5lmRc4DxpQsK6LFyJSPIQpcOIffAnbQWafsNOTK/o/zSwKWjpyGB\n8PJVCqAcIQ9gtQI9rvFX0Aa4jSgueNvg5pg4Pki0vNQMvVnDJrv4oq30nk2X\n8396\r\n=Jwai\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-98b25c9-1609715775092_1609715841043_0.41325356069205066","host":"s3://npm-registry-packages"}},"1.0.0-canary-c651600-1609791576723":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c651600-1609791576723","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c651600-1609791576723","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6f076189c6fabf43cedf3650ab302999c01aecac","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c651600-1609791576723.tgz","fileCount":7,"integrity":"sha512-H+IRmVfG0l/unO0pBaSNix2mZ+dtBdLvBxu71CKsKHXPCquc3WpP4d7smaUMlU7bCLRrtr3tqyB0ab7whFfFpA==","signatures":[{"sig":"MEQCIEk6O0vXK/7KYZ+xrnnlsZffDO65E2OBIE/SLaaxMUs2AiAjKhKZ/71NMJ50AaOnFZJt2oo/M2GYIGywR9L+E5cL5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf83iLCRA9TVsSAnZWagAAhyQP/0Yrava9ISCWxIY5CVq4\n3EY8xJLHNZyao1fagYDAw0TAG/4nihb8L3SZ0B5hk//QaO7/1M29uQzYYk/k\niimerwqlnyNrdg+v7E4t80EAzF57Yi/m0v7++0fVAr5AAgFy/o6OjKQ3CI79\nBNcUClpVfeXVwv9m+o0bHfD+VHQnFvpzaFwMMR60AsYVkRIU8KC8dE6ZFjjm\nNN14xOASsrsCsjz1/4Up4bUuFvg5PPlbXYJJQ0SrFhx0zaoHA6AyRA2dJHHE\ntYoMmSWEqOIwmU0VpFqTqpMEivbdLjDIiMCmYVZEzJ1N/RE0sk22pXY/euIx\nvUdkJkIUJ4ZqBvPprk2G64FB5dmQALDJYYdCHeajnh9Ed7IEGwODeSYmrFvt\najnRmjXp2lDOWJnTwjetWIA6a9hVzVtgXRF14Jv3+jqA904gdbkw8mLIFNQ/\nw7WgoqxxQGjMZsXvVoPWmHksQRayy8ctweiAJKpIRr4I2w5GQZwqJnk1f68I\nRTyYRDhltcE7sqHqoK7dBecgJ+MrEidRMe9VqVa0Dxl76g3GMpF0mqvySE/T\nZUx6LqV9y7WpPKckEXDH6RCANS+PB2MoJ9POJim4F6lwIadUBCkjjG6ciUTv\nhea1WXQLDij4mvwX6kIigPL8JKpwqVJJ/ejvbgOeysnRRChNopo1LIaSXfiK\nmc8k\r\n=PWJ3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.11","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c651600-1609791576723_1609791626915_0.5902360094643855","host":"s3://npm-registry-packages"}},"1.0.0-canary-7585be6-1609802233679":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-7585be6-1609802233679","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-7585be6-1609802233679","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e4aedb2a271bb72cafe93510e03cb1a6137befb1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-7585be6-1609802233679.tgz","fileCount":7,"integrity":"sha512-Ozq2XslEVU/I3DnTWazDWulAFnOAJNB308zDZ0Aw3dykHobxZ/YFkc+DQURk2kdigq4RxfEU+fPldugDwX4l2w==","signatures":[{"sig":"MEYCIQC3iVUFsrVXPGUb4YLF1wnKw52us1dHXAqyvpYKtiI2bgIhAMqH2jpCN70WNeRI1EImXlhAsILaM1rPwTegfC65l2Af","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86IyCRA9TVsSAnZWagAA9OYQAIeMRHf5IyU8eVrsMslb\ngNGPAe/3H5O49gEFndOKw3GEGHX1JKKEqzFYDAF3g3uyz03qzFi/upwrqDx5\nxryki7maR7nD9OKVTJTwitDn+zK9j+K30Gn7HeQ3vjnz2ujE9XMaqRwBHZY6\n/0Rjteq8eC16oJtn0hIKUxx4Qf3gt7Q6fvm2MAUCZz4fvDFjaFyvnAIM3EIH\ncWea11to9Fo/bngjfK76/ONDahlk3GRBS4mdhqlvr+3GgfnraF47HYAco6d5\nIwolA+fw6FUug6AGdM7GPc2YR3PZOOLPYhAnnzbM6e3n1jA8mUS6reRuefD8\n2qsUlN57ISpqRcp3VnBc1N6FQCAsXYJxzsVCwYeDqe4vSTh8JcjUgwizZ6At\n30zf+Lu+UKibe++u640S/kMteicRGH8+xlTAyzGRWLB3xeuKASZTGeOkDvDl\n76p0KekQA1thD1KD1aN8TGXJgU0HGtRiQCU7wT/M3mPHPUMi0+Y0IjkNIptA\nmoOGXZfUwxYt1ltVqBYjPsadovoSHjFbKH9uKoNyBjOcakzH7LOYF1pqrWUx\nNmpeKzuiLyOY9Kzrti6yMiQXj0o6Kwr86QKGj2VRo8bCVAg/Cb66pKPEYkvQ\njnsygWLiGtk0Ho7BYsmdr4ukpeshjf7Mff9UWPtRMlETLI6/jlg7UQP90aQr\nEtQi\r\n=Faq9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-7585be6-1609802233679_1609802290219_0.8353945761718244","host":"s3://npm-registry-packages"}},"1.0.0-canary-d109a0d-1609802276216":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d109a0d-1609802276216","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d109a0d-1609802276216","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"48fedb031274825e3f4e6ec80ee82f47693cb612","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d109a0d-1609802276216.tgz","fileCount":7,"integrity":"sha512-rvUHWaDZbxDJWfVu5ILYk62GZEncFMEdfkY3w4fh0BqY8VPo73F3PV8NsJbTV5Sn0R4HWcvlMxccHvICqsomKg==","signatures":[{"sig":"MEQCIFts0hJcd/bPtRTicXMUAXiDOFcS/f2iw101Lz7pyo4LAiB4uW4lw2dDxLAiWQKIO1qf+i2TXHf2jGskQeiolgWB3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86JVCRA9TVsSAnZWagAAVL4P/i5BwBap3YhW8jXyjbZi\nX+X+LmdmIooaSCSbvcOKLtxERwKE2VkYPyO9qxouE1oZMVUDX2luvKAZSDfj\nDDcf9rRGNVHSnKdW36lq31jwf5rIKIoudj0Y3rChsXreGYbmxKwjD/+K1Ty+\nDL1K87USXaKd7a84uXtqMV6P09yMi8Ss/1twtB4KqCVxf5ekclT4yd472YEt\nWBJe5IF7hdg7zqQhlb/b3Sge4n0xepWb42F4Z0TDG38RkHOAc4yLrKfZk6Rv\nbPGPSJtKediPNSD+aDXRHHPBKUHvWlfb6+KLfqjKzB0bsG8FhbMURkm+DR7t\nwDEOOCfDPbI7rm0oi28Mi7WsWfguKbWR8jJdQBOy39es2sd7zOJbw95EEqSK\nESCKH7zLmAV3AhOZ/Kjh0YHkAPPSG20o0rsepDE1DQZgd0Ts+1eNB696he4N\nm+OQ6PgkanSAFFNGQrmS8wfp59GJMAFbBUOTbjJrJDE3v0H7MqMbkE08w42g\niqbQ17cgDP9ASKrQiAWvA3b5gT7DlOUnE8t1Y3NocrHd9qoDNqvrFPr2N3S9\nWpPmvD71l2HTVAy+VF9FICVJsQToeKw444kg4kr6PHmR4vNOs9jPCqgoDO22\nAq6VzN9mHjCrLb9Lc9jbA24rX6si/6+OPVCGnCBC4S4LSZFFJdID1NlyEIzz\njb+F\r\n=N1Xo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d109a0d-1609802276216_1609802324708_0.2661002626543387","host":"s3://npm-registry-packages"}},"1.0.0-canary-13f9ca8-1609802332453":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-13f9ca8-1609802332453","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-13f9ca8-1609802332453","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"031f367e3aa1ac3017ce09f6468ec36ee51c2ab4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-13f9ca8-1609802332453.tgz","fileCount":7,"integrity":"sha512-XfldhA5IymnuDK8uuObKprC91fQatIYKH4ZrCzjs5oPFkIrAa3GQ1hWCbZI+YoEN62+eEZtONi1P70nMDrfwRg==","signatures":[{"sig":"MEUCIQCvaqg2IylU+xsQ/F+xoQ1FBvfnml/pNRLD4lHgk2VhPwIgdnX/n3fzwQozvXgbDxzJJXhRmiTLL1K19Gb0RsZEWBw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86KMCRA9TVsSAnZWagAAHmkP/jJN68FoKc5teypsj+0m\ngpyPtQOKHUSnI7RiYh+6+8R8axFEu0V58cZkoJK92N+60PgWJUKn00OHa+X5\nqLqTy2kHMeLWAVfU9bDrTnTRIFCPcjZqMqhBnlCy+fyeSAt/leGE970UyQ4Q\n4S+iH8LJ2EDw90THiEGdumvVzKFkkEpejQO1GGRxWeJ3rUeazbV3irrgmZ3s\nfTJhSzT8aWkPw1LjkZE9iAGOWo06zUqNajNVmoJXM+xYI+lJ9QvNtrsV1fWS\n3du4yDA8pTMGt9fIowOluXcyaCstSYSBgGF20/ff3JGqB5vRYlI6eMQbsB7F\no6d0bd2LV80XMDf4ZrFAJB4qyS3aMtMg0i88yyRsf3twiu+48gx82ou2rY8H\nJaPB6tUVdSnW/hJIxd+KrtRHw91eU/am9izq44+aMh2K9H1FK8SwrROGAFPu\ngpCSgEWG+scTMZKC48LxfuPAdDhMKXGFmam37kwp0XCuV19UKRnp20P0B/qV\nplF0vKxSzimYiQa0Rin+M7XEyJPMdoVivcDbN1Aef4jBSqpSdpwi24C77Hdg\nLXiolEfag9rIJ3CLrzFwkWXuTv79dZeOI+ZEbslmXUtc0mv9uK5DLxkrNZkX\nAItN5iJIDhOc12nAWFl5Rmp3507piCO/wiSho2ATyinO05S3VmRsPLO/nW9m\nfe4v\r\n=r4k9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-13f9ca8-1609802332453_1609802379924_0.3465563850398856","host":"s3://npm-registry-packages"}},"1.0.0-canary-1044180-1609802378323":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1044180-1609802378323","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1044180-1609802378323","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"78e053490822b9a125418fd03bd07de147801946","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1044180-1609802378323.tgz","fileCount":7,"integrity":"sha512-hjP5nnWw2EfIp0PFZLM6azTwcHhCEGp3Ajb1rmkP9xLkjEjtkjP5DxDVmh9yFH2VU2Q8Up/owR5P4f7UAko9lA==","signatures":[{"sig":"MEQCIHONXTTMpUfwJU2LCWA7GpSJirK2Y7QQtpJMydw3TYaxAiAcnT+m5B/nbLiHtHKDuaWo/7xM348EBdu6/IWo3eq3cA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86K/CRA9TVsSAnZWagAAb7AP/1Gx+xGRmrVv1vx3uBCc\nS88rD0ssirMSyn+DsUisv1M8z0XO2pNvXqS8ZGU36bz0dIftU3jRk7LRN4MN\nysMtNemjy2VvvCg0VyzkCtdVJlawEJ58muKtydRrzCWwoSZbUD4O3dDHVv2g\nFGT6deMx9JlDBdmPEaSdb3koYLg+E5EbC0e1oJW40LgV8c4Oam1px/f5lM55\nE3V6blHLdNYWRyB/jkk83If7X+aG1e61+MNU7rgUYzzG7rLnbXRTh9oL57He\n/ZeWXF4HREGmaADRBpWRl8nibMtTi62ocI/F0FuvNNXglgA5Q2Z2rAyuzS9p\nvrUMOtnqN+XECym/wND5bfq+M9rmH0HjnGx+1AHqZ35V1BZMUpoQU2Cz528M\nO2XBYRPdSoeQG5xQX/hYMUJzHvPR9PdlHGRBVYD/NaK1ECNJlrTC/t7JJGXm\n1FRiAK1+iM61Bk9YRr/x/0hLzOuHaIw/2XHk8gIj4hkh2KvDLqYYCjbZMOxg\n+mqy8fTI3v0pocUU/sx4g4RyqVqjqpvjl4OGyFo17H2TcsdDUEGgDkQwhHGn\nCHRaraDzzgS2lnfXb0w6NUQGlhbuysVhBHKAVQmE6sOQTw1VfqLHdLMAJjQd\nzjlefRINwp5QZEysPB7NIsZZaIjql3Oh78Ay1TaIjwJkSlJ5CL1SKm70Zgss\nEYi9\r\n=5FkQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1044180-1609802378323_1609802431448_0.7735310302276119","host":"s3://npm-registry-packages"}},"1.0.0-canary-732f569-1609806760086":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-732f569-1609806760086","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-732f569-1609806760086","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"913c62b8309ecf3d52da9c39643c3857bd0d61b1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-732f569-1609806760086.tgz","fileCount":7,"integrity":"sha512-zI/oGlBqbSV+x2jxMhnzKIt+yUCMP84tLzKxzh1dD1cE1+6WXrf7RoSGzd+634iPO31BbuV9kHlC0E/Z8LHbyw==","signatures":[{"sig":"MEYCIQCzTAtTcM6qJXcOvuEzKTo1gBBHu1Ac5tKuXrjH4y6tEQIhANOa3cuAVLyyHhPUtGhtAHLxboHbIQY5qMTiLjcn7YR3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf87PgCRA9TVsSAnZWagAAwmkP/11CjnAyvFhH7sjPkBCJ\nuQqVltHmec3YU2nd7fJvAWoGxbdET9CJbTFSKLDhuOjidGt7ja6mG87t2pVv\new7wn8OT5l19GBNl6M2l7KIrQmDu9kDqMUdMNtImWRULsp1BbYIEF97eoKGq\nr30TLVC1/mmz5+FGCVmoU6TUAmiUS7VlfZyvfZs4vFJGdIQMFzHl+cRwyMW6\nHuVFY1Zf1ePfNtF6csip6DMkfGM+7CL+SUybk71LGgv4nu1VEOVqk+W9fo3P\nBm+2pUDnelh6hq3RD/692Ko9SezHzaaQsRMGeg3WljVyEHlzZmlx3vJYd79M\nsuBpLUFMBPUS3IWImLQ5BBCkc+S7LCyNXoBsMOOLL+34S6nD3wPU1sEz6ERj\nlyNz2MMQsooIBVzNL4jpUjMmDEOqvWmcL0Lx+XkaTJGZ4vQ/r7ou0XJulkQo\ns54S4sq+nY3t/pye4pwG/ZzT1vzhLqbwzPdGcR/JwfAfEp+oEXz7TFWfO4AI\n3bE/J1FGEQ8ocoeZ5ajt059GyUEe0uFdmE5fJmu+sDmCM/hcPeV+Oyvqvr2U\niEpotwOyCzN8PqSgq/Fmerd6rNnVc3TMy4mn1IeGWgK2GbXqpeu0zibGSp6e\nhV40AUSsjB8fdYSAqOaOHGvvEegUGaa97F1eJINu4kJ27KhND00NC+yYvJqn\nkqkU\r\n=s0CF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.12","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-732f569-1609806760086_1609806815687_0.27109936765320564","host":"s3://npm-registry-packages"}},"1.0.0-canary-570fdb6-1609854267160":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-570fdb6-1609854267160","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-570fdb6-1609854267160","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7f53512b339807190052c4c1c5f15faa39bfd681","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-570fdb6-1609854267160.tgz","fileCount":7,"integrity":"sha512-DijNTr/kqPSTKtz+pAfmG3MldZ7r26HCkywG+Be8WzDliUtzfMswrx8rH/clEvS9tXCIUA0hnKWRdpG2Oljtcw==","signatures":[{"sig":"MEYCIQDkFY0wK8T+nuKqohXRSpTMDzetQWcQwfs83nKLN2IfXAIhAL/dFCxbFG4kfG5bDO0gpH3u+2F/xZBOlVlH++k6OcKF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9G1qCRA9TVsSAnZWagAA6rwP/A2GDQje9nB4SYnEjo94\n1QQqKZMSNnmTW5H1Lj/tDKyy5AOedWh4HrP6UJuuhKpo4Dhz4uVju6+Tm24y\nXKTU2ANwRlt8eEvmdeRiTDJNAXhgKfSuzKG1WwgOcmSPdgUEdLQpV4OkjaMt\ni6JMZ1C3OrdAgz5jIsrqKOruQWvLoHY0XTcxdZNKk6pqCA9L9q94OUXqPHMv\nECgK817FaJxTTk8ZekKN6RPCpPwmrDwC3/wPqpODrDpM0xpkmWzMQGhfcww+\n9AdxNUmTV6QGSPjoEJM0TZCvbrRF5OHucdSRSj+j2Ufdtu2NslmgFOX/E7jN\nW9RP6o4pysayJc2SRuKWckbrK98tfAJEkEdtvfxsCcCSykdPZ/r11mffjdKq\nNOFIwByS6V8qWQELlSxiDb07N2ydITmve9U/fen0eWUrB259inT00R7nW/i2\nQTDZpPmRN5oiTR2YeFq7/MZNWP+w0NSxEaUws+wYyYnxPk0feQeisXNOoDkw\nD5MyzGoqAtDD1yNpLo/wI76waHf7Q9szQN2sLgnQlPHj1n9f3v869vdMF4iF\np20B3KA7O4Gq3ucIBoIV0B58ehf8w7N677P3Wkn6rDcYBuUxYISbNYZVvpA0\nT5vcuGBS1up5ny9sG3/5kDbKT91QvT9HNDKCVFY4JAJh1owcLbI+nFRA4Efe\nqYxK\r\n=l2Om\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-570fdb6-1609854267160_1609854314312_0.06979042816827885","host":"s3://npm-registry-packages"}},"1.0.0-canary-4bccb0c-1609888903687":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-4bccb0c-1609888903687","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-4bccb0c-1609888903687","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9767c63ae662af70a535671146a30ff013c62c6f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-4bccb0c-1609888903687.tgz","fileCount":7,"integrity":"sha512-auYWGyc5ECs0buZz3UuPZ728lGnLV2K9cbVuSsqIJgCUnEm36C8IVi1c+p4B5aMoxyaLtwDG1XZaLCk3klnWlQ==","signatures":[{"sig":"MEYCIQCSYWve21YsLXrT6uJyFhCRX1pio6TBDpKyNCAHxv7MIwIhAKCS4iKkYsHbntVRDmm7X4b8Y3GDmDHR1wCrqF4xwSXk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9PS0CRA9TVsSAnZWagAAP2EP/3LQ5PJBzG9NSajVaee8\nn07aOx1g8EbMBp9tPGzhDg9PV8auRWMIoomn1Wv9OPZUHaVgvWTSiv+JT6oE\nSLbrUgci5Du3i6pIUZ0OY+dgq3tLLrf0Bl1GGyC0fRqoa/E5LP7x5MjOTwEU\nAGhWmchPpoST6ozr2GAhQtCPei9kqMP+5cPx4fYKO8wrPyhe4GIWDPR3micx\nht+dgwLvf+FAwOqcRTSkYh1T4YVE2mHM9WhvedcfyJJmQvZ5tnt+yLhSUTaM\nrKiU5DuQ/24e7L1ziQOrUo7JH9hTfKf46Pq6EaI9ORRDCdc6PQjm6KyqVO/b\nzv7fBiyzec22HnpClnZo4iHClJGxKj9WcnRMIEqSEWogxgYQC8Gle0Z1VhlT\nHx5s4Xiq/ecGy3RLquQZ8MqjHimHPbCuTUKMoDxh3Ek8U7Y/5wjEgv7YA2Hb\ne0yyCjy9YClXes4TIsCxNYo3kZ/hl5DGGwkjDtvVdlN51aMJ4oehz3kV2Jrp\nj/U9/CAXv/Qu0GXT4VmENqXB60PFAkXTRcVShaUDknyV3KMuiDmQuUJT9a4F\nfOMYXIClOJaP/Cg/gVs9MRAFRstqb4Tm5CB1zxD/36Q10yMkae4w0cwE7Zmh\n4kExrnb379dnZwAZvenZaAAvjr0WWa1iarYEbxBjCludLusRDzRxy+mM8FMj\nA/BY\r\n=vIww\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-4bccb0c-1609888903687_1609888947879_0.7454471810633376","host":"s3://npm-registry-packages"}},"1.0.0-canary-b40630e-1609910531404":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b40630e-1609910531404","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b40630e-1609910531404","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3a379b69c2d58da364d375d7b85b4e3d2b315e28","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b40630e-1609910531404.tgz","fileCount":7,"integrity":"sha512-4xbeb7hb3TAuHuRuxIq/Agyl8NV7MdjE/9NZ/r7Cxm6Ap8Mre7mBIJZZahhW/9Kh34S6o2Pe1biR2HR4BWMulg==","signatures":[{"sig":"MEQCIERR6BxNoIQ2kFX8zi/X29gFD6FnrbQwhPVQE2BnooB9AiAGYjpXoFcGXT02ptAehOCjOw3CNagLWnbLX7ISUeL0LA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9Uk3CRA9TVsSAnZWagAA8/cP/0ib1oF9mzisbLLw+6Zr\ntR3IcnV986nkCqU0+1wn4pzLrpiq8k9fpxvRtkcu7wBSnOG18cC6SQEtW2MP\ngYxYgl5ZEZvIleBdkjrq+CTSBdIArGpNhK4j85dJ9/zoiZvOsap0kYQ9FZI4\nDvvIko03WA32vPCAkSpQ1oqZVmNxldNwI8zIUKlai1K7+VDTgovouHpbT/kv\ntdVktUQtNFqtRGs7wb6kVYDqghNFbjqABAmX8QwfVCC5CPtrVD2dYA3fLqaF\nwSy9U/yvxbFT7/MyBOsAsuyogoFD6yB4xQTyW1kEJyeO8X8t7wVVhxASrVxD\nJ3gdK74Ig9qBWbCqJSHGeL50gDYCasi7hBo1aREXVSIsNYgx2MBL1U+Yxm7w\ngy95Pitk4IgFqdbnVATYm2zdnHPT7Lbt2z2aK4nIqlXgKcAshI0zJFrOG/LO\nhgUH/DJ1f6+tyXxfvtgd6xBDXpymPekvnH/QGoxbPtLia9HNVVHHst2QXvQc\nGYHUHv2yGUCqwsMMx6eWaoV6UCjrIx1PrTrpGQU/otbq7OJv1OI5N5YBE6wa\nclCALuJDsz9O7UKr2gD23AhmswFSvkXLggi1hoBLGk43FdLtGdnNv6YKiI56\nei1RHRq4VRxEJIZrtGQYx1awDzzGqMvYVQXrXrwOl0MVtmUX5jPJ5rWNv5um\nbPax\r\n=Pkqg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.13","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b40630e-1609910531404_1609910582519_0.6353129230274883","host":"s3://npm-registry-packages"}},"1.0.0-canary-b40630e-1609910533619":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b40630e-1609910533619","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b40630e-1609910533619","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"91240b825fff12077f93d3a4bc86b3114739dda7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b40630e-1609910533619.tgz","fileCount":7,"integrity":"sha512-MdDBM+Qhu6+hA6+tmqxXSSxXzVbAFZ3rxNmi1dlOhps43FBekdpUwjKIj3sU+oLKKiD7ObW124YOZRemBvPl1Q==","signatures":[{"sig":"MEQCIDLc/puiVdhieyItSYm5aLe/TOtTv73CvBnqo9e4AL3aAiBbDlX7JhE517fONlmVw4X7VoXZl7V79ypF+FbPN9xFKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9Uk9CRA9TVsSAnZWagAAsdgP/1eZgSo3X3Nv6AsyszVE\ncpCY7/MJe5ZZ899H7+2Z8brt9nusBow/OVq5C1iDYe/EQkKz5pB1BtH7GXFJ\nZwt78t7KdvWs/0Vn+NNTIXFCwzQv/Q2qfH8MoAelCpFXGHRTtlsr95hjzIDH\n4Xaau9c3XIk6CmRXm8wuZnLofZcgUJj0LkcQuoTjqrWB02YbfiJqwY8qX7W2\nML925en/itb+5LAS7G1BQZr8cAULi2CM89Wpr3mfLEcmIjk2zJhzZ8CJNce5\nOIVNSdEQeVDvBtrV37oL2Cf/IIZqZqVzmoKgBjn+SxPBa3xpyw3V3n2V6dTK\nx0tZ2StHwA/Rrh34imQAoMM29Og5ySVYwuh3hcEdQfIoUTowiyHz5Ru8W7I6\n53Tvioel0WJ7jCaTAi+oNUrqv/lK8f3qmS6FHjzTtZNmT627TUNX9rGSR+4M\n5H1u9NBY5rK+cLnxHITvOEiAe/EiaoGrd7HHVx6odVARCIL6jkE8X2VnHknP\nCiMKLs1F88RxFssXuCr8ez0H/b7kVlP70gxFRdD9CN4AAh/ZTm3WcydcNQTR\ng0qPKWd+QaoLUbTcwzK6zS8XvpkMO448q/Dz3OcDy8MCQi3CZ7sCT34+ffPd\nZ0IRYSfeVtBoDTOX/yzxlE9PeHn4LyFAaa/JzCd4vECSAIDJ86WG/Rf+Ziad\nzQ2E\r\n=wteL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.16.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.13","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b40630e-1609910533619_1609910589474_0.8747651853627223","host":"s3://npm-registry-packages"}},"1.0.0-canary-004f0db-1609975105269":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-004f0db-1609975105269","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-004f0db-1609975105269","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"10cf1c18b06b65782871ef99b1a55de0bf0b1c46","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-004f0db-1609975105269.tgz","fileCount":7,"integrity":"sha512-ao3qGnP85PviQofZJwIlogWP9Q9Y0ByeaYvZGmyfZ8e1NJ3rc3foP/RAPEVxSdsslE+nDQITvdRaYuxPzsQU6Q==","signatures":[{"sig":"MEUCIDjIIUttUbgWr8d2bT9FaLeng7sCnbc6p1XLSvm7X7KBAiEA2bJGWN7R+gyR0I3aUb3r7Tkw36JzRFAXQJA3MdUjc5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9kVxCRA9TVsSAnZWagAAS2cP/1M60datwzf4GM5CEj15\nxjV6ahoJnX7N4A0mCYB1HAbpTVzDCa0kcsXk3cJOk7E0RYLnpVnPLA4Aa6+L\n82z396oEPZGDagom1LQl9StrBJx4V+nZ1sPlJIqz6TvV5bmAvcuS3sdGPXQ0\ntJP/kd8KKesTwwIwd+7ewdIms8XMNsB/EIoy/wXTywdr6EB142nk96Z1wkJv\nuWhBGUuEFv4/RIbZ4O6hsewfatFXIdz4JmD8qaeEI6/PfHdA9vXCwpxzUFQj\nKDd1EfW8KDVKiZx0t7TGBq7c7HwyePLGpwx+67HwqGMb1WyHWsv7F6nUO+36\nfUjqR1oH38IYRTzxOnIyo5DmJW5DIUq1QE0fuXQ9OvU0c3LkBfqy01cOfC64\nkc+us9Givj+KOz+xXoxi1jRyu5bvC2fHDKcI6+wlL/mvgA+guF9W6Fg2IqqK\n7LmXPKPDE9B2FW/oJwEMOU71EJ2h3zLT1LmmY2peTIt80zQ5qH1Gd8oFmD+A\nzmV0hwcESBz2eIs7Y6st+6WeZpkRl6t3AEx8fS6bVWA/bUGhUsFOQ00D7bC1\n4nXWUmQVEc/3UbFzaDfdFAQ3NLTrDXtjv6cJu93VexmWXG/HR11dqXveTsHw\n/ZqGf3keyIF7lUZoBFoxEiV6wAzFQDyZzJM/QQjqC6ZRA/RQ5PftfP8RTnT6\nQJF4\r\n=5/HK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-004f0db-1609975105269_1609975152601_0.7787186523401768","host":"s3://npm-registry-packages"}},"1.0.0-canary-53b6522-1609975279524":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-53b6522-1609975279524","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-53b6522-1609975279524","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5f49102715685415de394f043dabe67e83f39465","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-53b6522-1609975279524.tgz","fileCount":7,"integrity":"sha512-Dgr49MHFk1GdjUDdHNOF0n51ahI9Y5N9aGjErPXxIRBEsGb/dYGjtRe1MLqGqSaKX5SJA24txlMHdSVQokFd3A==","signatures":[{"sig":"MEUCIQDe8O78Xd6AwnTLyY+V2IUj22rjWEFvCh2yksF9aEm5dQIgUdLrL+F2wpo21R1BRehHieC2C4AHx11rpr9jQcKxMnI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9kYfCRA9TVsSAnZWagAAVJcP/ipQDogJA3kQRG8zKgha\nzn8jjJe+wS+IYKiL5MunauVInkXViShtYuAvYvSVw7pQ2R1mlRJGGce04IZ4\nBfuaxmK8+/o0LR3niLo1Y+3lrKp0bX/pFK7Mr6NJRml7gEOAZQAP0KNhXaI5\nbPytsdPNDVQVoKw9FZMTb870orQBicGUZBmc1z3E8Jn5JZtQTMSG9fBIbtCg\n5YrXP3/hzAMUrMg41i1yuXawzpLniL+44HCg9V7XsjmG5pnoN6GXaTfDwLAn\n/3LnmBfKIEqsws7P1nBgWPIjQmB957LU1tzof5edPqrLCzBknwlHIeeLhqgG\njalz7nduwQ5DodwtLov6yHnBhbdLjCeaW54smtblQfu7o22LyFFBTnN3D0vM\nNPtjoIoFFFRTxhaxJ7H1sYm8AN5hyNpeTHnl8+cmIKd2sL8tgJic1B5PeaRj\nUcmMD1PsEtY/EwcN7adNKgYhrz0gvqb8z3cIWR6CNSJvTQRVv9i+CeI80CGT\n0fxaaPqdIaXpRzuHMisW3Zj5PAZZYDovCmdxLzFqWu12RK6SwmlstG5Hk1gN\nHclxNx9jfnjxgiUBllq0huaDo/BfGxlmq8zkxXtS81BqAtdgEt0igXz9psOu\nDdvkYgdKBlSmRWSr0nGdd8n9hdE1gsE+U6S1D/EdYbNvPfAcZ0P5+TJSXFvg\nFB6U\r\n=V8ic\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-53b6522-1609975279524_1609975326495_0.7274133718386508","host":"s3://npm-registry-packages"}},"1.0.0-canary-8329033-1609991895410":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8329033-1609991895410","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8329033-1609991895410","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"000858a501db41fec11c55203a4a5513b5e1f061","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8329033-1609991895410.tgz","fileCount":7,"integrity":"sha512-AZmmWKO+iTLzXOZ0aQZ2kmEf04ZWyTeKrCBcm0T0QSG5VLJzDtxBUS11c5ZUDauXOHpkyZcXNyzIPKkrQlSfBg==","signatures":[{"sig":"MEQCIDvOTSJtLSj1iS0lzNT/o9Rqc2dpWUTJ4u9ccXyXbDNIAiAGsv3voV8WRe+nEvfg32Ljq7yYDz0apBoxtwHghZJwKQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9ocHCRA9TVsSAnZWagAAFRMP/jYiPhvMb73aTPctYdWR\neBn1dg8NB2+/0nCn71W2uNcf6wlvrET9lKRIa6gN3+lbZSIO+831fFtzNK+p\nEOx1Ew3MjUTmvHVda1GKgBkgqK7gZQ3QRWIJYJ+ap7WCoGQZL7Fz5Ti9KA29\ncV6m5AqA1S5rgFUX7nYoPEzVMwVr6zv/NceVzNpaTC8Oij+Scd+KW+FpPZY2\nWN2xwqdstznPy/q7KkPmYVmMigl+eYfw5/t6I6D1qoN3X+8bIjCQqBMZCkvT\ntWumi/h6c4pf1SRXeoNmyC3INpPQ69QOTSbh+z6fT14Yepu1mD0M21gQZx+x\nctP6odMMi/Xqd/HadweQKDM/0qm2pLnQ7lBb3EvwF8GxXTAYx7k1DrhRi3nZ\nTzgfLKtOLF9UBeGyP1ZVWRSUVAYQynNMgyRtXSY20NEaI5mfyn3Ml28JgaqI\nA93QteCe8E+h294FNwniabvSx8bbAftx9aBRnej+jUQzTF1FpBkSH38kwnHt\nw/VRWZER/CIXj/y5CL1V3dLXmIEZ/Csu7Et2SN+NQXCUapsJLiXbqNmJiT2h\nI6zW4YlEdBIOsxcxmi75fHxmVpG8y0y3Z/VgOKB34CbCk+bd2pr/QplHdeua\n0o/VVWvvTLwIHnDs62u8ODD4pS1Za956UkgIpOEp3+PplGrfcQryU9TWJFn4\nL/xj\r\n=17p5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^4.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8329033-1609991895410_1609991942989_0.8701473554299666","host":"s3://npm-registry-packages"}},"1.0.0-canary-2928128-1610061468253":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2928128-1610061468253","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2928128-1610061468253","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"43f523f2ce272a5706c06de9c0a176662fa75f2d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2928128-1610061468253.tgz","fileCount":7,"integrity":"sha512-/uuVI7GekWVbYFalRoapmSIVDtaCyNQsCbJFL6d6/n0Ol1unBtiAoSVtEt/bMxm1gclniCHN0KWrDm8iRMz4IA==","signatures":[{"sig":"MEUCICy7OrEARsAs6CMVll+GzfsqOno8XP0MLW9vH0Bhx/KxAiEAg+ysDaO2FIDmRF9gDrgIl5/ehShOYAbmgrLWS04oMRk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf95biCRA9TVsSAnZWagAAorEP/iyV0n8sSSviAJb2GEay\ncdbz7ja2Z6jz1YbAYL89O2D6QNicLK1LkeuNscCEYygRlE9BH7tSDEVVW//m\nAeOpqvfz6LIsHKDV3mss0otuzZS2978dd4vtsOMZ1nQgBXe7COghs2XmgcL8\n2yROdZwFp0UFPXeBGt7Akfn5JJX3umHjcyn7LcBt2ukJDxCU0GPf5jvGs+Hi\nDPx1A4J4j2D/BgtiUeMrQ1xdil7589RKAH7HTX5Ea9sRV/TCvuZYf6kUUfw6\n5toprhHlZbT53wlZSEF5qUnn+qtCTAcMnNWtQV8nlUw6ysOKAiS0SW0gXZbg\n9BifJeDPnC48AR8Kugnc2a9hUUagqscBmjXtFZ+n4hPnrF8br6URMgZGcDbH\n4JpAc3wYkLzyPbcubvuYKmlHPvrm0TKHvNN+S+3V9WYZyQD7iDRJNyLDjiEI\nAnUgMXBDIcI3cCbCpc405vwpBonva7Dj2lMjxiRISIVf7DbniT7rNQZAA6G2\nu9GQpksmMXZ+RG3cGbdZSoacTqk/m5S2AirL9xxlGWjOBBHfE+SxBUGvUbLU\noawj6fLkan546mzk8n7AqdV4f07PGdNWCTbaXk9/DUNswT0+omLxX5jiALzz\nszFUgKKIae5iNkM2f3Gix+qJbXMOctKbYmwfGELgONu20SJ0TM/vzUfxO2O4\np70g\r\n=wRGB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2928128-1610061468253_1610061538413_0.9873222266737098","host":"s3://npm-registry-packages"}},"1.0.0-canary-7c1570e-1610061514938":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-7c1570e-1610061514938","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-7c1570e-1610061514938","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"29175f7ae823a03dff8ae5fd9ae152b1a9037f49","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-7c1570e-1610061514938.tgz","fileCount":7,"integrity":"sha512-Jl6zq08a2QiZUAYj6k8/l+lfL31I+IoUFALXdcfS7HIvBmxzNUg8Mm/kCgBnHzRwoap7qnIqBU7PC00zSu5ocg==","signatures":[{"sig":"MEUCIQC0fP3OFo19CwIjzJjRrW/fofzDELk31TjRCmIAPLzwFwIgc6Eh0Fkr8YNrl+ukPqWzZIAWU4fRi7WsPAd93802i7Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf95cGCRA9TVsSAnZWagAAoQcQAIArP1ujzKt3nytLRXvp\n88uN+46HZ3WS/+qOIhUdLvGBg87RpZ5KSUrWOppaXRLvBGcMAKYR54wuUuTh\nMz+tPIX9LEO5geyi3P6NGQemDqKhMQMGqKu8e96ETjgxi7Yv6+M2AKNwIWLJ\nko9e8jDaCDRV9JTu2sYejIwOYDE2EFTTRQiQjQKZhj7HqbN5MEtSYuYjapyd\nBpXVFEa5DDUNuCHK2Ctx5pHxfZXa5E9pznT2l65KNXP2HRg7+JXZGiaVBoex\neER6qvD+kRuHB6iD9E3qFCu9RTAHDg+QAeKuRFXmHwmv2gGU67BnulEiPZRl\nCMRzzseicMc0OqiT/huArjGuplxIF7yqE28rNBUY/utB+0dhKp3Sb6LpTNkp\n1JAcBlmFMmHAZx3IS/hYteGu5pf2VVhKIyEK8zIOvBMSiU/CJ716woJCnuZQ\n8fH99Y7TaEbA7GcQV489UDVWRe39kVLyffkNuz3INlY9MkLg3gxg4MSoFyq6\nzPf1N3PQtfHhzIpAlfRQX8Wn8YJNIiM2WinQFm9piyKTOGhcyQm28lhSW2aR\nzOtTLijvoCjpBS1fURMXboM+CmZIfJbWXcFQbb3Lh4w1mwHQydYfflR281hW\naaiaPFpwdC2BRM3TLepUXCDJocLQph06koBAmaU0ijZ3XlHDjG84DvvjEh0l\nJan7\r\n=P2iU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-7c1570e-1610061514938_1610061573767_0.5503633829569949","host":"s3://npm-registry-packages"}},"1.0.0-canary-9102e2c-1610061559640":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9102e2c-1610061559640","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9102e2c-1610061559640","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b62a757a08e46eabdac795b9123956a0c3627573","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9102e2c-1610061559640.tgz","fileCount":7,"integrity":"sha512-eAVaxquA0lB90SvPIOouc9zQiGEBupYuBzg2sCIBRaJ8beuEMPzp6EXM/gUMf6yo71wHXyP0ZeAy3FQf4sYy8Q==","signatures":[{"sig":"MEUCIQDRriT8ydXrIY84S7Wv6D7YWWTkCImaRFtFkqllFm9PiAIgcEAGOidlmtL2hot6MM7IAB0x/h5e61ek1ODn/msdId4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf95ctCRA9TVsSAnZWagAAszQP/1zzexj7FmCY4HaeZaiX\nqMosRkW5oTV7zyS5kf0VPCNJn43dZXr5LD6B88RBk+RcHaK6/pE/CNfEiEJC\nXfLMPd7Ochn7RFCoz9bd9INgZ/+P/iU3By61RIbpUxDJmu0j0mMzDPrIBnW9\no5vFo3RmsO9CcSOzX3oy5VpW60TeOrxrgK+aXDZy3xHFnvdQOACiW6wHdYaf\nnRDUFf/8uQD8TuPlagU4j2s9xU0Vg/fKbF30AYCALTOVyYxF2w3v7z7w1m40\nf8IUGo1vilFarrFYg6ZKfZdEjbviUsr9n1Rq8sxLjDcS1VGT+DrMgkAB36Id\nIqH7GlEWnQOQAPJIbtbnOQ2MDg66cZ+xku9fYUdjRfdqVmVd2AV4ssSZ0YKB\npJxExP4rkJTH4t08uX+KkQsZ60FKlGNm6dGrvf3fpyullraz4H1/Qqwvc4tn\nQPd1X/bc+t5TMj8P0Qw17EGDpma7bR0+yi6B+/9FLlH7BxO8OY2GztwgpJnc\nXirNfYMZ6tkWoiyJ7hBlU1W14In2YfOv5gOGZdH7lsMhUJRG3/vHZmU1g1Jc\npgpc22QsrKdTmTmAwF6j+IBh1bVDZh8AbGkK/2w2H4eSAtRcyBCWAahvPO0n\nj3M3+sae+mmRvrmDCMK7hEbE0ADVA/qjgZz8J8djneAfQ7lM+UNZZ+2AWUHh\ns3dY\r\n=bwlv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.13","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9102e2c-1610061559640_1610061612916_0.7260285533586694","host":"s3://npm-registry-packages"}},"1.0.0-canary-c1f351f-1610061746486":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c1f351f-1610061746486","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c1f351f-1610061746486","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"96502b1a69a0cf8444e5c94323fca89909a5c6f3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c1f351f-1610061746486.tgz","fileCount":7,"integrity":"sha512-63utF/hTbwgrjC5/XoJoJwL7ladgS2EYZbCr53PxrNR/iulFRMlkPWGM0qqp1AsDMjam/RrOVzGHN+JNVZ9eRw==","signatures":[{"sig":"MEUCICtME5yYrFc8nMgfdU09utxwL0+eHokZRmT6veVj3hPQAiEA8XGkx+YuibXhiuuSiMCLboXUyZOxAtsNagoX8W9J1wY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf95flCRA9TVsSAnZWagAAf/EP/jKibgKug/onnHAJr1ID\n6J+Whhk/O7dKi9CLQ6LBv27pbviqbLtB6unXXbkEEJrb0qmH0NQaJaru5/l3\nKMNdh35Xu43gvG/mGG9eC3eu50csm3GCXCsD0QXI3fj/m37EFo+zw7GCAPFf\nrrrlaGW3V5rTXamaPJ9NcSmoZFa21w9A+sPMGLxtCter+w+v5CYciBfs6VQ+\nAiyRGvy/l0hCXdV/lkg28xzyWsEgRLA4xXjN1j+FClCdBShGE+UHrxbhmC3l\nIC4jEBpFLRmlsrFb4FFiW9ORM6KKv1Ro7TXh/1KNlQgbDjMPOvMaWPKVN4+K\n+/lgnpcxGrVgPYVmSHObqDVhNeWLJYN1f8qdjJTOmLs+/IX3bOSahB9+kZY5\nnzOczS/9LZtvBmwKc4n9VpNT+hTHqLWngLofxQKoy1k3q5eH4XlHLP7/kUdv\nfyn06H/X9HnaHq7ezwVjxD4BRNCS0ZZ1RTx/67IS1zNoI7W0NYSKgEtv6IWf\nWP+vqbjR1kyxCiBlnpDJZkhFzYoj45QJTmx8//AsuP5jhwyMXTVDWHN0Og6q\n9r5Sk5inlECtexdwr8wgDOjWzayScIFLgpWT7JdFWQd23Pj3M/G8Y6+sNwr4\nqp64sFnfqmlLyKQ1qTjoiUkCV9ngRukdGll1Y0FqBL37FO4AD8YucYHtLELj\nlq2x\r\n=QIIT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c1f351f-1610061746486_1610061796658_0.6265868701256172","host":"s3://npm-registry-packages"}},"1.0.0-canary-46c80ee-1610223969730":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-46c80ee-1610223969730","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-46c80ee-1610223969730","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ed6dbca4c0d861fd09045905286e4cf7c3adade7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-46c80ee-1610223969730.tgz","fileCount":7,"integrity":"sha512-IVx5fX7E63P0P6573SjjNtsgOf9nAuqCujAyUGtAlc8+Tuol/FmLJ8ioezpEId4zEbyFavT0ZWsGzziiiXEOpA==","signatures":[{"sig":"MEYCIQDRtfxQwt6+lK2RPkzvv/xB2ws+thXpuRH3owXWz82zPAIhAMkFj7HFhPgX4bsBVPCAKtFJZTtoY99yectXlmSjNCc+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+hGXCRA9TVsSAnZWagAAljsP/3VyUiz0kuy1oerTQnEb\nGIp+CnWIA9CxYRzhCVWaI7wDwM5ZqhRi0/tkNqZlu25q2cl08f/X9/lzFfCY\nOxCbSGoZC9fSkMZY/LWbYnis/qWE7QUYya2k+/bu79D9Jm6Mp1awgOOEBVg4\nmPn/ie513NJ4qsn4iR6234f2wDps2o6xO0ZeeA8uVYOZ4uKvGBLmSYKL8dki\nYHFSEBzkt2iDpvJc+OYSnLLnyFA2Nj+QeMNHTbX5Xo6yjxfJlY0tIQ7OQ2Qn\nYboZvlt6NQEe6IrwjbzTSSZYKt1x9V2aHfjjj6z+demm0dOSAZ55Cw1Wtix0\nrPxco480Ao+HEWqjKuQCTh6aMfd/Fo3kroT7QZJZAxO6kwO4t2yT5HPu7QfD\n58OUY6g/knE/rtE87tbGOuPUH2NeMR1D66EjibbmKoEIH7lUcs+xuzQVs1QV\nWudwrNcF7nWMUX6dHTA4QjLL6Yhtg6NiPDEfjRbZONgt4GdQApfQQsZ07HYG\nhpl2OSvS6JQLurcCWeBzegKECcjXcmctfnj9v4Vr6A+nPd/tiqvsIDBQKAcU\nONcP00wVESfHn0PQtahk9vKyI5tStlwW6f3MtFpbMB6A/Mkn2pKe2lMYySax\n8CVb6+Zq0pcIlxwJpuv05Ey3/X17y2NKkLTw6KUcSKQiRxt4etJlLrZQ/5h6\nUq6e\r\n=IqEz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-46c80ee-1610223969730_1610224023060_0.21528710752009728","host":"s3://npm-registry-packages"}},"1.0.0-canary-db524fb-1610320476073":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-db524fb-1610320476073","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-db524fb-1610320476073","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fbb4d4996024b82d85762a471e2bfbb0eb996ab6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-db524fb-1610320476073.tgz","fileCount":7,"integrity":"sha512-nkWVIRYB5yX5/wJicQqrR/TIVnJx7TyEHwsfKC6h3cKoXbAq5hOVWyW/F+JJ+E6Go1egt3dXPRKzP4pZDeU+yA==","signatures":[{"sig":"MEUCIQDRAWU7k2PL0+gh+0wvcvDciQZpUhggdwhWIT70gHfWZAIgAIK/ZfbBLCFrQ4cXVsM80/ap2/B3kbIRVSHo6mm1fS8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+4qPCRA9TVsSAnZWagAAiPcP/3yJWZRBRL8icPKwAz6U\nhSL1/4gtIlaeNBZD50v5rO9PIPia9EapXkCbiJm1VFSG11Isq+PfJDCoATVa\nu5V7gwQCFZCt87S1XhSo42J00FZLR4ioXYZilmK9xdBP7P+k2MVHfOa2wwfw\ngY1L7ys4Yp7RWet8doC2XuPomGZbTERpkkI5cYSX8UzAK00nIqBt/GwcVlv5\n/BatFFt2QLD8GLzCXiEBOG3MVI65BrjbZV0DV0owfhZPE2QOCQYwLhNLJmCN\nhuZoroQYbKQlPI4tqF0cnxl0Yr7uh9s0M85FiWVKvgktKkJluncIhyUfFNLT\nyvZYxDQ+f1Q/ZdtgdJwvJyG7DDnVWzwZ56Nb71/uex/hYFIxEJtm5s4YLSGe\nRZqLrCRbY5rsWsXTsjSUuwu3dLYGhnVgy/N/tnY0sdCyM19zddiyLWgkesj6\nb0VokjrMrmfkOLiyVJDVt5CQtVdBkVDsuXSfdVIY/8sya7stPE7SuwnRP1kP\nHVcci/H6Hw6lI9Kr9pA/91PbTh1LTd+OjkRwl5NL6c6EIYD9iS/b3pahmCyH\niMcrUSxz03Oi/A06koFrR4mHVT8RMoaYxAsjas3BB7/jmV4crzBMqtE/39Pr\nhq8j7hQqlOqooeXyDKxokZRkyJIarLr/mUEaHaA3V+qAtvFz9zF+oHcwKIeh\nFjIq\r\n=+86Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-db524fb-1610320476073_1610320526754_0.09440156187631388","host":"s3://npm-registry-packages"}},"1.0.0-canary-4601cf6-1610320521129":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-4601cf6-1610320521129","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-4601cf6-1610320521129","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1aefd1d3031a74469e45e338cd308179302ebe7b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-4601cf6-1610320521129.tgz","fileCount":7,"integrity":"sha512-J7vZ/nfVxek19ABHMLoOmUvepk0oReladk+edLuEmb0dQoBpenbjoEQqub9FukP6AKAu9KCqVRTfGmhqu4REkg==","signatures":[{"sig":"MEYCIQCLsCB+P8pqtBkV4LZulMJKbK0migLSFn/nC6zokQ1SpgIhAJIfCC3XPlmc2p+mQ8lsjS7AQaOVUlRw3tfkMphjEmrf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+4q5CRA9TVsSAnZWagAAAnwP+QCKmVdZrGCjnFqW/PuW\nocVb7XMS5uukxNVFM2H9hm7AkmARa1rrc2T4dRWBsnU3fKxhMn630JXgvdHM\npm+NujoelTwFENhbN/6HpcH+0N6d5Y+YssJMVkrVumAiZ7leRbtaxw0hXR1T\nzc3OFt0IsXt1Ccz/h336qSY4F9PSVnCCzx4/pDWl4kaVJsCgyvhkethCaOLz\nHs8+JweU70N8RobpOI4OdUSX/4d6me6fQbVqSsTacqJo/RGLCFcSwO9Wt0MX\n6nMbK1m+ZKF1eYyOAJqej/sRX1tijYrUL4ZY4OQcjW8p+oT2l5OUsME6mwuc\nXFtF0I1VblOp2TLXl2uVKdlmQbLib1+VhrtEMgDE2EMsXqENnE61mK4zWdAs\n+l7zUpYKxZ4XFzkcJDiqwNwQSV8rIdOE3FA6iTGioLmfdvKpTSUOmIC3cthP\nzSGDSETyss2BfXAYcU1yC7olVOcrNcmXfWvDMwB16KvzwyWT4R6uvFynRxRI\noBWi45Gd2xvnko9u+bUogA83GSJebkEJvyk7ojMHWfWifiKuuX5/8e7dsUxk\n4iFcr346wLHaiss8EAqz1qUFmlpSXF+D1tqS1eeh/gRma6ujWE8pnw5EAHay\n9RMgVorftIHbZz/wAUpcgI3FT4bixV3Jrb7Ty9hKQqar2MGpzf6+V4yqVsoB\npSB0\r\n=/tTg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-4601cf6-1610320521129_1610320568709_0.2322872509567091","host":"s3://npm-registry-packages"}},"1.0.0-canary-048f0e7-1610320577619":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-048f0e7-1610320577619","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-048f0e7-1610320577619","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2635919343e554f5cee9fe48e9122874457f971e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-048f0e7-1610320577619.tgz","fileCount":7,"integrity":"sha512-15iB1u0wbX2mtl12690DQfy1O7HEzn/lcgFHDRUBmGmPRVRLrhsnsnV0jvXZIrmK4XYSfv0kHM54wdncnSsRDg==","signatures":[{"sig":"MEUCIFZQhRLTL6Yo6dgja0opjLmBhUr21P7fiXHwlQ3Sb5kGAiEA5t5MMKXtkvfQ3hC6NXV8l7BygwsoBH//WIENIb202JY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+4r4CRA9TVsSAnZWagAA5ZAP/jZt+gRKvICV/lxKIstB\nKKsTGBBQ8BZ45Q4GLPVImXMEtU1oAunjkqUbdKGhVhciD8E1DM8a61wkkxou\na98PDroM0NS29SADYXND+WdSxRagsRmCYZYsyWOZF6L5I4JMerE3oQYNMTYC\n3JJtCVtxZd/RxriZ++i3sudSSjNKbMynWfPscXHb1fbP0S5/MRgwZs0KATsA\nIPEQ/RwTXOapIW5s79Fahmq3Us09Je/EhNUSAlFBAvIW8+7tRFKmEFY/wc+R\nk/W2XePqJg4xSrIAmFOM7awbW2ZoglaA8HW4snVbZ96eihDaFlo02W+Nqhgc\ngZPp8trreEk2y4UJ1EJak7KXtZQGBau/ypqgZ9VFUtBSnhMv0wfp4rjJE5H9\nj7Vma7yeV2kTeqj0FL37LYDqlwk/Pj+ItSlpdibWzgk6uH4/oEqyANzqNgf/\nEnc1P3wCeDFAbUBMmIlbDC5OZ04GySu46zxvzJ0gO257XQ61u79uyJtzXeRm\njNOj7zCC3ahzcbmNl8cWQOOLrZ7F3PpItTDGenGVpZCUn2Um3Nx+azndnOMR\nURuqdZT9KKXObqDG4O3nXeuU0mt+g4v2W1iyHm7AxD3aa+OffiOcbAYOhE2j\nls6WHtGGoQWyHJOr7j5Tjwznws7Ly711WjEx8/dtKtSJhZtqN5HPc70T0aWV\nSPgM\r\n=QOm4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^4.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-048f0e7-1610320577619_1610320631996_0.6955199817264626","host":"s3://npm-registry-packages"}},"1.0.0-canary-6e7de51-1610320592530":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-6e7de51-1610320592530","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-6e7de51-1610320592530","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f93c987ee96e7740a2cb92aa74d80f685c0b699a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-6e7de51-1610320592530.tgz","fileCount":7,"integrity":"sha512-h84MLdBhlbpnOAwv5WB/YCEb2rmCDiC6rR/CsEmBgGgB/r6bjM4xu/ccjpBkz0M4OcS7WbVZtc0OyBDpVrEe7w==","signatures":[{"sig":"MEUCIBRadyp7trs8CCV9i1sXmskqs1RWB7xEzSYquJiMDMdzAiEAuwWw6aEKw/czKf3qeuyPuyrxOwHPOD3HeDTS15lM05Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+4sGCRA9TVsSAnZWagAAfAkQAJMCvQat7PhdsCSIjDfs\n0+ChhKlU5VH26gqGdWQXWt8Jbgqqy6rMPNZl2NxH4IJ52ZlTEEo2d78G47mf\nVReej5Fn+xjCUAWh1kOqtaZV3m1s+UAzcLhzsQUdEMfhZjuxL0w66S05pGWr\n/GbwN9CmiYbAbfFDpy/fx+iafFt1vw1/OZYPwnsB8t3ErUJ/gNZW0qG0/0Lf\nDX3PpV8wKyek5/lNINxXmNES4cSpEFNgsAK2gW0tWI06zO4NIJlAQfe0kX/A\nIG7lEK2WMEq5HRiVO1WBteWFHebWFQ5yyfI+JIJhubeRp/bncWCw6ZLQikeg\nZVFR4eBdiUZnRXOvNh3St0oG7Gwt41wsQgYNdSwSUL99mSoIF9Ibr6nntlKb\nv0ggiUNqCdCN5A1HnLmDxRZAAkSPVNVRLkDR/sr2tbU9jKkdNqXHRJQQbuRT\nA03WzwaCYAe45ZLQ8HTREZJ4r5B0bw2TU0w6+mf0gsiqVK/cPb1qL6oO87zY\ngPEBoPpM35xGsp8WlDpRpmyOvzbH0pSRBAcw2RB4pN4YVGHOfRCCWZKqy6tK\nVKdjbZPqGyKQsy4ngPthrEu0cT/1voegg7hwYY6dJiLeVNBb07A7Zxuefy6t\npMe/X+UjfwkG8bLQarHk0C3N0NiqFADwLx18Z6V7USlbwShQ5ek+/ZocPKjr\nP59X\r\n=H1kL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-6e7de51-1610320592530_1610320645955_0.05714120966772618","host":"s3://npm-registry-packages"}},"1.0.0-canary-9207c75-1610406979579":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9207c75-1610406979579","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9207c75-1610406979579","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fc50533b9167576d7b5f6bd3a519ad86f4bab853","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9207c75-1610406979579.tgz","fileCount":7,"integrity":"sha512-iS9CZk/cb2+9mJgtWFM8Zpb/KoqPgOQOWSx3gmadxzfsHf0ft4JcC0er0C9P4zspPUQwbwqVrj8Lc54yUsl3pA==","signatures":[{"sig":"MEQCIEmZDZnx959G+oFFtdL6ixaT7y2+km2pddKQPyrKBInfAiAM1yHMC4JOLsbVOwnstW7sRP5ib9QxmeQ4oCTw61EnWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/Nx5CRA9TVsSAnZWagAAyLAP/2RvFZuoPeoI9XWYWHry\ntyqOFGjKF8j/bSWD0Gn+Jq6myN4WNPUIW6oVod4mrOpP9rlSROvw6MRKIaGR\nKhHOHtbJQHM7UEqUWTMjDmq8hJ6dG6poOTO9MP5PKscnPzsBMd+YOfyYXgXk\nPe8Cb2TLYBpy7N8FqU94I3tqn7SBDY2em4dgelMRhf8J5e7CU0RRQcDxIz6L\n8p28YLBauzz8wO6P/ILgpV04/L5TxDafBqxuYhWrhJ5VgbTyhHchmge2MEfp\nQfum0aSmq4Vzq+EjHNu/XlwfC3eGyI0gzx+/zduxoDm9EjX7FpqKNK6qahbw\nPAhpmvpdoeSOx0/Fbb4obUebiQX2/L6zbTLilDW0gze6d/MXydyuciNn1ndr\nwFxGSoF/zopAufACisrq4C1CRJEkM36pJTYC1TX0JhnfIGVHvqrnd8wokkXC\neFtEzEiqlkWEqzYo8ucwYTGxGUs9NEcMJthrErgNMkZpGizZeXL1HL+XbV9f\npJcZihuKMhuLXmAz0STW577SQSrcIciG9SkTjZeF0AzmlfF1Bcwtx+hJMPXi\nlQdoosYAXhsUiScd1Vnq0eylsiELKj48JTGCk8eucQo+a9gXJah16u+flVQx\nWdxslBPFTGVw11Cts6jAe3NfVZTDby6jzYXof6SRr36Dg/uuR6C/dZxGw+xm\nrYnK\r\n=Qouu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9207c75-1610406979579_1610407033400_0.7796923625876893","host":"s3://npm-registry-packages"}},"1.0.0-canary-92de13f-1610406985968":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-92de13f-1610406985968","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-92de13f-1610406985968","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7ebb1f5a2f427b0d1c112f27b4945f6b4302dae1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-92de13f-1610406985968.tgz","fileCount":7,"integrity":"sha512-biyF+NXCmW7ld6KPgiomO59VcXnt8Cjbo+BY1Qn1VZGWAGi2eIOGVB+rK7QcCqboDbQJSnsneYdc9js95/zamA==","signatures":[{"sig":"MEUCIQC03+H4VehsB2NwW924WyxSBZl5aXk4LMrBgrrUdxTjAAIgNyttQf2L6TQU49NgBFZ5F+etJb14bsasEACCScyLsAM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/NyFCRA9TVsSAnZWagAAQuQP/R0ohiMN489YKb21WMdr\njJ6aHrAi4WlvdqwZx2ujptza1+/gg/Mf3gqXrX5nzg1Xcq8iF2YWpFxN70DN\nWwk+90jKvnAUYm8LKwxFkqyiaFJUSv2nyeTlC8BwogJVQJusr7g3GC7oJlv0\nZIIiA2VS65bKl13Re21OIbjXe4EBn0NBeVae8FB1NlPBKM+a7rOVR5XZ0e7g\np8cTqvwyGqqDF3wy5/6ISJjV1EeBn8VgfC+423YMUPjjGpKXUR9HIQi5x71U\nXHE7hU2p/AwhJ2myifKiwAAtXsiAe9352FI93umIoc/voj/XiyobwutQhwDv\n/4em3/abZZITrGDCGB9hgoQzlT5bcfi1Sn2sCAEydKPuT1Jy7e3fxe9Pzrje\ndBBJ6T8tx6VhzwXe+ChilKRkh1aHx22TLSnsS4Y1XW26zgvVa9LFo8zJY/Hv\n80yqH4w7DZyn9Hy9KKH1K00CAlWhVfqaEOQ44iCwsQUe54dnv43jkjFJeaHL\nfMApQhtdBga2iDPTvlpVdZhhX4bYbaGrzdo1jvW0ipm/xJ/fKWj1VVOqYEVf\n4WbMRvAFhBSCFh942PaoQiJyXnxWwFyzFk4/WQk+Xy8oMkqVWw7PDHmlKL7L\nd2G5HVhLUsNJaHXPr40z5kFNlUfXlc/Gen0PLM8pl2/LNRSLLacTaKEJTpoo\nvX47\r\n=DCfm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^4.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-92de13f-1610406985968_1610407044471_0.06950274734721362","host":"s3://npm-registry-packages"}},"1.0.0-canary-e7e71be-1610407103851":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-e7e71be-1610407103851","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-e7e71be-1610407103851","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d1fab2282d1147310506bb552d230a2364da9b53","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-e7e71be-1610407103851.tgz","fileCount":7,"integrity":"sha512-sL5xISGBaIrH2wKCjNyk62oxkbV62BhKwYjV3ZaumEWUaeCkbf3x9bdKO7zbl4e5ca3iflOd3PUxGHmt+xEhoA==","signatures":[{"sig":"MEUCIHfMhPykfv9KiQdcJcwyClMoekwRMqAwl30ljAgyYKhVAiEA4igBQJmONC9ilOIr8einL14DtNQx7+0xWHhltQuBwR0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/NzyCRA9TVsSAnZWagAAKYkQAIYCpIFIbqmz/Wi9qgDQ\ndp+clEgfP1myhcuUnr0AvslkOw8iGiihMu/SWhhKP1q8QLEtV4MPRVUAzC73\n7OJdf/zCyEyyok5zmMLlx10SHt7x+KVJJnW9jQYDHsWMXwoomR3pZkplqInb\n0+3TDyjefRQirdhmO2rPvX+hjIVJi41S9cAJlul37Z/uuYnhDHP7dG689eez\niBqEjpuKzVwsa3gw4zse6iGmhDBztaJ39SYuhvgZdKT+cfe+KbRgNR3fi79V\n+jcgthCak+IcVItSN6Lw0YsAgoEQQo8vsF4zvMUtoibiVTbHzGnPkhhmV8f4\niy//8VPOaSRRKZfP/ZjO2VNIYKQSn9nzjVRZDhc1MZQZXfUahsGff0aqhFSj\nBw4GPfdyDIdl4bqR6QwlrD+goUkk1aYGUq+GI7hSyIBIsEMJbLJatlqhUz0/\nGNbqqGre4NBzWgPCJEs2xAxiye+/auMEkAZR/sI7ZRZhnB9bzWgx8tGJ81xx\nwudxA/QVNz/6wawRDVnszPFyk9B3R13L6Sv/hpb5Tgi8q7d++nAgSSBnTDao\nwhqBTYOsCeU2CZd7m8uU4+kpPpuAbOF1zLn1GodTtTL2AstRj+E003dCgV+x\n29s2PJYGKLsRG4n5yFPa3iAlAjmbh2vGUOU5BYmZJaX8S+mWgm91MBHtJnOy\nixGe\r\n=VPcl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-e7e71be-1610407103851_1610407154076_0.7933135308374635","host":"s3://npm-registry-packages"}},"1.0.0-canary-20c4445-1610444372008":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-20c4445-1610444372008","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-20c4445-1610444372008","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2baf5290bf7da71fd2993055139af1e76840b0d8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-20c4445-1610444372008.tgz","fileCount":7,"integrity":"sha512-SwOJvsXpfkDKOMelyahtp28OVbX6ba/+I0XHtpeY2W0HxjrSFZ6EsSnw+m0XzZXY42/HqfWB0R5E5UdxqMQdBw==","signatures":[{"sig":"MEUCIQCBrZy5VaE5R6BQbyfPAD8rQpapZ6CZtHBMq0fSsXGVRgIgAb6c4ZgHVUgUWXqzNSYHZj8n8EoRG3FFLEJGQC4KYwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/W6GCRA9TVsSAnZWagAA1DkP/1odx9V+6UgfNEi10Xv/\nigPS3HejgCUIwBqhYBJ5ucjroEnss24gSyket9yFW25HoX+3etSsBdfxMJlM\nL50pNo1xOofpZZrUTUwr7u/3akAUJviaFW9b2jxdHSjCERwct25Xny8P49+Q\nRqhuKiZmZAQPZTbpYl5xAOTDJGTybTdu4TQgjvCsoO6eA9l9Cun7Ciq9e+bK\noX8JOnpouaZFGefX9DtKQloq6n1mIv1UCHQ1ZlX3SdtYc0CeL1B+gTfJ5TMT\nnkjM6jaomWBsNjC5TyNFVu0S99ctYH3UDZhmuSXzo73+oKvc6fntucZ+GwUP\nzI8yp8zW77DBjJqVvUo6N5X0IiAuMLP5bR2ua44Cy2eT2RVMVzwn3T1im8YZ\nDAge7AAzHM+TqA/NL5C2eaQws14Mz/7yNMKA6YvaAsKmyjUYrFIZ7slFE2ZX\nttOTxFvC+Quod4ur8j3e/jGE5jBJnlnHn9ydjUWaSMLsKG2p1NmuRFdg6V1z\noBO6xQ4PAKySCagOfFZON7JI0dBSJgsxqwXLclLMPMuKULMjyBDg0s5LxPAU\nSFnw0vy7D/n2R5UvWjVESc3c3X2bh/mUF2fDnEEfpdRFV5qLouo4cwj7GPcJ\nLLtBtI5+EZs2xvjippwHRg+Xg0YJFrMjkAQpMhwtsYGY2N5aITUSFleXFz/Y\n5oft\r\n=I12m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-20c4445-1610444372008_1610444421638_0.36996005606602433","host":"s3://npm-registry-packages"}},"1.0.0-canary-2dca6a9-1610444441721":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2dca6a9-1610444441721","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2dca6a9-1610444441721","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"979f7129511652a5153a9a00fd9b3f5f4d682803","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2dca6a9-1610444441721.tgz","fileCount":7,"integrity":"sha512-S0noLgwlRmpOQQLzkO5RUC73DZ+srLyJyD4y8qtSNldDwzsHNiGBAjF7EUWofq1Kh5+FLEmGAhrkTFowTYQq+g==","signatures":[{"sig":"MEUCICY6Nak8RKg/g2S/nWWomcWm9JSFygsMTiIXjX3hGozQAiEA5D4uxO3o0+irUu/XDb9y8w/HbQHAr4L1SIwHTcRRWrU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/W7LCRA9TVsSAnZWagAA+W8QAJDy/WqtvQXHi7iV5dnC\nSjBtElry/f/c9hX0up6bKMUsgTIJCQ7fkPumOlVY5KeWtskEolQ382azPEL+\nKsAMLQMdWaFYAk32l9xaj2zq8yP2Ww5ilB0zqRJ/v9+nd+qugi+ZGfVvfSaI\n6YmTOjPdNXKkNDnHQzUoqeudrrjo/l4vz647LHOBFFBFLRxDRqx+ozvSA28b\nXqbeKIGzg4HsrSyA4ZacQQx8PqfqCuHe0eIJ6IoT87ZheYfzfI6jsTvU4X7J\n90kY1zMO8Z9vAMLsgftogrLdkgMBSkVzPf8LkgLKzG8XSbfzWXAbJk+W5NQf\nn3HTY11ZB3IDXGTyMUeKvKSue67BxL3Wo3UdaLzB2vBY9qjusCzloOOcNXwV\nbfCqLPfHa85rx7vBIqLCD9GAdyl4QGILdhS4Q4Pu7SPea3ielWpjh97tS3Hd\nzzfUDdsj3hqUs13b5aVFlCNphtjlqrnypHmr+bB1rIddpJTZvfFSPFNW4vGs\nwQzZs7fWvhPY3R8UA9YvIjszuaQEXtjfCBxJdIoFSyhyn0byuq96CxTMhVMm\nxhtU9K83ZTk3b9esavFTD9rhHR7BpyUcILxcZHv+blw0+H4yWvmap0nfHaqg\nwmfDeohRGJYKK5j1qQIXr0IGd0cPXbJ5pJEcjS9vRKF7VIEF1HequbBG19Fh\niHUh\r\n=HxYj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2dca6a9-1610444441721_1610444491018_0.7961483809395651","host":"s3://npm-registry-packages"}},"1.0.0-canary-f327627-1610444611341":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f327627-1610444611341","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f327627-1610444611341","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a9c9f9cff086cbf885a7b7a4980c31ddce322acc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f327627-1610444611341.tgz","fileCount":7,"integrity":"sha512-wHRwfi7S9xtlru5xqGSt0PSPqTDcyXXRUSyW5FHL/pZVZCgCdgawC+LUZYC7Eg82hrYkuwpyJCemU0Gpl9RRUA==","signatures":[{"sig":"MEUCIFvb9nFlJ3NkrUBgxhh92ST84TgXAV3t8Dl9I2o7EalfAiEAkgs9y8uWd010VSU2xGL95O3FCJi2AMnRLdahPaVXlgY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/W91CRA9TVsSAnZWagAAdpoP+wZ5+AcCgvgjzb+LegYW\n6/QIwXb+TgzbatKQpMF4NeviSnGbO+mDeSzt8HJjYnmurscQeQZd9xI5sY85\nL23KdTP7aC6+YOdYmzzxQnmEt0OzsEWSdBsFRRZRxkaIFrPQ7pqggg4xQX+/\ntkPy/q6fQtep0s/u7b/gWZXX/1HIN931p995VpQLW5Xzp9KjsbBUvyUhh4sy\nMrji0g4+o3albuyqOGG+zutP4RRZNiElCKCJEGbjgcA13NJDF69/Yf1OGIpL\n++bOAjVTnXzLtOGzeAx4/aob4Q1lIwB5Gr8v7DUXbk0aSJGkpprBlPWpwqNj\nYGe6+OI+jdHuGh9ywJ03wgpRnOCI3xMtQA7bndl319281qlRDph102LZxILZ\nEpXHzeTpxhjIRmwbCTLlBWcL3u43wxB7a08su7hlPDtqKWn9xUdre2sZzy86\nvtaLFKwTtp4kLD3sjoOm1ObA7Ggz1V7uqzmxBFXCpamD3/NcwSFhD0MEhdxN\nyYaZCyKNQ7X59UAxDpzD1WKTYhsXAFTOUIm+qmV3qyD5ge7wpmMjbUVEtwyr\nM3eDTV5m6xBhhlmaNMC4Ip8osGvVegTir0H0UF/440u2uGDHo8VOD/pLYEBt\ntqSBVD8yvylkba8GPQ/FMA2UJ3LLqeYKCaEv2gfPTQbi3KHwbglEiWgk1wie\nktLX\r\n=fjzE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f327627-1610444611341_1610444661116_0.8947903792331364","host":"s3://npm-registry-packages"}},"1.0.0-canary-7fd5a7d-1610444678023":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-7fd5a7d-1610444678023","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-7fd5a7d-1610444678023","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"07e16fddb8e45e0e6e0012d5ed2d555c14103077","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-7fd5a7d-1610444678023.tgz","fileCount":7,"integrity":"sha512-8bZvevPhgQT/FdN6bMnhzBzPMqid/E8D1urErUtiiT5krK3IPNdx4GtGfGA99dLKBtw+2DW8ZhWvNG23jgbsMA==","signatures":[{"sig":"MEYCIQCMd/xLw/jDRnwMCQVIPegoXMBJxfpY8/TbOkOG62aU8AIhAON3Uch782V6psD5hF4P6ai95S8dszyqCu0cCR0W9tMK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/W+2CRA9TVsSAnZWagAAe/gP/Rn/0KkUOZMiDWoDPMkV\nOv2uK9o8+9sXNqMQ7MoLFnfucrNmiMpgiYP7MZ21ivkUIthro6F9mWIDKaYk\nF0Wwp2bcs96zh/I0/mhsDzdb2y0SavU+o4IUTP/uOOW/V5KEEs56EJxBiSxp\nGakeEp909KJmnngLa+Z+M/YHZKWw5FhOJWMW1hnAt7zXvlS7G7a+NYT8/OYe\nG60ix7dRl1sRlTBokwNpdr2/xOg0FNjFAuIAZxVF6UMAXMziiSZbi0Fkpwt2\n6siVAP7ExU7Jgs6Ko4TFZCRw/H2Q8JSLDRFwAH+vWRpDVAcii4npKVM3jJ+o\nKgYBMw8K4zwDE0J3KJ3h8iDSVKovTTr5nq1ehGx2kexUaSJn50WeLv+3fn2N\nLsHM45jDm4MVjkCh1ZyZFpzkaOABmapURIdBeOCyYIslxaff1WY+eDBvuElB\ny7gr0XZVq3mey+Iz6ITvtJwPq1wkLUdeDpMmXqCm15yuTfmqacQqX//1XJyT\nTCQEDJdJwOQQ+4LdaEo1sTxIdkZhPbisQUcV/FHvFX9yYEV0T6NbT0M+cbI8\n+Zal4wuoDl9esl2sQlw/1oB9hJlhG4SVPuCsL83rLW8jj+WuAVd9P224fvNQ\n8HcMLkVeoTt7iWLoDUNiFbTmQJGyBPDvTqXYJbgiWXbaQ6VCWc2ECANok3YR\nnajg\r\n=zyhh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-7fd5a7d-1610444678023_1610444726495_0.26472245832499297","host":"s3://npm-registry-packages"}},"1.0.0-canary-0db4fe0-1610445544406":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-0db4fe0-1610445544406","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-0db4fe0-1610445544406","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"774be0620bc9480eaedf5e4851aede836a508fa2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-0db4fe0-1610445544406.tgz","fileCount":7,"integrity":"sha512-4NpaljbfpJ7TzvpZGE2FJ2UlHsZTdsJLoK9mglx2hn4g8CR/OlkUQmDUoiZW05oB7Zs5DsGxeiIPoFDPxpCz9g==","signatures":[{"sig":"MEQCIARZcTPqMdnxcnARZWP1jYhkjlRDM12fetn5tvJpjKPdAiB0q966xBmv7NlSlLubICR6Oiul++baaoceXqccsDa9Rg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XMdCRA9TVsSAnZWagAA9wAP/3wy8gRg02hnB+GtuovG\npMPPA3ES0Qr8WNjmgxka5lJtf0k5UzLIKW118la8d9hVOKy2spLRJiaQQ1Jm\nEDUwKU32orljToE4weiZQbOmkusi6HIqRMIpnXyHjBWzQjrRDuPEuL+VhYSU\nmcoWa01rzpI5bZiaBKzU6D28IoFCJCEdR67Hq0LTvRrhPm0nXmJ7AI5qKsqW\nRcTDUU6zU0aN/7l4dmBVOCOywupMoe90XXjYr6U0+6tWNht2Yo0tZrJpUvtA\ngv2kNgKm4Ti7W6teyCBGUUFbRMlaMblt+U3bdgaqYKm0OiA2+8MGJdYEBM9p\nIOlGW/jLF5Wl1UESUIGrrAE6f0O365Wk7NbWUUVzCda8lwoceRFqUaH+D7HB\nkYevnCycPja/8ETvJbCVz0ukjR7Frp71oVG41SI2evMbj9RWzYseHkRKSQh9\nqT9weEblEqP6hiRYA9ONsfDMmLvF1jCe1jrPzi3SVfjtJ4UIYJ9x+kfIC+Lw\ncKrsupGXhQ6aAjWa4IT4/17hCBIRzkpw2QV6GmGHPu76caYU3abrQbl5Bwib\n/nA51waKuTWWStpryz4A10S80kuJAfI7Bg2Z8bMqlS2eVuAyK3ImUIK3Icrq\n3vSgpID1GHy/h5Kd7rPztadVZq2pGnSGMxyKid64VKcDySnN8hzMoJkCX/99\nRMBe\r\n=qLUX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-0db4fe0-1610445544406_1610445596699_0.20348024158341316","host":"s3://npm-registry-packages"}},"1.0.0-canary-08d822e-1610445610400":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-08d822e-1610445610400","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-08d822e-1610445610400","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"acdd0765a21e1af67754d4ec11b9a45e3a69b261","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-08d822e-1610445610400.tgz","fileCount":7,"integrity":"sha512-wR8DYr2Ns5vETH25rKYyPTu8cq0S+mqVALCvx4uuifXm3XA9KxSkBRomtnO5qA0IYAUp5GDx7pYsDXfs7EjYRQ==","signatures":[{"sig":"MEUCICLTZj5ramCPqmhTGrM/0LOPy7Oy38xbppGmmg26HQo1AiEAhdCRueM8I0WWAFrYxC7ImIZwB2ulho1BnTSfhAncuTg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XNcCRA9TVsSAnZWagAAF3oP/1xFFx+65tdVGk2Dfmyz\nqWZC90smDWPIPtD4pxht4a+XxNGHnRoTv1KWUzBeGYuN9Jpfw535TIwKFWy4\nA34llQwu572/TX2IeSPCuEYX7fSVXI6WzCQ6jIPDKUKksrxukTwN1wfi2Pc+\nf/tQQaRHFrJqT0AdeTqFf+MoZjbqNjvvpTrEsq9Oc8Yrva2dk7Fbuo/ThLPN\noCdBFFBK3lS16tU/8shgJR6yNlMAjHnxNSXgoIvdUEMsz+ueEhglZu3pFr0h\nIv8ajfwlS/bBFnU1wWMX2lcggcFQlSxRcctsHR10SIXLziWtLk07EojNuNxy\nz+LxRtrkM9yefat14PPxEfT91g1CZuzNEy6CUWBAwXYhcwHQfjKoI3xseYD3\nJrCF8oqJRUa6nvijlbbSVeU57A39cW3Qw2o0ACwIp/ODTwdktVUD3i2FpELu\nRs4ByO5KR1pVX9yeYlSXShytScBfTqFxsSd9Pyty5b2pPU01ZAK8Xm0cSgZ6\n8ln2lqMlIOOD+n/qwlWVFT/l+fw7U71/gNpW8rVoUZIlO3qJUaAzbDJY767Z\n/inFYKn/xRCYrGKG8OA3JpL3x5dtzCoCZUfQJRRgm1aj1bCigHGJuEDOkqA0\nDS5uISZwsbyqRiatukjYa4UFydNgETNWXLAveSkwTD0gi1VZ4TBu/C8g6C0K\n/viC\r\n=qDKQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-08d822e-1610445610400_1610445659965_0.45681580224495866","host":"s3://npm-registry-packages"}},"1.0.0-canary-08df268-1610445787910":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-08df268-1610445787910","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-08df268-1610445787910","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3666ba5b2c86beea050363810ddf98bb307a2808","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-08df268-1610445787910.tgz","fileCount":7,"integrity":"sha512-Zi0J/6mSnMlOoXcXPNb/iIwBhqHx1IFL049zElwGrOag3yBDuMZ8laxStOBmXxKe1jF+yAHWxD9V5OIRM/MOpw==","signatures":[{"sig":"MEUCIBUzNhETQwFxaOg46OyA23F3Gc7uQHe23rVgzV7IN71dAiEAtfrKJxQUNRi7OIsOZyKztqrkJcFT7YARE7Z+UCigBQ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XQQCRA9TVsSAnZWagAA9XEP/2cFk8+g0+GQXbO2cvAA\ne8uUyoLW9cMVqTKeVJFTA6oRjznM0ne+NMVD4NgGx8PDO2ZyLeXMspAqGEUX\nVVeOLU7TbtT4HKVoZJU9QSHzvPcCv/SSy4hjjtIDt39iv3GYccDiVpCk0Tt7\n+T8MFf15Ck/bVQ/TbJjTLikfo1SJewKbkbOFPI3Ts5BUzf6826OOjKNhOFkK\n+vcjcswxuXYYzgjnXwYjFtPfRe+Wg++CezVVb1DKzOUDD+H8kEaiCn12+j2Q\nR7M+OuZWCCPxYCqzeScVtU5odwyDBr8EU1rVHuPyghsF4bZsURaiYN2VKOVV\nIuKP2/0KKKr4Awd+kZ9g7NyReNz99TQP2YoUf3C+EHrziFBrEcgtEV2iRvBL\nCaEIqVDm63hzfXOoDBdwbnn/iecZzDpNqgZIPgAtBiDLBaKAh//vf+oCPB7t\n/yp0k2IXTZyHyV31um1rAW7A4H+2dBFiPC9Hiv8w2jg/89yHO4VYiwKYvjVQ\nEWInAIZr+Zn38iOtWLXbIID8V0f8bT1uQEmcxG9WL2bW+tDO0G4mcwX9AeIL\nG0LsBB0ssZ7NcfV0D3/L7jfb+BeH2vIUyNgbBpN1oOotQwYAS3+cV4bUfWUE\nlY4KU0kG6lpxRFG+XyGMyvyuG6oDt4+dWFofTOP+Q+7krhKf4KaAtcNWodEE\nIYVg\r\n=9fkd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.19.2","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-08df268-1610445787910_1610445839668_0.2629986153678472","host":"s3://npm-registry-packages"}},"1.0.0-canary-3446c0a-1610446098321":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-3446c0a-1610446098321","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-3446c0a-1610446098321","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b9ef033fddb45041a3eaa90c4428facc65c9ef54","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-3446c0a-1610446098321.tgz","fileCount":7,"integrity":"sha512-8v8ZCrXB8lb08royCtp7a5nBpgAPsHKNjy/FCfUN+D5elsHflW9LI9E6IvpYORmhgou1ANlh5A9l9C56WS3PMA==","signatures":[{"sig":"MEUCIQDI0C5sbcm3yj2kynHdyW48MVQ++thbNijrMatY5rIIdwIgBl/5dx+mNWMR6KTGRZ+GAhXrFKZ5XmchvCGmYKaeRo0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XVDCRA9TVsSAnZWagAAae0P/2kHaSqCaLKvnHHWvqMi\n56HYactMXIahwjEHpHNAqVVS2tQmfv3QEexbW9TBDZo5xoZ2Cdl5GZ/EVhCN\njOv0xpU/Vpf7vejX/aHx/w6JH7ji5w1S+SL3BD1MELBg6M9Yt0LWIcvlutc3\nl7wHjI4cAgoVlgQLCUnI8g+Trn4Bezs9j8Srzg/yD3dt4bJe7Ret1ijEqKfp\nsnbzXVnpuatYJ23pP4GCCM9n3+UBcYflPFH25bm2i6w1uKkXo2SjiBsvEn+O\nrqza7P7QuUWZnP56rA/0IJc0fdsElOIl0nBZ/oaFI9cavxrDJ5iQ2+8RFyn5\n19fwELRhPeDqtVozGlCGA9khhQ+mF+0j7fP5dD94/C5jl7oCOR8odbTkoRwq\nMlg2ansbA0qMCCJoh3xZ1gcO6ut7Tqg+vGSRai664mHT5I0V0lC2hfChW3s1\n7VV6hfCeafpeEOv+WUWFiQY5wWyTRdCNsAIVk/yM1icmo40UFHF32Udxqevb\nCUpfhzHwKoWNRf7ji13sGMGpE8Yj38lrQf1/4zm/L3kSInhDj+CDdLxZc7WZ\nNDxIfa4qOP/UAQ8SRwmApw7HRzzPCBO6KHia+z6i07FrAhBF35zw1a7v+IOS\nyQuLRXyME4CTNHqU3rXWI/z5tzDkzR4iYEW0KKgWDPvzkJ6jnbapsfN75SJY\nnsOx\r\n=6dO9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-3446c0a-1610446098321_1610446146490_0.39261236502784724","host":"s3://npm-registry-packages"}},"1.0.0-canary-04c96b1-1610446459171":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-04c96b1-1610446459171","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-04c96b1-1610446459171","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6e5f44d43a0c0395339eab0d630acb9fb9af0c66","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-04c96b1-1610446459171.tgz","fileCount":7,"integrity":"sha512-1WMYV8TvCE5mSi7JOUQFWwPQgKDyuegANxbe2u31edzSlkoxF5W4wQoShfIKeE3eAajuDM68+JwIHG5q5DK+cA==","signatures":[{"sig":"MEYCIQDi4hkTFNXYzoCHnVrP1O9KAAiX+2F0khFKWqC9dqRwcQIhAPxa7CxcuUJAcsCCsXN+/uqwBtSSJCIhtYdfOaDR8UvW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XaqCRA9TVsSAnZWagAA3cAP/2Ufx+9JbUb1l9odDND7\nNXDkyRscPuO0lOM2BNMOibkA99VXUt1qmyrGSdRx0sBCM4ni0kF/i9J6QhtN\nq3aZzciH26QmJra7ebkVwBio9MOSp4ZQ53Z1FDd+E9wcrKE6i6a7iVB9Go++\nPiGsIF+fHNx32z0BCUUJtiLELElMyT1Uq7YmiSl8blFSRTkLTCFaHmpa2696\n2b3HnOkICmnL4sZjrBBHxP9PzIfzeTPq6FUYNyEOxsp/eALHQ9lIFO8OXUDh\nrwZDdcYVsMSFt/9k+uW+8uYTXVWCBH5GEiN+7HiAnN7WiG65zeN/vwAn4Z5r\nLv7vJ2USTSNqjFcEPkpAsxcAZewgBChfpURMb3JcQoq5vVN2YftJf0JUV9YW\nriE54r/69YPsbAbWiOPv3ephox2WpaRRk1CN3uO2P5fKsfKUw49NY1wlUA78\nUlw6yV1NjNU7rjbxorQqMicCzz9kgybYnaLOOp0cVN1traqUT6D6QioVx11e\nm3Pv4Di6nmImgNTI+fnz7xNEJ9Q862RqvDJh5wTr1ZMZVoekLf9srHJjvKqK\nmYZ91PMwwMfkv7jNVfixS8mv0iMBDKrFUL0r6YRip9kzdGppa+dGQAko4qBy\nAqaol5Q9mTrITt9iA5A7L0S4096reLwN9HHXK/39lVlv6Kf4kaUvqs6z4yiF\np9aQ\r\n=mxSE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-04c96b1-1610446459171_1610446505797_0.2924172707858115","host":"s3://npm-registry-packages"}},"1.0.0-canary-64dc224-1610446779627":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-64dc224-1610446779627","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-64dc224-1610446779627","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"00179513ddd7b4c7f33425c5505085e8eaa9195f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-64dc224-1610446779627.tgz","fileCount":7,"integrity":"sha512-+qF7Ut5YZmCWdwBj/R/fE1WL3OcyUnK1UrmepnZ6hQHmXPtD2PKMZrMNmK25aCHLxT9X3HrNDpCECRblF5C0yw==","signatures":[{"sig":"MEUCIEIy8p/EwzySVPWXtFM9ZB6/2eXaWU7ZrcRSi0ECUEkYAiEA3e7mA3014MgTqcLWVka+SqZfjZLZNFBM67SV8pEJSsk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/Xf1CRA9TVsSAnZWagAARCIP/0dtWVutQEFvDDnMh1uB\nvtAiY9rXz7vAPJufv6WsxAKOxSw0VFMA5MobwLiERcWHnmaYn+GYAYKdDAy9\nIno+Bry+QZgP2P55ghzYppdF68sLZzhq5T4WsBt4XGb6zdW4hsCp4X8OTt1l\nwxNADpxb8DGqhgOwb/spfhUDiM9RnwNzN91K9bkK6fdK6/RzM/eKieKpTq13\nTbLrxiH3XcfJCPhzrXvMq8VPCGXn2dyBA8dWQ17G7fix1Q8xolDE79TjFiKK\nMkpUr5DshkPmAYNMOqDsTcerWjPjgrad7OWM8Wuq7sZQYbntkEbv7nMFiGag\ndpNiB9to8hzft3pBJTKSps9V3Yq+Z6cW9zl55E8awA3LE5pqZk+P0x9Di/HS\nzRmJHz60ZRljf/kJZmB+xOPw1NrU4r6BHtBlLEkMOsvzMgbMb0fK6GWDmurt\nalvkyArh04WSRCnGTWMYcypPQbOjs+vW+EPIU9ZPER7AwFZODpjdI2M7qnAi\n4lzrpyYiTXlytdzDd1e+c/j9BnGrk9y8ff6lW3sIeyXevH2nWmzYw4SFj8B0\n17p5u5/naOwNqavHmqWdRDmQqAnbV0wWBIJo2alHfkIz0nNmTpLX/RwdcOjv\n1OAgrcYadX6+qVSYevRIIcjJIdFIMaRVjAMhFwcIzhAI79R71CDPwFQGfChA\n5Hi+\r\n=tAVX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-64dc224-1610446779627_1610446836639_0.06758592298456634","host":"s3://npm-registry-packages"}},"1.0.0-canary-f4e6106-1610447177989":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f4e6106-1610447177989","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f4e6106-1610447177989","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bf5276e418b2d250a57e4e4621168b4401d864ad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f4e6106-1610447177989.tgz","fileCount":7,"integrity":"sha512-h6a1Oc1dpIGrkyUlmy0ZSP95f2ljXGnP37+10K4orJCaJNtPJk7zX4qWyqFW6+FEZmVsRIDqBDZ3BX8MaO9DIg==","signatures":[{"sig":"MEUCIQC93Bsknwc0GaUplJVgKVuYF2ZbSOjoIn5YNPx6ylLeZQIgS0Ad62dWkDFtEqfTYKaOxKjCm2vNxWJPU5pDdoL/nKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/Xl3CRA9TVsSAnZWagAAejEP/3I5wyy4RMO/8z96xvKZ\nc9B8bDeP0+iqgArHEMDDx7EcfsAvyWJTj4W0SFheuttW2lzXHy4q8qsPhJ6a\n5/RO0GH5xMRvdkeZsJIw1gx0JLlKquVdlO6RuObOiHiTPDGZywVP2k7BJGjs\nXUJkoXpchVkWjVWpf9Dv1XIi2R4c8QeLLg+OzaYmmGFrnmceipFrkQsr7OMR\nSmPDR7g17qzULLa8VSGiTJ0/ArqIL9uhvKqipCvKT6pkEZnP/tGWb2+/OCBt\nwWt2C6Ug0FwMa60u9lXw1SXU0EGjSYOLvAIwCFBXeJOykjo07nFo/1L6bm1A\nj3fNWwwG9xJd81xS96buvid8aoMfB9mQqhMYlkmZhDypjjC4/j/zHmE4etsp\n//juHbD8rk64SwTq8Xr2MO/k+YjP0UCELS855jo4wISnYeptYQZhFDDXCzte\nExXuEtbGjHk8CuQC/sGidpz27CFcE9oPHGoa9HpOJXANMtAaoXfBDYx6Db0R\ncc1evC1pQh4+A8IFrIELK2/zaSg7R5IwoM7EJUiOKjJjHBgZ3NEgeEfqSEEV\nNMG2pkZDjJ7f4myBfFLy+KHPEHc9gGOJQ+JJ67lyJjLmnVoKNzcPjrcks25N\n2SLaWL6l724qmIDNnVSibVx3GCDMwD+FoD3Iie8tWm1aBcqVebJRKy58hT8e\n5/Sj\r\n=Fzjk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f4e6106-1610447177989_1610447222614_0.208170367463272","host":"s3://npm-registry-packages"}},"1.0.0-canary-fd32dbc-1610447477999":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-fd32dbc-1610447477999","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-fd32dbc-1610447477999","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"37231920e98edc7c8c951b096c9686bfb455db92","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-fd32dbc-1610447477999.tgz","fileCount":7,"integrity":"sha512-0cKZYzypFWUqBQeM4OCPFcrcglOZID/WAsO3SsSx4spoUFbhojCHg0DrFkqaSvXIZDbgd8MR26lTCLtCQTWFtw==","signatures":[{"sig":"MEUCIGZeYnaeP+FiIOQdjFpKH+eaPCswspe0GmkmP01ogz7eAiEAhq6jPgv0S6ixATyKy6svF+78i6+QWlFhQ39blpj+K8E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XqlCRA9TVsSAnZWagAAFt0P/AgtjZTnuj0f07IR9qg4\nQpR3qMTDVek1YyF9WwrTi0Wm9+i66cyJjTeiXPkACyqCVRlA0y5GFcj57S86\nrPmZLeCg0nQ+otvk9S42e7esq1HX9PIfiICktLTDbvP+ro46LpqxVaxvk3EN\nnQ0r62suOFWkWEjhcUIebqkcsXkF3NHvX0VPF9d/jI8Dsyxss62agRgTq/38\nt57mqnJhKVYjUEZtKJ7GoK4vbB4bBG2/FcIWUxmJgBLJUwuiOb2rYsjO0XR8\n8pOFiir+das5UN+BvQRQLn7r1mIDAuW5PZ+IWlGqu1vbx6LWxj7tfbWiPdBg\nRRDkdde5WxcOvGAtw2aXPRjxsscN2JHvBaou8o5AHKoeq/ARuWXm6F2Wjv/f\nckv7gtutaOCfPAobRlASlrJbrctswmgMxLV1fFuCsonM/+m7Sxd4aq6pjgBh\nvO/o5oRSt92yAlGHMiZrDT0is4dV3qxfBeuMvdwCFXw7F1jLB71b7iGB+/hF\nq3nCZBf+vgRHTcervufqFUd8EZnaSJBKtWM9akcpXDalrx88JSizRpjtA4Ma\nSZNCnyfhNL798h+rFvfcRnbHBAVP3DZ2dysK0vhaZelVyNt44dDrVesiwMKG\nZcl1eUG/GFi8u9pzwiidUiYqFC71sbbXoZiIeH9yTd5WnMAokicar/0ozL97\nwAjs\r\n=+33R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-fd32dbc-1610447477999_1610447525323_0.022067935304727282","host":"s3://npm-registry-packages"}},"1.0.0-canary-930f7eb-1610447701917":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-930f7eb-1610447701917","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-930f7eb-1610447701917","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"36ed6b50886736b3a247ae06b8ef2228ef135671","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-930f7eb-1610447701917.tgz","fileCount":7,"integrity":"sha512-FlVuEjE/Sydm7i++F3rrxRd0g4cfWjOuhhjIM6Bbj+2X3J7W0AjWBp4NUCEbudor9E/QzQHv+UsDUboC+hDHCg==","signatures":[{"sig":"MEUCIAPbZRhTTRFeB75DfNTcqs44BV610U1UJJ2bDPNaXq3kAiEAwNuI5xu/XFtgSZ9MfCcxu+OZNIQU/sF3J57/majZb/Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/XuQCRA9TVsSAnZWagAAwY4QAKKjbb4HU+aRPSfnsOH/\ndFEv4aSLMc2e3+wda1iRkHiex8zGQJegbLODKwughsA1OSB+UpgUjGuQPwpe\nAQ2Tocp3cUf+Fy+rualwZI4DMj2eIGU1QS1Q1XBIuOXHq54bLGrboxQwtRrK\n+J6RP06X/TYSqyrTMYV1hBNbdbJ+ffwCy+3I4SDd25MyBmJHK7TostRyqi6F\nQzupFnYbp1zOWA47NCZ9kVFrSk7fBV9tIKb+et9Wkg+6yzrVjmuB+RHKCCMQ\nOQqMsvR0C1iaMufhipzQ80XfSefPN0GVZB17zhwEDJKZ/BJlV7GBKgjIgOsA\nr14LBpPEmKVqpypRCKVHcr5b3IPckE8FRa4DWFM1l6zyGyTlgiaSgzVxIFnW\ne0TuSeTzyN6gPDFzIdpShY6gQrPBvFFglNM7iO+Cr3FbdYNzbviQEO7oA+Wm\naFG58NnJSjMSJaR+MJi7tNg2i/ne/FpMMGXXnaRij5o3z0Gg0k+eOMptv4jZ\nrhl8g72aVJoWElTXT+SE2XSHJxtCxNYrbftxifqBzeQnKN/skkHDaIwvixGo\ncaaTUkK/flBcohCtC04H9gHGrUsIgq6Fwx1+L6k77eqYUffyw5I4qKZj7ZFR\nP5poNC1lG19svAn8IioEYSI6JLsKZzlQITQKlo/1hbr7vQi+CC0LlfM3vMrU\nvUjm\r\n=/yS+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-930f7eb-1610447701917_1610447759883_0.10404417357178208","host":"s3://npm-registry-packages"}},"1.0.0-canary-dbb7a5e-1610452394649":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-dbb7a5e-1610452394649","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-dbb7a5e-1610452394649","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b40f32c2dcc3dce785ebbd88a6f0414165cecd62","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-dbb7a5e-1610452394649.tgz","fileCount":7,"integrity":"sha512-mN/yoR5bb1dToyRQ+ee4bK9W/ajtwvk2yrwQ8R3zve4f0YHLsuXVcUb6IZ4fu1mRSiAgnIooMl92JdEDvMNCDA==","signatures":[{"sig":"MEUCIHrA3XKvSwKwisR1UAaq6+U/8mqcah/SN9PihKz4WpfWAiEAs1Mo03NXuGLd1PZbANOFBZs4vU+fpjGeWy7xQRmM6KM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/Y3eCRA9TVsSAnZWagAA4AkQAJjGq/DyItXCF0plkGwI\n8ZYHNIlWSntUE1hG5/bgnyAlffRSninQ+OlA/De3pOkRGGaWH3aB1bucKqAA\nfZQEiKdyROgL68sOqjtA5o9wgT2+8k8J5KHpJOA6/5ne53o8rLeYZB3LpMj6\ntk/LZ1zQDW4KB/VNXpiFeWRkJpVg/qN/LLhFZdOuJ9OzWVGwJ8Ee6gcpECQD\nlLXxBCnRTk0f6jM/o4PDO0tE39g9VuCxLI9k5N6QziQu/hdehmCRCiQCzPKW\nXnUbIhtvwlvMX3yFOOGGtOoHWRvfbjtK8LEGFvrA/Wg7oP8GseoYdHeBNcSm\n8DFYa9JnTBi1vV0uyeXtCsgWtZTniWydGcTdFOecQXdKUW16OMuz62WkK/BG\ngyefOVcaBFsZr+bAvUFdfDHg9rz6UQnEqOX8waOnSMxUS0HoQu+j4Ewt+Yeq\nf1NtdGhsZUpYMs0b4Exz1EqnBvlCVnZvLQhwxD9bKw2s1StUN9FfKGhnahz3\n8oMOwsPlhVjHiJtiAvrF5dEwaBuqYO69L7AGucdISkgwKCaw2z2tX/y+mGxg\nls/YIoR4xYLYTEggvH2+6XjKyAH3v03KVXISO2+lPdhSHgcwwCKvi70sPLVy\nm1KpV2yqDwQbMwN8MTk3ViebgSy5Fgf3K3dv4Zob3JRzq8aMxhm/Q0czQdKU\n14AY\r\n=iPSa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^4.0.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-dbb7a5e-1610452394649_1610452445533_0.05263985316812603","host":"s3://npm-registry-packages"}},"1.0.0-canary-6b50ec7-1610498594918":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-6b50ec7-1610498594918","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-6b50ec7-1610498594918","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a09853b1970e9afd2a62585fd50d6e8e5d9fbc19","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-6b50ec7-1610498594918.tgz","fileCount":7,"integrity":"sha512-j2t6KvxqccrDroIck+4/MBs8ZHCrgPzhGjSAXgG2PDVhLyiNowdU9AMuv57TgO9POjNkWE6BJNnJpUsoWFM4BQ==","signatures":[{"sig":"MEUCIGLtc9IQEYq6c3I/miWThisKlWnjkjx2h+hgm/KWEKjGAiEAq2VBSQ14fh9CaNh7pJ4Y1LKFRTibCMJJMJIKAHg+My0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/kJYCRA9TVsSAnZWagAAF28P/0A2IKk0Pgoz9lEtHqBJ\nQG5IiA/RNiC6EjAYeDmTn0ZcTJvZbf4Rjbe61Dmt8ghtETf4HQlZm3wymNLH\n33RgPvzH17j1QQYIenK0v2wANJi0IptGGXuPZd1v9/0YNBUCpSf5/xOAOntQ\nPHyV8W8awdoFzzohp8xmjqlVWucWoinoiq6GfgCd/hxFXGqRqQv535YGw1u2\niQYn+BqAGBc86oxYNIxgEr26DLds/Hs4YQgqtghw3Q8tZTQ+zAt9ljuw7ox4\n/oOmEdnAsiRd4Kqi6wkov/PsvpqX7yzzoZ+lNls9Q6CBleYceplKmQ/mg8vy\nRVuF4H9rqaaH+vZKx7M/Y3aN4szMwhCaZFDEasivhw/2Roq9vYK71inqjDQW\nHTe3OwLkyX785ileIqAwAiRl4pUDbw9KREZl11UBynjixVIuw2BP3TIX3WCQ\niu1IglwG2tQgyADLgkELTsMsOlucHGQUoB5RfW40ic87J1G+crpoo/88McdI\nJQqa5aqCQZflfQd3M1UCdd32UvH4qr2hUpKn6O9st++eFsB8SCVZt4NYBWhk\nWLraxMaUZFtg+v16a9izeIxCWcZvYQLmTQeCFiIEWYhyKT9/yLMkno/Y02Uh\nyTwhPa/zyoE1SpayEbI+X/i6z/IE7CVu6/V+MbftATQUURbVyjckUccF5+tD\nqdH9\r\n=jih1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-6b50ec7-1610498594918_1610498647318_0.3659149467407299","host":"s3://npm-registry-packages"}},"1.0.0-canary-d682922-1610575405261":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d682922-1610575405261","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d682922-1610575405261","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9a06e5b23e5982efcffabe8ae3623d48814ff491","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d682922-1610575405261.tgz","fileCount":7,"integrity":"sha512-hWR89UMD5SRl8bYqZBhCfM2c0bV/27+nvz2l6GdTyY1aZLVtr7zwk3DRHFy2/WIbtCZbGuPjJ9VYo7LtQmCK9g==","signatures":[{"sig":"MEUCIQCA9Wsxt53bVEoph1Ckv1039AfaA7aeGXJdfi59cPxtGwIgdIw853vGIoP7I5QqNDYpWsF6EbRumi0GsPNPhl1+dU8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/25dCRA9TVsSAnZWagAAPYUP/1jFlNRADnRb7dlfGvvr\nh9xP1UI57v2tIUaMx4i3QtM+RYmwqwqKiesHOQd/x/Rnp/kADJzX9g9pMgTL\n2TPSfNpdFOEJRF1FoAg41G8wlgm2nLXm53+4Z/0KApkhAOTx6nft24/qZdLv\nQg2q3AqQpW6ogBGdRp2Jm6ZxaLLObNS7Lzuf+GnaROVjv4aNwX2xAvCTbSrD\nUq1bMvLIyrq6HuLjQ0wDFWpriI7iow8VIzcm7h1V8M7/BX3n70yLk3hPHucp\nVxABU97oS/u+O1TavMGxnYf0rQbqS5TSNAlnV5tRhOd//e0cvx3K83WzxVQV\nJ52tJZ++ti7oTh/QUf8yrWSmqk4vuruHu8wTq0FhNoYbUjE6UCHoIaZtiJ2Z\nK0+xlNajYkICTrxWBb4toFZkBCI0x51hRAtERrwbQ79Jyk2rJCIJJYqb0il2\npWIwbAKpMo3onVzUvQYu9X0y6NQ/O2O+kWSeUaN5BP0Wm2weW2b6szjLF9cF\nG3IXJqcfEEKQ6duoW1Ry5WUoDd0F6um3p5Jy1iqTzjpeaIQ5eZcB6/djWmmK\neRazfVFcZ6epK2rXWrceOvZIAmY4QiatBLP1i5/hEJ4UQxBA8Kfoa0HzsDln\nmmbJfeXMZK547iwzOU+3clBqXwIlghoZlW6PiijeZ1ZG/IAcfJ0hnu7tWc/N\njZs+\r\n=gTlM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^5.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d682922-1610575405261_1610575452874_0.9463903029816756","host":"s3://npm-registry-packages"}},"1.0.0-canary-d682922-1610575437253":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d682922-1610575437253","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d682922-1610575437253","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"50c7b114599129bb00c8ab273545f373e69f348c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d682922-1610575437253.tgz","fileCount":7,"integrity":"sha512-UOWZHkOxZmw/ISzvwrcG7+e8uWwHi2eoPgOW81YVEDJSXeJnEMOq2aV2U4hZw528A9HpCfFAMfP6+oLUYKV9oA==","signatures":[{"sig":"MEUCIQDNC64MFC1E7hWFrIM0oHIk45CyeAXOedgMVSuP9FjvBgIgThXbP3bJVMEuwG1EBD/zoZ0JY4/MOIzj4G45XxRODU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/26FCRA9TVsSAnZWagAA0bYQAJUWiApty0je63KMp7Li\niY8zQl9yjm0VeaZLWtf2NLC4GNrdjYL/VeVlzVI0rFYkJIVsQQ22rKPtdZNw\nyni0z4tqdJx5EejfOD+AWCh8y5QOaYQm033I7H7S6cXIUeaIKH4dA73GScou\nZI81v63QcVlYv+MJ1XczvdBkdU7wxetz0TgkLkgj8xSTSSnBSHB0KIhA+Rj1\nxFWJxlCFWUUcTSmiJ7geDFcQKNMUh6F3o9rdhXRx5eHXWi2YNY4TCgN/Rrl5\nollu9qmVLZ+Owqkq4vMYS+HWaAZYwuxdoYY13ptPsBqmjJP0qj5u8nmGHYJr\nKzyAVC9rK12NDvKh0vwEHpOAEsQJCqZ+aa5ta+soyBqIlw3JjYNcdhpiPfdI\nOyhVHaGNVibie6po/UqvWZO4vFYn+gUPtZQLlKsdXfoKjVYEex3OLChv4ZXm\nITTps0W9JFZRO7XQhuvTYI3Hw6lYQMW2kPtvLI2btY8LO3vYZXv1tv4WEBKZ\nWw2x5EkQCHcZTZXQpI1YSkxOu+tSk1yUSgh627ntEzEuSSyjuZF0RSgoj5LH\ntgGXfuQ3TrkWlB5Cn1Z8HCfb/2dw4m1/hqJibWEY81Mgrho6mA5VMaje+OA6\niHB3WO/XyjRKDvioU21TwcqA3/JBf0RdYWJi0dvkc1958cQ9MvWc6zZ4JN0M\nIqpc\r\n=IIs1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.0.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^5.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d682922-1610575437253_1610575492951_0.37702008358189687","host":"s3://npm-registry-packages"}},"1.0.0-canary-b423708-1610580061236":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b423708-1610580061236","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b423708-1610580061236","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"366a2d07da486e1d60c96cc517bbfc38b540abdd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b423708-1610580061236.tgz","fileCount":7,"integrity":"sha512-z5DgRp7QJL2X+qinFH+RkXmJXbUxoV+6A77uam62/b7ly9Hpk/ReObT/KiuuHzGjMpk2wvCxV/Sfv3Qq/5rvKQ==","signatures":[{"sig":"MEYCIQC5dLsfJifEEiwCyZZqo6SrAV5zAGA2ZIeGcYa6GwpnPgIhAI65XvwahJXzZU+4VMDzLRf/E4NQdp/9oQtH8+7ascUH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/4CMCRA9TVsSAnZWagAAygsP/0e4qGW005ovs8PDfGPA\n/pHPWTT5k3GT3juKGwxNtMtPTE+MVgp9nY6C7cGPNCkjUokQvHmxfpLJZwWC\nlh1/nRKOLftgfSEvRfXyW9ykzYQ4NNMEZanTgdO6OIjXR0GV3+mU51ddvt9Q\nq1GKzkE21qA1VVL1ql1boxRu7LyQeKyIS4ezetGc9bLmWLUpgn8dlN5YutlI\nvkr463ufY30tczsW+TJ72gBbKaRfesOXDMmFbBoaE6czY5kwBtVAOg0muWSA\nFyXttFnR4mCMI0dasLd55v/F3vilUdU6FAlnUOa6Ira0Ju3e8to+pzoH77xJ\nhKUl2tGSSL7W9fXrS5aGRKccfMDS3wYIh4K1iIZPATYE5JL6gD45zQDbZ00+\nqoj/ubC236PdNvldNFCMNEhbcWpp4nfcFdsi3TLG1YeGFy9gAj9UUZu+dZ6D\nKqPL6UcB//pqDJnaMQ3d+irVZYtq9HfhFyWqi486uPnm7PyODA1I0kcnz8Vv\nBIHDycxuhiGWT6q/ungByieCzTmBzpGo1c8MXIpitOkwMuYY5LlbMjV+RebI\nj6tn7vgR/P7mZtSd/nEdG9UbX9PtEeDCZZB51NduSfdgE+uOd4EHlP6GyUl/\nmU9vFHRcSDC6DTJYNU1xiR6JfRnFRccOdBiggbx1I+sGF+H7GZxX2sRjoqd2\nQG3x\r\n=iKeL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b423708-1610580061236_1610580108267_0.1477318213976142","host":"s3://npm-registry-packages"}},"1.0.0-canary-ca2ecb8-1610666283695":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-ca2ecb8-1610666283695","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-ca2ecb8-1610666283695","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"49113f5e984e73b890eefb1160e3076a4a5b66d8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-ca2ecb8-1610666283695.tgz","fileCount":7,"integrity":"sha512-hXW0PuU+MuzdV7ooTEKlUgLsw0drjecUIqW38oKv6cPmj47wryrnHGsQs391uf4KMhhgMwYcIkXX4Sz7gIRNAQ==","signatures":[{"sig":"MEQCIG05Nsq7blZWBxKwHWzcJEgaajCKJ65lkAhGJls+vsJpAiBcHKmjtNuuLd1iwDOuxziMs+SIt1Zpei50Zp2NRJqsQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgANFbCRA9TVsSAnZWagAAr7gP/RdwAUOqmwJk3M2QFbKP\nU7xHjM0QaGfyzmCEv9HP40MGuBKucyIEpL3qJchQmXfbpXTDwQgbqhRi2wdZ\n8hueHQ8VoCGN0+mFSbiPJp9t0K0IfGkAgBT7Z/eEz4Dh8xY0kVjTDXAOveiK\n0ZUwrLzuAvkLyYdLmDQpLLJP7Wvzok8mSCQdzgKEHro8B2acbl5MrQj+o5sM\nkmd6d9KZ5X0wQb5tXDWBekd8UjCzVDYs87LYSKaGtNOA0BMToiWQs8jhLWWj\ni3Rw7PAk8e4mPZ+WsaPeVaoe9kpNqSPxLTqrD5oaDZZsJIuRMXm098ATv5iT\nKcnSsXU2WJfvalQVbS1ljK2kqdKHB2hJ9zZo1HSI815qVZSnCOvtfgLcbocA\nWByMjt7i5hRnRJdbBzXUM5mjgIlO7gCzZKRD8WBYMG4sCVnYN10Xqyb5mL6p\npHa3YNvkDikxN/Jbbwef5wUX+KkmVTln+zdjZWJ+C1hioeXKBYyGbCY038BF\n+ga8NSgTtJT1PAx5b54fgUYgutmq8+mIHTIhnIquJ+J7VWqySuImYoyAmhJH\n+iPR9g5wo0ZOK29AV5lokf/IP79/9MVb5rI3uN3BV/vtYbfobJHAX9gzHJf3\nr+jXv4x+4hwwkaXAa2RzN9J2UrbyH+KkyMr9YXElyrcEdplVV7+SkzvVQPHp\nqkV3\r\n=jbsA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^5.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-ca2ecb8-1610666283695_1610666330587_0.6325774518055494","host":"s3://npm-registry-packages"}},"1.0.0-canary-2c8451e-1610710689963":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2c8451e-1610710689963","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2c8451e-1610710689963","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ee5cd5cd944f1f17258e8508bf9963a53bd580bb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2c8451e-1610710689963.tgz","fileCount":7,"integrity":"sha512-m01rawPfNddxzkpoWZrKHMH8OXGNkKbGfQ3z5pi+LBsJhvbgtrfVFkRqxwvnaH0bLR0RWQrDI0I1yOAjvr1Yxw==","signatures":[{"sig":"MEUCIQDMq64wsc9H1necs7Jr4ZRniVdy1Vq1D+FpUtoWUNHA5QIga+htlUiZvCZfnxLKh4fn19pCDX4+3PNAcXqCgl0MwDY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAX7QCRA9TVsSAnZWagAA5rIP/jN7CGd3UVwFeNaDHdYi\nIKCZDfQFMYYDNywJn0P7NHiiGupGNlE+G29j/iTSjF8i8Kga4qKN7mIntSFy\nejm30TuSPJDQwjlEzMGADGCLAKVncaJl8T5fHGoGsuY/YiNr1oU8n7GteDlS\nu5UjFCIhc0VweIoTnHiajqqDkbXvRLfsRYsORc5MTstWJg7vjw4TVJ7PvSu8\nBOvrKXBoWeYlBGf4g6ibqV11kSh0HIuU31G+IcCvw8t6rNclwW2pdoMISLQO\nETtJ8PbljK7emm3zNiTFORm9im/jub59QZ3vaL0rhqZPPGGoICupUC4XjoE5\nf+ko5CeEAsPc1pPGpvysaTQChyu4JPRNTFelp+ngHQQG4eVozDbE34nKHSxr\nxgLlQIAzBYg/dmaGl5JPrNAZylwJImS19Ms0raiv4yVcabdR2AEutnqKpeHk\nxpE1Dq2NWyfLzb6IeOLJNl+g4nw3EVCWF/lQyqm1ecaBcdaSvZSWRga3H6nt\n4BRqkZ3vMICrzK2MCJ43uM1ZkOByLzCv2/NT1odF4JqZC62BdQBxB2OEEes5\npEx9qhyxl1tlUshLvP7yxUHm1sTJWu83eSLYBKxrBWPj7RNDeB2gKqUK/plZ\njWYfMbEu4Ii9oDJYiIAJmAPEMf2D7Wopnehau1pkbezQlQD8htGuWkv2Kw95\n6kqN\r\n=iplI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.17.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2c8451e-1610710689963_1610710735196_0.8798683564533263","host":"s3://npm-registry-packages"}},"1.0.0-canary-1f3a86b-1610752730555":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1f3a86b-1610752730555","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1f3a86b-1610752730555","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"46b9e4ac5a17fd803aa3d575027ea4201d0e31d8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1f3a86b-1610752730555.tgz","fileCount":7,"integrity":"sha512-L+yThcbvnuihRQGg5xuGeQ5RDE9DheVtmKppLcf10pnUKI8v8MEjl2ZDvL2dLWJBXPkN0FDAXy2HO1lNk4RAwg==","signatures":[{"sig":"MEYCIQD8Ek6aiZysHt4UoRPjvpT0e6mTVqnmByq4GZ2dQOt2twIhALOL06LVqZWSXBtS0m7euDc32RSpt0Z3sL/n1LWYE3KR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAiMLCRA9TVsSAnZWagAAqZUP+wbyT4n79IeG9Im3UK52\nEOsTqCsjt6KygHHp+YzSPmMWNBNhgmuysZnKAc+qwSd+WqR8R45FT0b6Ej3M\nYQND08xr6s67ZhTThjiZ2vEruh+zJS8omz3cvgc5sMjxS0kqjzJJnaWuyBbs\n5mFBB+32IPtMK7V8YRmh7pZm3GYSrqwj2EVT+BTz2EwQ+6jlo/pDu1WJVV8Y\nMlaSB32FvzGI55IvZqOCUmOp4hD6FcLIfYeACuR6dF/N9BnUN+2VAoVofRrj\nNmQTeOIcA8BNd0O2zkKnLQ1USdWtHLGOJ6T2hADaYBRNr0epEgBp1ghH3Zdx\niut3Av1WjYTy39CkvdAUlvzaBZ5Y1hSyBbExs0G7kRYybNIZxp16TDcPnWNo\nMbD7+9ZgpLmX2lstsZOVWkNckMjlsIUDN0Ppv11w8UJN0woJGZRY0OoUD4cf\n4AaKfJ4IE8nYKcVd7LVl5cts2tbhlvRc7LEAQWNw2vcukuhLR1LD98m/jkOp\nFfP7xUGjflnHTtpkfP8T134Ke0Ytus6XhHsdwR7Lq5CUTPMEHZLSeSl0d/k9\n+yJWbPUzVPs9haJVI3xoiqofH4tYMQWISSNFP+9+If1GqJmJf0+uOr4as6IA\nUu7AfR2RgyE5qfwyIK2/CCblHKsZ1A2NGs8cDftBC5TQ9OSyNsGOVk30zLPi\nHBJG\r\n=ytLt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1f3a86b-1610752730555_1610752778691_0.7783488440145794","host":"s3://npm-registry-packages"}},"1.0.0-canary-1f3a86b-1610752735485":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1f3a86b-1610752735485","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1f3a86b-1610752735485","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3d679f65ad10f68c35738708a2b545fbf11d2b7c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1f3a86b-1610752735485.tgz","fileCount":7,"integrity":"sha512-FKzoGuqqAnaqdwPJfqbrg82382OPWY/Y2GlBFlrKsHuJTGXzueXba8dGc7xW15sm6LuWLZRDZZNmL1Qtchbb9A==","signatures":[{"sig":"MEYCIQCUiDePPriRc3j35P97D2eQ/YMxqXoBXRFl8lDnscdG0gIhAKUDM8S013w3g7LSGrkdfuF7yhRAyaBkNjotFARFNn+b","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAiMSCRA9TVsSAnZWagAAm3oQAJ11EALlAQo0zQZuHLWK\n/GtZdLtNCt8YlkjU87fIYD8j+TzzDTAkd03yeJoZrWtwYKA/pwlYALm5CA9O\n145c30EEmwwRSBnPUo+0HkBW3BN5DIF5b/XwtHJRVSy4r9HbVeJrNqH10cQf\nGBzPrcAcJlKoDsAMClGoPLmWf/x1aVm2fZ6cmiSB5Djf2deDxHDxPXlssmaZ\nlB9H873Z6mk6BkduLEjnFlp5dVU+YGGKMnzuups5VzawPfmpa3KDuuCw3ErN\nEM5+g8T3MCZeEma8D5PcRzsGYee2hHkAR26s5hXoAO96cpuFs2ApHWZbiLJi\npcGQK5CBOe9tXXsHL0jvzv46oK3eVU8ywLoVXIFTcpNQZthHnOG5VEDCCHB0\nSbPKHVz6syClskLNo+FjyJdxtMQ4D4TSvUl379bwCtLHpyrTvmR46qkVkGq4\nnDQpwGpLkG2oYdwpbJsqLGpKZAqFWDlVtL71Ew5l8QlnFHr1UAK7dhb/2Si8\nwRqp1gXruiljGbkMiYCX8mfJzYl3HDazl55vPEDCEWoPuAiqP/clQ3BmPcOZ\nsF3JANE8bcRkRQuOvxjbIJL8atsyfaoBYnzMfe6pogOnDwPWq8hAdvPrZ85U\nRHb3ECtglJzVcf75TbWjYdqzgvJHhpLu6fJn6noOOFpPfDpCFNIayPIbWDxM\nvg0Q\r\n=gn1W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1f3a86b-1610752735485_1610752785564_0.8729643656838282","host":"s3://npm-registry-packages"}},"1.0.0-canary-9da9277-1610778972162":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9da9277-1610778972162","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9da9277-1610778972162","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a84eb7bd292bd2ab28808e1d381d6194f0e021de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9da9277-1610778972162.tgz","fileCount":7,"integrity":"sha512-5GhMttmLs6NIuJhJFh1f0iuxKVVnQ2K6l6GYxhZwshEKo9n0KgxG56STDzMJ5nA4wa1UC76E80PGpV3gfQa1Xg==","signatures":[{"sig":"MEQCIA8e+74wQaREVyphgmzzglbQTWlJHS2srvamR5VoesTAAiAVzuwWk7W3iWpyldl3Bvf+0XS+BzIkYymxEoYaANQUVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAomOCRA9TVsSAnZWagAAcfEP/3nS8WE6TcU63FPVR5yY\nmP/q0I5vQJeebTh4z0GPyx6u+W4Y6MvvJ15LAufVPSHgK/EZoR6IvuxMbHbE\nAU+3YquMi4sIsuSUKENxmlc4mx0mRpEC+QZsq1V/sQVF3fjYMGExrMOZAKbY\nALJbX2jJ8jkcky0YtmFRHnmcaouji1NSPh0Y7osmcfmc6q6p6B51RKn0vpaU\nc1EpcpBSG/V6FuFUfllR0jse2rK7zojzFRu5h89K+kHRKkh6zvmmLEMPb9W8\noLI57BKCM9QGhFqjQdNt6H+3SNOOO91Cltn8EZS19WRDX4Ta6mfcL+pZVVJH\ndT04Qfj+Z1IpLvsz9OuAQmYpXbb5Jr08H/6XT2l+UvXaOsBxKbWUf83jyceF\nVE/e/LKCobz122CP6/8+3nX4quq8l2rPZo2mzGpR1DHNNpCW66JRlZ/7pGJ3\nmUqKe/w6v5vswqNJQxrBA9dxW9Mast2tMFdByjMOfHRxLrVwZziNk07U0cx5\nF5uLgPCtBfwmp1sKghyFg7KXa7xaywKL/r/WtB9LZNrcTxN3zReUiVXLLLSi\nA7vEUelXzHlYwpotsIBgXcOzjJwzq/lABVE2O0H3C5I+wmLO8Uh3UYrwg5gy\nnpCpGeh2rF7CJDe+yHRAAy1yJJIhLp88iZ8gD+PZN82VcW0yRiibTNPe4uOb\n/T2N\r\n=FmCH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.36.2","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9da9277-1610778972162_1610779021407_0.7816084085350004","host":"s3://npm-registry-packages"}},"1.0.0-canary-9da9277-1610778974200":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9da9277-1610778974200","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9da9277-1610778974200","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"664f0bef4a33fe50a77e7cd6c845a0ebfa815dce","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9da9277-1610778974200.tgz","fileCount":7,"integrity":"sha512-vO6RgD3tVxZRbsSOVfCsagx75Q/aoLba95GJJNqzfOOcdgHxOG585ZVvLXOcxyqKOGVoZwt8fISGRfrhrmOSUQ==","signatures":[{"sig":"MEUCIQCIAd13RTcZguRFUh/lVlLvaR/f7mvBSvGTUp2aObJIJAIgMgk60mQEQ/aBwQom8CYunSEpOVVnprHBPdhcU9rKK24=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAomYCRA9TVsSAnZWagAAJIMP/jpysIWAo0m6d5U+e3Og\nUFDJMiEmg8pPCp5SRvaCk9KQy8RmMaGlYttpnS4bGI7CNIfzQ9otbFbXeMCm\nF6itSSnEUhHkhEz7Vxx4A7Bz8z3BFmHWTffDcZIspGmjUXmAQsuBVD4cKOA1\nSH+2CF0iq1g0YrD/eS1RjUGoRDCQoXtorvA33hson2GjCcdqwKOk6BVXxLAg\nfo+FWeyojNXIG58qZLSH5HqdloYDbbed/SEF2lfq2PeWi37F1BLCpg8p8ijs\n8j+4X/v98Ij17I4bCw+8UP1DSi2AIljxbrdayeimKSKKHQijN0SsXtMxmCQD\neS0VCyQ6/KN2e7pEVYgHl32ja6Isz6fyGlitbRC2kPhPilc2H5+x3cUqlALW\nVLUil1+bV434FgYv6w1V2348J7b93zDBnUirep77bdYp28RRGRVEpADMHI64\nZ6eA0FEw/n9OiPX4V8NTlfZdDb9ikJh56ktfyMboq+D+pBXshmuFPo0+Lald\nlwe5d4CMHXEwM9qX+KANkEnLA4I/P7TsrrIHziHXBCUvhJQfTDPjXU1QWdzz\ngQSkyGU5AmNN9Bs7DcOafsTcpACn/pc8A8U59NaYnfqtjPa94r1uAqMzmK82\n4cy48Tw/oSbuPmZ4gvTIpfF6uvo62dVH3a/xEW7UGhSoMXnNEAlWxolces8y\nCdrf\r\n=adLh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.36.2","ts-jest":"^26.4.4","typedoc":"^0.20.14","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9da9277-1610778974200_1610779032032_0.589142854809998","host":"s3://npm-registry-packages"}},"1.0.0-canary-60ae86f-1610820733913":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-60ae86f-1610820733913","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-60ae86f-1610820733913","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b473a1988bd2ff2e459e4a66612e4b39fea513fa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-60ae86f-1610820733913.tgz","fileCount":7,"integrity":"sha512-KhjUPVpHillPlb5okE+TKiLBxW4bZLw56w8GzCJJ7AAtRnDzbSuvm6BU5unqZgqprpuSCcrEEwXw9mlv5k5mQA==","signatures":[{"sig":"MEQCIFJVQofeL2SYvmC7j60sWPIpS1WmMQjaSD2a0+d7VlVWAiAU6WULY2gAF5neUYFqENC4FXvGLRqRNP18TOS5+t95xg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAyywCRA9TVsSAnZWagAAJFEP/3nbsufaKzbGkU2rsR6g\nBHDDL6OdufPrgaldqdzb6glaQAkW5bRkzkkTowhoc4lc8G3tLTI12GclL+GU\nFAiyZdiKGxJqVqP79MB+W+l2PfZvOWsnmfHe9847nInIkW926H0kl5fngaeF\nycnPy6zVPD1yZ90b5N9UJyvAAsfhc0F4KO6rbyslLWMmsQBopB23AT8uNKlJ\n4iC/d9h1q5TB/+fz23fw1hQndgQ6aKHK174DqWvKxb2bRRgCe1y853iONrdW\n9es71/KshGcHmVfN7z6+PyiNRqspFde+aCTNL9N1rOSdh8KkKWkFT9JBTLzN\nbSlgqsznMMseWPug/ATkToUyOB2PC4rqtJdnIZhYoUWnr66H2uJMpPXjHUTK\nOX6t2gVCZm8FWXpGKCtztfn6rqldqyktMqubEMKjSe3lyKgPFZGQEosN6rKc\nA0NhYxKjeRCp3SrMDDm+YyNOqMGM1Bl+jDQwc8Ynh+Ml5I66ob3HNi6GzsoR\n/UHHeksvYTls9yNjdtGeSw7UPfMdqVwn/h0he0l+k/WOIL5AZqif4tO63rZK\nw+Yi8Ii06ZlLctQJaPDa8GcAGwvNnBQpkh3a7XOqWr4ugbs4nZnt2cRAZnu9\nNlPkOFhoE6Zd9ew2X02ZQmwiyDu5YABD6mGyzShIMsFZRNwJaV6kIu5ZJpwI\nxpYI\r\n=vzMA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.15","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-60ae86f-1610820733913_1610820784453_0.4999040849920955","host":"s3://npm-registry-packages"}},"1.0.0-canary-60ae86f-1610820735862":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-60ae86f-1610820735862","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-60ae86f-1610820735862","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7d48ece9db9c167c0bd11d9a475e36c1fffb864d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-60ae86f-1610820735862.tgz","fileCount":7,"integrity":"sha512-RN2y/fKgcM6UOQanSww1UNjj5i7vun1WGZQ8hMwhtApAtKlaQ3bMlKcXV1eXEwqQYryLvIxknnU/JtTY0fHK7A==","signatures":[{"sig":"MEUCIEIypc8ENqHSFbhcZuQchrlA/JFToeLyxQ6XyiWNW5G2AiEAvYcygM4K0kjpEiwfGxS1SG4qnyUrsFHyVIeF9aVdHAU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAyy4CRA9TVsSAnZWagAAL1cP/jBODGsCwqMYil/lPfjO\nbcDam/tbvGPrwpFWmTEiVg7SHMWj84MivyU0iDxX78E0NtRKzFhj7wB3sslU\nJ8L98Jzq5vBX3OVNFLl6U9KWc+RFC9pUQoxyWCGAvsdUco8wu6N3JLQpRgAQ\n7mWwV7T1f/ARpQwpxRYp2RhybBMaeIkTl0jcUs94bvTgYuqLpUL6k6dCcl2E\nHkA0B+Jazs89m0V2Z+g8I5iS6VKA3XF2ZXqfQyIubUMDnt41pM4+cETUmuOO\n1ycLMU0ZW6WHglL7I19MWbDXIdxApKNWmIdzLy77ydjBC8SHT+1/DZU6nA6D\nnF7ujw3A/6cOEzjNDSMcQvwPnzmxWDxPoWAVGd9l2TcBlNM2jyZGRphdu61t\nd+ElVbC9IJXdtELwYFifIYS9t3w+KF36iOhOusJGaL8GaEzLUNywJO1ONfa/\nGvJzHhqyOVxKsocpz/v7tP5S90V7buxYnph7GJ58L2cg42aJ3unftH2Ahx2m\n1s/krihfC7v4Nts74yHrhQv8W66f5Lo+JQJJWcHOdMWNW8gSef4t4FSgkSRw\nKaypg95NvfY9VAEM15PGEyfF5ICSHiaA/g1+fgksE+JRqpPdxJlpiTlQlxCd\nenHdt5j6byAvHGk0wzgAg33NlwAokDLFResyNdfRN4udiKRj97dzNI/li0dm\n6u2Q\r\n=yvwJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.15","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-60ae86f-1610820735862_1610820792139_0.4986599679047581","host":"s3://npm-registry-packages"}},"1.0.0-canary-84a0624-1610850967550":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-84a0624-1610850967550","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-84a0624-1610850967550","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"320d39e3787b271a66bf9b2e19d6596ee2b22e33","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-84a0624-1610850967550.tgz","fileCount":7,"integrity":"sha512-/h6S32cXBB95gZd6CsRNcEJSnHNYRDKhKcd7Bszredxq27PxNq58zd3m1ufiaT3wk8ljieqH2xNuZ1UduiR9ZA==","signatures":[{"sig":"MEUCIQCL9IvJ8gWN9j0RDSsaxUPZ4YJ2gf7kOYXBhvuMVe22DAIgB7e5UmXiZ/okFLe/zuklYQACmdy4538XZTExHqlY9iU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgA6LNCRA9TVsSAnZWagAAqysP/14BmCgFbxRD8Vz0CAY0\nBpSX9GP6/5zcMQQS54dB+LazO39zZQj48Lkarts6/WNQRy7kNbUoIKhsQyD8\na+HwMZefdp2NEY/Cheg3U4XSE60K1SJN4rOyZg9hCSSJmzLgt3BSx7ulG1Ku\n3PKpi/MXBSfH6iqYFnByTUqCf7K9XUrl0ITH4NMMdiZok26KSTuyaudWWyVB\ngrw9c4rDrDfGTmQLSWiUQjWbaJ3mbuv+dq+jUovHSeMW9fqpNsW01n/wJgfF\n0MiOLJENdx/ylRtyga3H5aqntYu23K/6TqPU5HkUBQfIjkWlMgt3ucE88NEb\nGOnW4UeOuM99nYRjID7rzxiRrglJaRQhFVlf64SpWWj+4OBj+lKRiE1IFMuQ\nYL7taTzSBXnLOjRBTdgm6R81rwfbk0HW5zHuE20bK+bT82fAzMdINArSB74o\nkrivwRZ0hN2sIdbj0X0Qc27b7EQFUZOZz/GQ+3HIt41A1YkZeitR3IrQ3t3l\n0t0UwXStMeakJ0pBKCV/r7xPEgFMrP9c/fr+TcfeReojwwQysNMWPX2iK/mC\nbqGkBFCJ2qHFj/ULMctRxMdcB+E6E4ZPk6aQQqfDttqLuM3C9JWbh6jx2yVC\nEkfPqNZevmODsW812sKt0oVQuhq05BfCh8+RHw7tP34i6GlcSNH8VNmDvv4S\nnrGc\r\n=ok8Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-84a0624-1610850967550_1610851020523_0.2032522392835383","host":"s3://npm-registry-packages"}},"1.0.0-canary-9ebf8bf-1610850981307":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9ebf8bf-1610850981307","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9ebf8bf-1610850981307","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"91140213c11564b59ce98e7ca66c3ff8dcb51aeb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9ebf8bf-1610850981307.tgz","fileCount":7,"integrity":"sha512-R9VYS6KhC8Ykn9Pf+gLse3JZ2TWN84ASslzdEgXFryWFJVtRGFw3OwnvFOgThCkaff4rh9WSvIyTwuKfHl7Vgg==","signatures":[{"sig":"MEYCIQD24aFWRH4G2whjVeQZ8t0hfZOtlYRqGP9MMMCuEkHylgIhAK6TeE0Mw7Mru7SiHRCINq5ETZHwvsRmPVtpHFguu2hb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgA6LYCRA9TVsSAnZWagAA0LoQAJb1Vjn9pnHXl86RejQs\n1JdbWJSrSIaD8iPeMYYxZoRoF4itnz4ieMqkexzr3KHl0bCoONIZ269GNtUD\nsVbch7psJcC2BwxBPrCnz+poUN1Tuc91p3fGfnc5rnUwZYZn0N024WhLuwM/\nt8SHP1g44YK6bfr+cDwNWQ/fFm4R+pMtDVs90Kr0TbriRGQzpycaTogXomk1\nakGGkS7MaGhCO1sU4rqpWGymsF3uviqkMgDhvzcoBvgPGvY6Km63eaApH91c\nRHpVQaiaziKix7+7jmnf0LSGUxAE7j/Ez+jZZQr8ggHAJyXrRgiHL1/Ul3m8\nTVWEwKcNWJUnehWzSKGo72AmyUNVTNFXPn3n4BepFIFp4Y7u27ngPwoANu1Y\nJxwPQud0Lu6rYvgFYf2an4vUjRe1AIg2we6zistYsXIPumVWSuymRU4s6FJP\nadAmu1CFm6adlmKdY+osgC/Tys2k5dlKwrgMesQylzOJkv0sCBp33DkaXOd0\n8FQfeo6e71CVIhmM/3K/J8zDpE8GVy/qqcePvJPvIrcTAfjSkUnhiqaWeJSj\nh2AKQkjAD+hx+I5hqpCAlicFqFyfnUUOZlZG1+C7DJ6fxkFQUMrCE4xP/5U8\nwq4XA6kM6Rk9hKSZO/XhvApB5T7nEBiNaxRr708B68ac4EUmQwhYqqm9PBJz\nxnXk\r\n=R6EV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9ebf8bf-1610850981307_1610851032458_0.9577376017224879","host":"s3://npm-registry-packages"}},"1.0.0-canary-f5c692e-1610925997071":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f5c692e-1610925997071","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f5c692e-1610925997071","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ec77c90d9a2cf09861fa3ab76acdfee9b095c58d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f5c692e-1610925997071.tgz","fileCount":7,"integrity":"sha512-GEw9mB5rMi5T+uS89XucvvXeLOrY2+I6eRSrlbkuIUMB1fTLPKNcvBhxYhCGSqZzHzOyylMqZMuAeTYyY2iOMg==","signatures":[{"sig":"MEUCIHMMQu++IxhKJrLcqU7+0w6CSaWd6T1+iQPeG6x741VtAiEA+4ZJgxDrL6pcgdFjuEKss10Nfu8mMAYuMUidG4/Tv4A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBMfiCRA9TVsSAnZWagAAjiIQAKTMSd/Jiv+XMkUmNc+Y\nCE0CUkYN5Zvn54Ek9wUmqr3QAwyNae8pYH/l0DRGEdL7nqJkrDsmVs8rUqho\n5xuYJM7GEkLjv0lUe5Lw8yflgFb+3D3HmwRBdExstndRybwGEOuYAaW5yD0P\n+RdO4HqPfZBWXKHdoes8xtMjMdHuwjob/JCLK4Czey5JejBeLix+ySKb8KX/\nNLfCYqvG8hKLg560Trup3czn6NxkyYhqFUhEaSzcFWTLy01IHfCFc2I9pkej\naAw+qjL6MgPT2dXYOUXe6myXHASIjSVb8FntmV3cyqlMlVsK7wRpx/Aaoh4m\n0JEs8UrLxdaaas30RBAcUrpNJNjkHFENcqP4bB6M4a4SlZ5ojPqEfs6vkPO4\nInsNukLlIypGcoU704cg0piLPNkbNNFakX3yMZmAzBiXCA3XfTAqGvkMEXbR\n/s+hyZYp0R09+88KnyEBQUR9OcrhsBz35Pn0o15qmj3sVEDq8XvN005FeTj7\nMS2dQz3wXk+5E5CGnPBLpnXmr1cT1CZeRM8abkQGnuw8StGX8JXrghvH7i9v\n55wZly055EYjEUYU5u6vJ1GhGSYS4l/2hbLhu6Gn+Q86hyOWzK+Tq0jV6bbj\ni5mKy4OPWb1KXByvzsjpfs2Si4KljH+4vB1Kqs/0xqcSHs3U9vQ4mUglbOKI\nDyla\r\n=YrQr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f5c692e-1610925997071_1610926049583_0.5239088083897396","host":"s3://npm-registry-packages"}},"1.0.0-canary-21655d0-1610925998846":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-21655d0-1610925998846","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-21655d0-1610925998846","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e60241b447935593d4fff11d42b1e927539a93e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-21655d0-1610925998846.tgz","fileCount":7,"integrity":"sha512-63XgY30e9cpHNF0jX6YXVbbD42HvtW5aYmH/UeevhEr63nT3jA9CerdB3l2iv11FQk5PvkuC5uBpTH3Vm6FMVA==","signatures":[{"sig":"MEUCIEqPU+v7QA9Xyjx9kxt6420UyCowz9UgxUMmN1rkwW4tAiEAtXCnUVGAVoIYoaISdQnLyr1liDZXuviBGLzwGP+Qh0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBMfpCRA9TVsSAnZWagAAJUIQAKHw1IGkhUu576Kui9nc\nIBt3VoJ6sKfmNm4of2OuDLWlRRSIhCPZor3JaQo0lcUIjNV0aDi7Dkn/Dw+J\ncKPD2s0FUc4YSV9uB7VYnbZ2Q+8lBVIKfcEn0noGJTee6/gBDEKsm1KQ8lx+\nSS3HEbBccbNpn5mwkJv6IsmbFLwsnK8wY5+IivGhO65Yb6UY3mqD2aIf09sz\nmpTqFKc259kzBryPoPCwZWXBfg3YM7i2PCJa04qyNCIHBZCMJtlgkxh0y2BN\nHVgVX3gOztIb86WuUkNB6c1zhTP8bDPe99+zlKTI5DG7NhEDFE75snIJHQAw\n47A0w2DuxCFLwDPB+AiOwM1a7WTl9jTujPNwVJIotVT68uIKXCT0/kDLPvS0\n4ALsE/xhqiR8qofZRWf69ajIOKo0UpVBptFi8fPj+gX8JuX83X+WaC3Pe9Ha\nFyCPRfugc+tuckSJvq1GfenV7/XpLFyzCMQD86YC+bafdq3Tdf1qF66mrZzm\nyeOKijLtmD4Ld90ildVfmgsFsk6vyfNPEwMtrRCnqBL7C4Ljr8pno9VIPb3+\nbbAHVA50N4m14GdSPAdwGoHN+53kye/PW67EmzFhqCKoNPdVnl8f6LUZ0F4O\nACVTr3TpLanUEU4xae/+IdKqMZJOEzjgqrznCzomfXgCfs6t1GFvfQxOlh3E\nMPJs\r\n=+M+T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.36.2","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-21655d0-1610925998846_1610926056859_0.14780347368310043","host":"s3://npm-registry-packages"}},"1.0.0-canary-3968069-1610926049305":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-3968069-1610926049305","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-3968069-1610926049305","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d7a6e85d53aef9dfa0ec55f6ffdb7a5bc96eccb1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-3968069-1610926049305.tgz","fileCount":7,"integrity":"sha512-RBz6xNSSAF9E9Cf49TRozFvMx6q8r2fjRxgoZeBLEG85MV0P1982ZW48/IdMv4SXlW2q5IeBCCivsH3oubak2g==","signatures":[{"sig":"MEYCIQCwK/0BaYfMHtlwbRd5OeENBanJlnAiyIrwTQj8O+xLJAIhAPDoAWv4QNheejjacfdiisjVyQttERaff6N4JNdWEP9Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBMgRCRA9TVsSAnZWagAAy3oP/0fwa/LrslDxJvDSWFrX\ndzoFQ5/fTryABsWKxrG6MZMjoMF8c3PZ3NtTpy3OE7WphLsdYwKA0UMvrhix\n3TccP4p2TTIDo8eSKrlmAZuzR8tCXIYiLQgnSBrGvrcko9PafYTnwNLcxGPT\ndhvRKAME6MG9aPKZ0RLJpdjssXvtH4bM+Hxrpij/SZ4z2+1hJdvrh3/KPswt\nYAWu+YVCVsfYLpfh0+vMy6vHrVz2YvmSgHSlLnfcacWWUP3gxsbNr50KhXrL\nUP7SSwH10nGxHeLkNb3zjw963Lrecg6pUXMkMjhULB1X0Fx1Gg9P8w0LGjAL\nEQjx9+aT4qV52x5+pk+5KliO8avvIs5BGD9X8XOu1TXGiRJoaB0NbavRmlTC\nOGM2erqF2xErF1GUYfuzxV/xXcfWKbwTiwFmz1xMNaLnMKvbuUpQVcD5sWh4\nW5pzDK6PpqXIlo0RV5oeh1o9X1ymQZOYWoy6ZzQZ/fIPTSulp3+pNi7p+uuU\nlXcOXz3/ftA8yvwhooT07O1DrIeMyEUOpbHvELBs4/Y7OdgmblK0aV2eiEGb\nKAc25v26fBlIiUi/ou/NA1nJRflpYUX1jzl9cUUndkH/ow7/5KAixsge6pVH\nBocypQ/iEr2ogrKDTWroGhaQAPHeJmS5axhVl37e++KrI6fwvugACeniLfZ8\nXzgB\r\n=hj/g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^5.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-3968069-1610926049305_1610926097139_0.8579319579738061","host":"s3://npm-registry-packages"}},"1.0.0-canary-a56d4cf-1610962470251":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-a56d4cf-1610962470251","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-a56d4cf-1610962470251","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f5a3e81047a4fa618ff6ca9bcbc712732756f4dd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-a56d4cf-1610962470251.tgz","fileCount":7,"integrity":"sha512-eZQT2H1DLH7+l4CnfwcUS8juofdrbb1OAtFThtSWEdH62l39AayoIE+Y1GMraY3CEufy822kAU2qN/fBuYM3Yw==","signatures":[{"sig":"MEUCIGqR5Cov26lhkKj/qVq+u2mxf9d+J4PQCR8UPCYHUF1DAiEAzrSAtQuqbdNXbHYo7ragubC1Wb37tZEpXO7n+U/NcWA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBVZXCRA9TVsSAnZWagAAFPkQAJVjY0B8RAdf56Qy0A/N\nyPH5gM59bVQyFhAmaPPlcvyXyTTD65hKN+47X0XdQOvTTUk/GMGPL7WEuECb\nFT3VU4x+z7SnV84Q+guByUNsU60G4RuaAS9eYWncQwgRRFAHcnBdCjpdUD/p\njcTexnacEKITiRX4vak4cEqtTtc1y1h3cs6GT87HnOTxGCOu2Q2JqMlDs9ug\nfKikmdbgqvMpksPELhHIu7EPYJ/AObqSYeCXQHm+u9nFxuzsy6+PC0p1rFKF\nd65fOsMEISgnUEK4esv8OPBG4wLJEYAXLiho+8YpGU6kpyPb6R52HesxOGMZ\n8twDjQwFS3jiKHNlwWD2MzDB6uZ2AoV/rG2U67FScwdMKBni1fTzkDU2RhGP\nyLfVFArSHBa7rc2An2mTZoOQeQbECRDrA6XyTfCI6xPv4ZlO5WJNrMvcG9W3\ndIIvtguucTZAoIvh8iUADRgvLkgv0pb4iwBalLkcV3PTY5VKoZDnaQEc/BPi\n93IUrMrg0ZXfDsl41SD42If8l0DKPyHS24WYpKVs0920+/0sQ5t36y6Ohi6A\n0GZqSbF6Mh0Q3H5N1DioxvDHXaPj65n5Ivyb4y9LUMwPi2ABQTs4dsHN36GZ\nDtkRhHMLcMv/54rCVjw8e6xbnd9cQ87HNahyhdzlfak36ue/5uwICbCqFGIx\nCHDS\r\n=r7by\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.36.2","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-a56d4cf-1610962470251_1610962519070_0.764838829219795","host":"s3://npm-registry-packages"}},"1.0.0-canary-85f4817-1610962497886":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-85f4817-1610962497886","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-85f4817-1610962497886","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f737509f22f1b5caca7ed28e3e09327454e073d1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-85f4817-1610962497886.tgz","fileCount":7,"integrity":"sha512-WvhpixK5M2EIF9RkcoJeIzldCANaIZ//trKIGRPgln/ou930Z9tdfgBIpN7bIc23tyBqpja6F2I/u8/dT3VuFw==","signatures":[{"sig":"MEUCIHyFQH3YI7to+lvdtkHa2reeYOpc7ddwd140iNGQQXJhAiEAuNMtmKJPwJxPqWE0rOzan2UFzibrtpfP1G9XxyIkvlM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBVZyCRA9TVsSAnZWagAAVtAP/0u0wSpIPNyjLdhGVhKm\nfIfKTgmG+1/JUccivQLUTlaPkrSvQ3TTNT29M1FXQQgNVbA2OGRTcEcW7kPL\nm08VBbkNy7V5da37HryN3H/LxdpKpIaZ7QNXctGKf+OegBv+ATC+NFutOKGm\nz76O2xvI6drYsxYfh3+oW3IgFnixBVruES/iO3sG+8DcsZhs3LbYSmxVXwt4\nkkKdvbbkiLBM7r8YR06wEHY89T8cWx71b1FbFR8vxc8e709Kwj/JyMSA434O\nx4pXmfDjHSmvJfi08CiGcEXCBzYjf3EQHzoZ2gXZRzjWhwpNQSYSK/zdcHKQ\n+tTV1tcxNDb5yVCRbmGfngatt+s7XLRCYsgGs1zjuDEQvou79NJqIhVhEfwd\nU18eeT6VJB1zT8+S4gf+OMSdWkSiK4UvFOLpIwhesSPWy74CQIEZViN7jqK/\nty3yW0wlfF4E3hpWKplFlnPJBxZ5htOZqe7V9wf35uieCFDyG/6yfzOH59FZ\n+HGizdB7ApKYo7PYZTkO3aweUUhE0bPttDHYdYhLGLJdlINu8LvDycUaWxqk\n4EYeEYMG6z0ssiietkAhwFFvCvfvqAunEANuOyi5fHPLOXgF/3zzWAPitE2f\nl8nWLqvMEj9gQVGabsGMkY6SRnwmcsBQB/NkK1mZ6Fxw2+PRL+376p1ay8Dh\n5+M/\r\n=mEhW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-85f4817-1610962497886_1610962545913_0.24705698383667563","host":"s3://npm-registry-packages"}},"1.0.0-canary-7491e08-1610963473682":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-7491e08-1610963473682","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-7491e08-1610963473682","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e5fe6320c2ae5e4263cef7681283a7e347688975","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-7491e08-1610963473682.tgz","fileCount":7,"integrity":"sha512-nlD+DV51v08UGykr1CmNkm0yS5YzTw8uaLKt8R+mlOINNZ7/G7AEJmQtK5smbEmbuKDJh78+c/R7Mycu777daA==","signatures":[{"sig":"MEQCIGaDj1btX8lzEAX1VjbNWdZCh7W2bf/UnyBhk8TLOQLfAiA5CmnCc1qeVOBCR8l88s46LwLQys2UHZPc4eNT0rtBcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBVpJCRA9TVsSAnZWagAAT5EP/i/0cnMmbxdq/96h8q9S\n9vXXWLM3uVWqRojWe0899FZbqRifPYq8pitU6GDyiAmDMYBiZXqn6pzcOy+N\nUYiQwQI+u7w0TmkvvkgPp+S+2lH9J0KzmG9/GA8fY7gUUpT9jIjfx35msrsi\nHyAIDkJQ3MJaOMBrSFa2viFf0WY5p9TvP5z77Pc4g5C/MnUq4rval+xmtiV4\niZXgaDyqxIm2wKOtYB1nE/bOwymZhxtpTdeh4530jno+9Ng/EOTl2LS1Tyse\nQNMLnReqg4J1xEdqKEuEHZOZraHIrpse5pxIBrkfcj9zJBPYzrGeSjPhph8m\nEcrL+Si8+LUL+Vi7tZWvvGhkO5f0Azq2fXEKeLh5FKQebmdqvyN83S41NPld\nDGpsgY2AF9tOcps2xJDyTaXV1Rnh7k5X/+ApwzEVheN6VuUTZJRPLfj1gR8K\nmEpXueqBVzHB286D0kEKM/f8QxhaqEUI3yCJ7XhYqTBgge9qcWPYCqHPXof0\nV25oKa4vgtRxtegLo7fNSXUuYxA7wh0VKzjR4WHsG0pZFm6hJvWrYi+aPGgJ\nb9Ap5eChcb3S+jzaWsZxoYWJYkvgG9d74e/tDZqEGaF7UaaelCyOrg6eo9TZ\nvSJBAm9gwnrD4mmo95jvZJ2xkaCQllUWBkd38WnkmkCAHlSRGzJPwe+OiTyb\nEjET\r\n=kGzf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.35.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-7491e08-1610963473682_1610963529298_0.5801017515784548","host":"s3://npm-registry-packages"}},"1.0.0-canary-bda15b5-1610963486067":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-bda15b5-1610963486067","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-bda15b5-1610963486067","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8f93c9f1a09dbd0d00d8c78d8e2f96c9c4bed4c6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-bda15b5-1610963486067.tgz","fileCount":7,"integrity":"sha512-WnASjG1ZWTF83LF+5pKfncgR80iFNILu24+LVJR0uBO6mrSGKp6Z1AsgWG2+odZvZPoao090gkrY8YpgXNkbdw==","signatures":[{"sig":"MEYCIQDzssVZYS9gRs8LYypo1UvQz0skrQVTcxHIaC0qYQLLFgIhAMH4aONrpLazMyMzwMqt16P3E2JTLSljLrk9Uzw6ivxq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBVplCRA9TVsSAnZWagAAM+oP/jxFDoFQHVBlJhDYeJeb\nmi4J0cyJX6V0OKZwXLfrIL5USozhEejqLKe33kcLhjgZZ8mKb0b2tPAzRtiF\n6RPKfzbEYiRLJvrxlRPzwtGQkwtyAz7X0AGqcKo8OsoYAoLXFzKNOsdug6It\nSWiZcmlizEfspo+P3BxACAe6QobZSuj9OV8RNwO9tN63FG/u0i2TiKs8dElU\n0d3oHqnJ5okMFEJyFdHWO9fX900n4QOu/nnb+ptCuXHRtj8sQdZ6fNiR/aFT\neOY7+sS1B+g1MSVyRfskDs003+ShL5Qjd40FdE3hUVb1jSpngvDe/Zt5H9Xl\nEaR8MLHuI1gYM/htLWFnSCPJd40AVFNutKM4YfRLjoOO2TCrALPJYBiEUM9v\nxkGBljzwDmI2tpINtpBnjfiTB8DimozYUFSTya/cb1B5EEM+r2o8M+2xuzXf\nkPtS0n6LHwtFOMn4OfOPxIa/+i5hrPuXrM83BTpfKpynmsCvxIsH/jC0cpHQ\n+95IBw9pvAhyguFTwfJjYiIxuWAt19f2gyi74DVMcke2n3bmA9ESwHhUExvD\nigIJw3q0CHF5pJo1KSUVYg1GKHd5dC99F7yK/Ls21dKOW8/GFPbjMIxEKZ4v\n9sOwLGXhPRaCwNY9A3xKVebrgHNgCDKCTDf49fMa1BrC0ZdZZZ9wBvAgXyT0\nvvjS\r\n=uQu4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.36.2","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.0.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-bda15b5-1610963486067_1610963550557_0.5339939505232827","host":"s3://npm-registry-packages"}},"1.0.0-canary-8841631-1610964870265":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8841631-1610964870265","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8841631-1610964870265","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b6017ce713b6d5754b14087579bb2e69dce4d093","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8841631-1610964870265.tgz","fileCount":7,"integrity":"sha512-u3TfrKFC61/kyeS+iWH1TDEoYVQOFd6bz2Y7XUHFhUfmuLOgLgX/mDGp0QDJY1r/KimQABlMlfb1NW1VLnunsg==","signatures":[{"sig":"MEUCIGOWAonJdUCOy7VrNcrKc0TK+tHZh+WqhlV8ZMfAFAzZAiEAxGs+4k5mwZMnbbGcD307HjIm3AgU1/57FCBMgxo5tm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBV+6CRA9TVsSAnZWagAAp7QP/AvRKm3OXQEJ0p41hR3b\nr4V88mMfOOm1y6AAHJVIqKdjkBiSvIQLiKupyU9DD89A1vG4ihRpBxmWJHey\n4HgfDe04lljYGCis6PlRU3F0fks3nOzb8u1WYQ5Gx9JNeeXANsWk3ou15k60\n05r3W9My6z2MD+G2hUR0vXMj/89Luq5h3+SnjmHORdam4Nw98S4TreLgElQG\nF/E8i00Bocod6Kx4nv4UMnHjcLaTnyLdtgVPh7SmTba7BPtl1TMIvyN/UZTt\nOksvpcZTDhZdc02Ntsujlu/c4Ga0ct4xrCJYcNbVx9ZGGXFBJliOavrcVfQl\nDTee3hxn1ynhvhRj4fP2G3Db3DkQkv0Z99QrCLOBgicMaELLT3H5GrhP/qkP\nnTvUNB17XtZERg4aBURWr0qFvdE04Y5i4W6u+B7r95nNn5r0Ggvdo8Ft2Fot\nI7asWgsJX649ucp1KYAG4M0d6En0AivS9/pOVZERzBlrLQ/zv4KML+nfL/I8\nAtdVT/ShG/6F0iZxtngtdK2EX57ROcOfRX4g6JfL10h9MIOXtcdlE6aBDxAZ\nViRJ+qbrlXf7TP7P6i2HkBD9B9QNZAby7JOOifzpqCoiYQpCQ0V+cwR5ZuPb\nExoNbPv+Y13qpUkOGzB4ETJbQlNJbM8aF9hsp5t6sNAJaL4LobhvhBRAdolA\n1HtN\r\n=vmA8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.36.2","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8841631-1610964870265_1610964921528_0.3755739562389495","host":"s3://npm-registry-packages"}},"1.0.0-canary-63caebe-1611046544433":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-63caebe-1611046544433","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-63caebe-1611046544433","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1308375ff18537b8d86cfb02de617b5c7752d00c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-63caebe-1611046544433.tgz","fileCount":7,"integrity":"sha512-0w3x9Vysln+r8LFwdLquLjvtMP5Y2LRjLmEg7FBkj4BN52OhOdN0CX9tKFURDyPamY3i6vipO9LIzfIXORP3Dw==","signatures":[{"sig":"MEUCIBSgedwl6sd9wCi/fb0AIpxnc+AZo1fbuGn1hd0vvn6OAiEAi3rjBIDXSNpMBQJA8AwjfWDBgsj3JnGKWKJUBJCvOaE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBp7GCRA9TVsSAnZWagAAjEYP/3nPDzMi5fYlQA8FcQ3z\n7mmDlvPh+ftIIVdf875fN3Gvv/apRLI/0Eolk6dKMfWceirQhPkdvDtHFlAK\nrnjWd9zed9fqc+gl57TUZkbYH94bLpzCRjfG59yV0nojevH7zB+RkWNrH0ZQ\nAglW0K5J0Zi09d6OnmkVU6YTONCfjxJMkctlbcJAP7aSvhUtBg/qB06mZtig\nkqoCMITRbUkD1TTyhBdsBojf35qKYKiB9fkmCBXdwMZ3O9tlHhTfgcXZfDXW\nCsgq3jl43AwQl9EfEJwFALDu/JKxvC3/VbC3pYWPt8Ib+pJIL/+4DW9Kctqk\nEJmFtARoKAwgws+MJsgp+hNhFjA3XzUO4JR0FI5FCoBZcsoRZekPg4a21Hng\nBK/LQ3HpRqTttgH2+aoJJZeL1dOCZi8FJ3sVEIhY5OG6fhZsIHUcsfKji1pM\n3VlW7K0gnhGW05Gy+6qeCkhwkEnpAmLA2Vhyl7Gx72EU4g6StdqycXwoptcw\n0gWcWznF/f3D203v/uG3qyawoka6dxc4OSX9THhT+T3kp/qYGHr5xRJj8fYQ\nZFtzooX5c7ICBGX9RPo4f/9GnzJOPC2HjNAQ41iX7767OK7lMykjWqRDoCMS\nuUJiTgPX1T9AIEkubqEoTUbvMsKZ54a8frwQU1Di98hFgo24tnBq/Bs67OA1\n0RYz\r\n=wk6J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.0","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-63caebe-1611046544433_1611046598183_0.6194016550310832","host":"s3://npm-registry-packages"}},"1.0.0-canary-5cf5594-1611145515330":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-5cf5594-1611145515330","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-5cf5594-1611145515330","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"18bc1fa89bcf738b5854930504ef6abe3d14e90f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-5cf5594-1611145515330.tgz","fileCount":7,"integrity":"sha512-+8mdCeKESuaBszCh2F6ol3YN9jJVNyB4V6Eknq9HJDoc6XM7opUKKNBzkRrsyq6E1Dgb6s++/aAKqyw6+eubxg==","signatures":[{"sig":"MEQCIFSaysu3Axmxcr8f5yUPvRy+KaQQSoya+Pl0MRT7S/yPAiAMPGy3VroU3OZ7uryMxqkpY+1Shj0uTBj+v21w5vZDVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCCFjCRA9TVsSAnZWagAAjVMP/i3qU/0HGmAkhRfm+PUx\nGQNI4a4xqLNiasLwE0W7SSoxJF9S74hDBSBB3rpU+T1PjjxomfujVmeyAYC3\n4Xd5fa7SJt071zpJyYqv18G3/n6Ik8Ce4B+qvyJayuWEyRe0Mk4CdzJ2E/OD\n7LVKGO3kU+MzM4mxURDR1P1lmVMJ+UYySyqeJyQmGwDfT9awgVieSGQXriR3\nfJTcvJvox+DA0/ZeUnVtiKu39i9iHuHDNbGsTF197xpz9Ut/v7f072sKp5Pa\nHQy1TNXOUf5PKJgvc0+gjPPT4PvbsU15p/3UxPZ4plCSQQNkMRKEALQS2TyS\nD8tTPCVp2l5upoEnhLVK3Ai4qwKV2EHQprWb9BUiLgza9YUH4S0Ub9BV48Zl\n/b2wMkcnUDbnnqjBXK6RA6hfyXKeVEr7/o0E9FeG2uo0Uw9J1GQIJfmKMlK7\nSmfCHWQNMJZO5wuUeKmnrPAY0HSG1/0bNKsW9zwoIK1K09vT5s0W2oMzE3oc\n+twYwxaKk6UyU5LV+H1JND8WhCDqEQ9oGhz3kfHxM4tnqJDENnoxEVV/EjDB\nG6GqsbmQpMWqbsihIQkyyLbGALYdQZ9nR0XYuNBbGGjPPh+VOwhYA/J4uz+f\n0u8XyVp5ViYxifnVW7nZTJcI3nAbhW/GYpKqLFtIni03ypHdSLoNm/0/dYOV\nEkEU\r\n=w/K6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-5cf5594-1611145515330_1611145570679_0.556249113522505","host":"s3://npm-registry-packages"}},"1.0.0-canary-7df7296-1611147638919":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-7df7296-1611147638919","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-7df7296-1611147638919","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"14a0d6d4b7f63adf98e6d11d65eca2019092c66f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-7df7296-1611147638919.tgz","fileCount":7,"integrity":"sha512-DAAq0f+mU7fURpKutR2EsUcyOb4h5/WCVfmJnka7lXTtOA+JqmOVEo2G71BrTAjeBbSqX7VkfSuTMcTx4VLkQQ==","signatures":[{"sig":"MEYCIQDN1pYT4fH1YgsXjnJSaftc3+bFqc33Z2PeebSldm+YGQIhAPqxzpkb+RtJpMDKpRncexNduXmMHo+zqN9GvnyxYLnj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCCmlCRA9TVsSAnZWagAA+oQP+wa5/3WJn4fn8hpfIrOD\nLVmtgK3qXn8EqtiQYbHC/AvLzUuge5Qc0N9XICI21+T+Qnjx3Mz69FJpW9Sn\nEmqoFBTxhVHiOOq+tI6eDKmIV7Y/nh0D+t0q6/2mgDH3dgkcP27c/lGKIX57\nUIVBf4pzjcoTvBXzAhFz4zl691zloyiijPkutuUcKWsQbpb+g+Xp/4IDoSLo\n7BFqRBOOBFMJbV+qwU7qXLwgJlXhbqg+3O23ng4oGiTctqIY1j1eD7dOSgpK\ntI2lYrSX16LWZqmSUlpgTzeGVRoS+1gz7sVWTr8h2ql5ZXvZW0IbiK9jrakO\n5vB0g/zdluGLsJXUxQABTqtcw3ggjZSNS7G1ba2KUQmCNMeqtLcHeQuDwVH0\n46f+zwAuIIXeObYRUzWv7QxoHPamwBDW/DCE9heG/Tzw4RCo2Lw9DVmmckJv\nuUt73oP8p6u1tb4dJn+414QR1Lv86CQks0H7dD3OPDSYWlsjX0Jeq6byk5BA\ng07azVyNBcza5JjwJr08XeaUHcFIkrTzcKIIG4sOJdp9JsJbr+0rFVflYys/\nlCQywREWfSp7nOiv0i0aZ/QQaaFgmunNzcvpxPfXWpnxujWjVfBEPtYUTIo6\nzNVsAHIHDnPxFl4nwBAz6XW1+lmR6lQbOtfJfqJOdb7K8wP/v/h+pCr6RDSn\nbJO+\r\n=xAem\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-7df7296-1611147638919_1611147684966_0.6913543417910408","host":"s3://npm-registry-packages"}},"1.0.0-canary-434fab4-1611270960407":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-434fab4-1611270960407","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-434fab4-1611270960407","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"55a1fb5b4c54ba5876cf2beac0f529bbc8ddc433","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-434fab4-1611270960407.tgz","fileCount":7,"integrity":"sha512-TjSL67YZzkIIAJNsrjSS6VSQOGFjmU1INdtBkpEEe/YqmyDRaNFJ6k3jrdA7QIguOIyNpABlxdihjYMU+6SGvQ==","signatures":[{"sig":"MEUCIAKZPo6bygeF44wNw3glwwSXsdmlZaWVdcB+J4jOrA70AiEAok3Li3jHKrWqd01hkwptWAysqBcO8dPUeAIN9XROSgc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCgtmCRA9TVsSAnZWagAA4J0P/2vtELDoF4LUGtFTsgYw\ntUxIyg1n9B0O7ku3wOdw14vmsUyKyoeLlIZSXhJx/pBNS0lWqMb/6Ta+lHiM\nSRSXsZ5tqTxfpsTlkS49o910MdXrnEGNNj2hJtBsCHDSRnhdeSD1GokHxRxj\ncAqDX57h6FXTZdslgLtbl7OGnndC/LveE1Zqb/dUzpYyAnLlq6M5MqrjCovf\nDjYLG/ZfF3jeCI/1SOpSzy4EzzyOZOp02JJry47O1EgLw2qD5lnjb0RBv+S7\nmlxEwwZe8QxeKloi2T8M5WKXcLCp9UMYgHlbpDfB2mUrPQOoiFlgj7Yo8H9d\n/lf0nbOv3ZMkhYavEaPTpskxkL79+aCiLXbLfy4yiL9qp4qYIKoPHcQWkrmA\nGtTxu9mXId+9EhIS/g6kRD4SMAq3ungBv52BCYx0s5eI/mDTBL8e6CEIRiBJ\nDdWCeBzDk055tjq5NMHpu5agVO7/X99Qvml67CeQCKmKq7LDwQRTau/RjvN8\n49L3reOz0vWefL1slzthbbj0W8omSVYOFnchEx2/7JvFpwf3qewswlK++DfB\nuErrehhK6Ia0bijjrNU/E0FSjyv0AAxA8i3kvLOLx/f0w3kUVmkeeUocST9g\nxIPobe0JCd18WAhJFmMgfwEruAUw8cG9t7nl3fX+gWSu2WPKHeHtqtaM0qYa\nHGuz\r\n=Gty0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^5.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-434fab4-1611270960407_1611271013788_0.821494595821535","host":"s3://npm-registry-packages"}},"1.0.0-canary-be17ffe-1611312120665":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-be17ffe-1611312120665","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-be17ffe-1611312120665","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"37df2d77c1bc649de9f76d438604554a420c832c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-be17ffe-1611312120665.tgz","fileCount":7,"integrity":"sha512-IW0LrnqxBXd5//B7X7gETOoReDK6cpBuSxWG+T7e71cTEJ7SCDsW/1sSyRAVFs3Ct/WeyAVoRHR4Y5jBis+ZWA==","signatures":[{"sig":"MEUCIQCsVT9y7JsaEMJ0dViAh2EYhdpGGxKJ/VGzume9FjNbwgIgchtwqxPXSrl5Zamo/MNu/kCxgw5Sk0lCYqQ92wEWHxw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCqwmCRA9TVsSAnZWagAA+KwQAKRM+unywV7jnEb0fr5/\n33b3fLmHsoX4xS5hnca5riIdhQzaCGh4Eixd0OSBlrM3XfxpspcYG5WZQfRg\nBH3eskI2xgg6nRqq3LszBQc13kSFK0zrzucY5ahOMAxPPK7iaU/v1/Vji53j\nQzHuR0C/3nOU820VUECL1w3E+tI2yNNEs1CulU6z39lb6Obk4L6JFlzEZE4r\nPQ7Xr4G1hFh6kUIAz7RU0yNncNsY8J1F3i96+Z1bJrmxLSUROVVBJgUCF1Vo\ngNwxShIuVmbHSzliHQeI8yknqJoCWUXhXmgI7FnGzcFnq98GEoVA6XB0veX7\ngLTAiz8DNrpmuPhmy379srBiEHVmT5jHm+vo7jL7uZ1H4y+3uuGU5y4LfGs9\nwEab76nKxEKxrjoz2EomoD/f4wsfF5yXWiwVb/lx6aR/pwf8ALoF39tup+JJ\nt4+WCmKAtV0N3dWS949eNVTpkDxI3lPA5Ev1oaRgfc4L87WQURAgsQQqKM4d\nZ/ZAm2S0+/q4J+76xnuEbTAF2hOWxEqc9UJAlW5OJwRpndXlxLBKhPGgoy0V\nKgKE3ccwst8bs/Jy07SsBXpZz5A/1QwkEMe+FFvfWYXBmerM3vdaILD0nqsv\nxKoCxJ3jhn3Mp+tqS3UvkqTz/3jjASPBSzOwBiFVmA53U/DW/wmQtP55XD5l\nEn74\r\n=2JoF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^5.0.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-be17ffe-1611312120665_1611312166035_0.7225122218984195","host":"s3://npm-registry-packages"}},"1.0.0-canary-78107d5-1611333164314":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-78107d5-1611333164314","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-78107d5-1611333164314","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dbee3870a5afdae16dc52d85962b0ea854a138e6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-78107d5-1611333164314.tgz","fileCount":7,"integrity":"sha512-uITueglpttbsZ3mWbfMEkWNrpBMKRH9GZhVKeqtkF0HAeOujGpfqTdxgSzAYYspqZNVlZZgxNIgZql+/lNC/4g==","signatures":[{"sig":"MEUCIQDjOIUk1osNVf7DZ7yKSJdjivAGMacFm2faplyCC5lXbQIgAeoe9IdTT9llu4Hwv5oAUFS6tF2XphXdPVODrXKRxns=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCv5iCRA9TVsSAnZWagAA7yQP/30dvMqOE15H5RZtH29G\nCLBT7J8seBwtjulhMHTc38m4bTuoSoQfPIYK2Z8ILM2x3B0eRtWeD/SNuLZ8\n6nlJeAC6AWiBMtHkbBOAO2Bjl0QwhmikRoD4uOReldX4BQ5pcf2Lzb0g4xTv\n9XA70tojyxZHJIEOcRoSvDLTJBfC26sFDi0ssOnsjzbGcBF+XYnBnOWov7zw\n1aujHKIJh/L95BEmbWRoySrvct5BgCeU95Kg9m3rYK+zYgFDPOqcaX4oo8xA\nXgRYSxncbmWx/ZLMnCtl3J+Nq7y4W4NbS1h5WgkXFNE9w0eK+MEXAx0gE82p\nyvh0rLcTwO+FkEf4n56Kefn3P4+rEpEOJHeU/o7OfMdPpWTn+lW1MvPGuJPK\nAr2v9tj5H00SZpXNMFyMbsi2X9a7+Btp2h7oN2wMhQAQpp4h3nW8lC/5S7Ru\n2D/TyHdl5GkfBoDVPLVo9t9UBjVZfhpGTRWp8CzGY5w4vUPIAJhmmmZxaBhe\nJ5KgQ3RpTPujgTj1/RWV58YRCWzg0aM6VIvE1047JUBSUicrbiMUI64KnQI7\n519Dp+xnF+d7MR39YI2qD8Du0kDA5haAHetrgc2Z2b3SsYXejk3C26sS856h\n/n67dNjc8pii1e+nWI07OYHh9hJJGm7zDL0Ri05wG14cXJcqnOc/bmdO736J\nK2W+\r\n=2kep\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-78107d5-1611333164314_1611333218093_0.65471941472941","host":"s3://npm-registry-packages"}},"1.0.0-canary-78107d5-1611333166732":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-78107d5-1611333166732","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-78107d5-1611333166732","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"322111cc701d71c61fd4ce00ff311aa4218331b3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-78107d5-1611333166732.tgz","fileCount":7,"integrity":"sha512-Sj1E+y0SVnNRq8p7oOSinsXKMhgGsNqRMyVfXM+ZWJVvZONCuKJub4okg/bi7p0KgLMtyo7s+FFpGjFijfwMaQ==","signatures":[{"sig":"MEUCIDLGScqpfO8VwW5IAr4HMD9G6hkwaUs6IOCFamcobsEWAiEA5GeMmp1Tt79bWglK3TAwBrNuS2U6BYTiYc+avAZ7IQs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCv5sCRA9TVsSAnZWagAA0sUP/2NJtdz/Jhp2Rurwsno3\navCDIh1Dc3/NR3kzJ17M4oy2CoCrjCWLDuo5lgRGdrCM//9HyBLgEtKNlFtx\nHSm3th6FVeITnndSGAI7nlOg17eaAVCUSlJnw3ptxQYv4/upij9c1WQ00f7/\nmUut0hGgGOeCjCCILDOvZ+TxcOmrmEUKZCY37lldN3RtVL5s8Ki5AI4ZNskn\nI/1L5YhYzY8qQDW0BwZu0km+cALbdjTuoA1pKfrTbMvHM09aGC5oIKnnTNPE\njEEk31Q0ZPikcd+k2k753mpXIeimgAPfbpay7LZElXEnsjD8Hw/YN+SbjzKE\nyao0zeJa2cvxjy/i2elPVVC7GbChRnzMF2n2Bmr1oTkycTT3HUNm+3af3xfs\nhN2z5SAB3w3IKgEpo/bhFN45D3LijSoTNtMHKO/hvwb+8e9fE3BqtI0Z6+0+\ntEJpT6ebIrtrKR1oacsCCbH5Gxe8IaHzQ8lpZPMcDBq8hJVlFIG4PCIFIzbl\nF9ddry0YpxQ+iNuGKReScorqxMnd4ADgKM6yEiOa0lOTMNrGKnm0lWYzqgrp\nCrBECjPp9UB0hp8O5NrCMjmkWk72QfThfGYbGO45BdH8ffS2cBmCZSyRVICc\nuTDjiTyfL/AkSuZHsl9v4SdIsTCl/Ehb9+aCZYYUPdTOGEY6jdFLqRNS0blO\nUYhu\r\n=oLry\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.16","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-78107d5-1611333166732_1611333228322_0.5958523881907725","host":"s3://npm-registry-packages"}},"1.0.0-canary-f145574-1611433260321":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f145574-1611433260321","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f145574-1611433260321","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"25e6f000c83f6ede423ce789a2dceb6bec3518c6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f145574-1611433260321.tgz","fileCount":7,"integrity":"sha512-nL9i/TY6O7EQ7xTu46/H6//wBQC9sgxRgoMnrLXEbM8HgNjJyvTo8IciCdjChlA0Oj3Uc/JVJLCvfnD4EQO2mQ==","signatures":[{"sig":"MEUCIFxocKClIRCO+tILQDNUrXygHRgljMaiiQ21XJ2gtf2TAiEA66W3Mw4xRA+MPb91gK+7HHmcH+mca3BWkKqqxeKRhC8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDIVcCRA9TVsSAnZWagAADJcQAJAvGvLOngBR9ew8NJhF\nlAPFLyCiymYiXDjCjotWGZpx71PNotnA/9Jo5c1ygzEUBaoX1cLW+PUIWKG8\nlQs89rON3ULvkJiGGcTBoaqsFUFTlbmxd3V0WQbP3NyOCRU8QeTSGObNENFG\n5ZC0bmOmS6YcCmDacIW1tNEiV4cJf46Kxx7h7eS/TjRlA+joM8prmnV+Idtb\nZxoS9ijPh5oJOqgrtgXhknAxxV1zu64I3fswcN+crNFtxKuQeKvzCvyQRw9K\nXTl5bWb0Mx6m7H/Wt5b3DOFjz3B+uTWrt3oGi1BQz1GMKtuYlbaTuXRSJo36\nxeaQF7GSS/jE+Z6DhIN6sOsGaKApu/bMrOSd3N8OSfsoIF3+KU9Y/y1ENhPp\nbMMTWpSCoEtgBHvEXTiEFgcrG/aLhLTTd7eoGPNk0zHJ+Efbj45rEJl/T8eA\npbgFicWDkSw3v36Ki7xkpy/6nkcG3ZQiBcKa9Y4eJqkZoP1l0q8+AyOO/NFi\nFHICzasamS1rWH4td8J7EXn5bYFIDm5H1fHSC9buyO3k9lltjn+Ecqef0aJ1\nX2H2ViyUMj/wgOLm/j8t/dupFjyOOJozcafkDCY14xX/UItT8WJ9CNrk84KV\n4CrumZcwDL92JncyJoTaz7OY5qK+vu4wq8jnEAxMytTfNJE9zrZ+72HzSeSA\nhQE4\r\n=6ojA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.17","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f145574-1611433260321_1611433308111_0.6835068254497674","host":"s3://npm-registry-packages"}},"1.0.0-canary-f145574-1611433263779":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f145574-1611433263779","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f145574-1611433263779","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0ef9cf970f50db562a16fe691410e7319f33e1b9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f145574-1611433263779.tgz","fileCount":7,"integrity":"sha512-RUr9dnmXCNSSvtfiohrsJ0wKhfxLpYho4uxj7Qkj/+P7HBBId5P5nixfUG1yoNH6ENJwIFFOO7MuI0Xzlxgr6A==","signatures":[{"sig":"MEQCIBEC6XcB7TWvh0/KzSqTUon29CESGzCfBcIf3Nc8h5NVAiB5kurbbm/R0nbqJC8mM4IiBfPhmfz5+bsgKI164PajTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDIWcCRA9TVsSAnZWagAAFKMQAIFfKpEZ4saFKaTqhcvb\ndRBcU5vehIVOmtjwoLbfU6gC9nVbHXJjpRuIl9ZGHqkwv6SmgzUBCUSypfu3\nfuZZajXLjAdUDsnO0oX/cMO8uMguh6o+BGVN5YEnA+DGzdYJCux5WdaFOwNd\niSwr076hjeaiZFZXOP3MpYMXzUtGjLLJib4udOEy+C/Z2vJtU4bEIq/t4iWk\nTE77CJydQaIwCdISu8VM54ACcT1HcfcJ0RKbWVBzI2/sYrkueSsbbw26RnRy\nSaNYn4lq9jC4jArYskt3bXc5n4TDR/HgDu5FjJ34P5Qo4TMDMKOobaOCVK2s\nWlNqe3KryYnRvmF8PHr6ZhmKmIMLCDNHkUGfeiE7nxNV2ZsWK0gVPlSJjSiF\n4W9lLr3mPK010Zs5MySgOKXPqk5QKqow8YQCVerVXJQXuvRes7gORNnQ1+vw\nqv+xpH23J2WyFIErKYrz5j2GHvPWBLZ2ye9XAbFnlGiaiiqsjT4LePPItBhH\nvYBoXaxQp4thvrANMZcA1JjavIA607tnMVNlvFxjZsa8hZ0ZND8CNxPLCS42\nXcsgUNykEBz3SGNQcSupR2Ko25sP8DdZAx5ObFDZQjMnOgJ8WV+IGePi16A+\n6FC8vCQ+bKGDkXyJBMaEHFe4Kvp4Cbc0zZadaQTcsnBUY17SDRDZDwnkGrZa\nPOFe\r\n=XDtO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.17","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f145574-1611433263779_1611433371765_0.2691655218598499","host":"s3://npm-registry-packages"}},"1.0.0-canary-d2403e4-1611478568646":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d2403e4-1611478568646","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d2403e4-1611478568646","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ea4be9ba18bea2387c5d55c5a49fe414f1af0f00","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d2403e4-1611478568646.tgz","fileCount":7,"integrity":"sha512-kn+F+JkxYK8gXoFWeWrNq2H46zdKxEca0HEMvCmfRTeFcjwR5HloP+pIwzVw1TMNmkV+eLoAhpkWGn19tIjEqg==","signatures":[{"sig":"MEUCIEbkmB0kBSbnqorWRVGLJfhOeJNuaJ8NcCkNYjatJd9gAiEAu0wB/IyWBSl4VwtHnG6TOg2dJTVUAJoEMLoCl9t2kcw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDTZXCRA9TVsSAnZWagAAGdAP/3TlIDZTmRdjQXXykBs7\ndDmsUsfZUllCSejlGrNzeEvfujbhrhuz23HMVQUhg57Bd5+JkCpQuEhBKumT\nFpBHK5YW8dd9Rzr3bBAzRA0hTTWjdYDj/IcOgOQzq8NLDcq8F6dYHJQL76+8\ngPVJGq0qWaHTP8yGv2NaPoJXy9nsm0DE5eU7trSm2MhcMqZbikWKshViHqs6\nhkTgVPRcFNF9U6jGP6/oxuLfvGcilMTiDj4X2NM3nHv1Zu06uK3grGemO7m2\nh/Q9FC1eL7Yiwq5zJAMUBN+k7qvUqVbDvKTOAM7HnvykG7v4TkdlocXpVuWH\nC2hGli6+Ah6E8Ff5z/BDpePZab9DGDNjOvKrjmhvzVAHV1JvOS/1eUd4BmnG\n6ogwK10I87SNbu1xofuGFtXdLQE6K8erS5AMk7ZbynqgUehQp7WEilFTRsdV\nu8CkslH6CavwBS//h0PSK8VTkbOq755zEu8IZDRKC7xAf9BSa1nrIlUgzksu\n6LASte+U39+4M6tgbbG/48nl3Nyc0YS9oXvj/IyjHfahtw8aPCbHlc6fS5XD\nOLOSAG3R83Rt50r72elcibsX2x6Lwx3mx1ekjZJpdkLMcOk+onRdqu/ksYBh\nH37/QSwBitbsNmy73l/M9mq3JNdVlA+GMVchhubNemmceFIU502Kkfl74it/\nC/sW\r\n=Jokj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.17","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^5.0.3","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d2403e4-1611478568646_1611478614273_0.5972950857796475","host":"s3://npm-registry-packages"}},"1.0.0-canary-a70d686-1611517253537":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-a70d686-1611517253537","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-a70d686-1611517253537","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c98ea079f1f574da53c46cce4eddae97de419a11","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-a70d686-1611517253537.tgz","fileCount":7,"integrity":"sha512-O7dFkqSuxFKcKa//33W+MsIY/RWA+Ky4w5d7AfOCLbRsBiSSDcNXUiznLiWKIRapBm2QoOhC9aHbYTWXt8Bpgw==","signatures":[{"sig":"MEUCIQCEfkKSoXwL+KXO1Ns6dcmSdPHKRYu2FdUqz6r8WUiDpwIgSyvCSPh/Bzd1cfo/kYArY6N5QsswIWZXoq5CHHVH5rE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDc17CRA9TVsSAnZWagAAt2gP/2FAGBEzsZXFnPh+7/12\novzg27nm0YTk6E1g9ZfMGrEEIhivlWVC8TFNf0o9R3i7tXCRvqJNtYQmmVCL\n2G0v37vPc/Iq5Y5BTlMrKsn477KLGtM5exSX7n5stexoj9OWCFilpaZrXWS9\nzH/K7G3RJpq784HEl1kCNckaG/qeFUdr8M1gCHa3zOzJaiMvVgvxAa2tskUD\n9Y9EW6ZmL9K3ru8KeFctX0YzsZMzItAhPDOrLzefz72aiEqY/UodhRyMejv3\n0PyMI7TO7VvgUYt/cFZVB72co6hfz1jBjYElJNiGwnawRdGb4GHMtmzVRD5o\nBwMvvsVIXbI9dH2u+IkuSDw8spOfXWcmdRIjJ04BV7lJei0YgjTQku06qzmU\n9MP/d/9pzKptx1UlNlVk+CVdQMydJDXVAf11qc2kADGdt72h5AFIUrAWRgD2\ndxBRohxfU0P+Cp7vHVQAZAdwaCyKhbvG/fZZbfIT2+pk0ytLchRKlKclQ5mg\nbYol4Zdxm55S7eQ3/l2fR17Y51kTHDxbJ3gNBMeOlMgLD7qsgGoyJdvys2m6\ncb6106NSSKJCnbBqhp9MfKhygENv8X/QS6vLc1EVeooEf5ql6VV/uYeRY1O6\neF+iPhyyZ8yM3Bpk8ZbeQYLHq1oOGU5cEH6CH7DUyAv7kmvk0+YCOQ0wKkKB\n89VQ\r\n=Whxu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-a70d686-1611517253537_1611517307377_0.10040895315851461","host":"s3://npm-registry-packages"}},"1.0.0-canary-a70d686-1611517253226":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-a70d686-1611517253226","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-a70d686-1611517253226","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8cba4784801fb94b25667ee0ca15700e397d8234","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-a70d686-1611517253226.tgz","fileCount":7,"integrity":"sha512-g+6iqWK8JHeDfPJs6OgHlXRsg2MiXYZP8IiVksM0RmsHwzLk2NTxdof18/R2DCC5RQQSX/woiVWa3oCIqy1AyQ==","signatures":[{"sig":"MEQCIHB7DU7UbCJyPc0zQiBvLQqVhOJO3Qnth0cbIMkp9hgKAiBgXLYlIHqBKRd2xT14cTjAkCtEtcPz1ch9ideIVAQ+4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDc2FCRA9TVsSAnZWagAA3+gP/Rch1EuJ78UcTW83jlMx\nXVm8Idq+H2ChPRuf9SttGbsKyAZfJIthQ//QHi4KHAGX4hZD6qB4wozJ7vg6\n+yjwRd/x3aSvFJGUwfZ4AMhyNoSyKq0uOjfLoa8X9xwUfFaGvSmNHVuZxWv/\nF49IAdbCxOw1i+Quf3CZae11H4xn4qKbrQllMYkdbXydXT+0qONRXKZRPh0H\n9WvFoMlHBIr+7EGB1rXDcjy+C3yK3k8b4gOw9qWFGrJL6tMCjpdT5P5B0xpn\ntnt8wxJmlYxW2s+8zZxVxomyyREcL7KpgY0lquWdV188wX0OvWNeLFodfGod\nr8WWXaq/W/lptKTAuucmVBcqXLFNO1G+asPv30fNF8ryYofH4oX5qxn4oQUF\nvnXzhKwplL67a7QYN6sV/vIq3xVgBT6ipynYU1D0gjxnr4ux7ruH97eA2sVC\nFapoyIVB6objwnoVsDAhslBHzm6jUyzd/yiC9m/2FHrV5TVM4jc1tgW0U/v0\nDHMCZ8g5JzMvwfto4r2bxNtSmb66gNhQxJjBfkk3USKZBHLuAngaTs4+Szfc\ng4QK8yIb+DO5xBpU/DTtH6WdwfWp5BBi0w3+s5jYUk1VmYWducTLXFyvJM4d\nNXzMmZGCIaxDUp12cwuxP95MIV3scS7Y/94CVQ7/CbBm1lp7mX3C4VGvx28v\nwWjD\r\n=QTR4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.37.1","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-a70d686-1611517253226_1611517317214_0.40262054546776205","host":"s3://npm-registry-packages"}},"1.0.0-canary-01eee21-1611571665816":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-01eee21-1611571665816","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-01eee21-1611571665816","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f4c52d17de9a85caab9339368017b6ebdae1a629","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-01eee21-1611571665816.tgz","fileCount":7,"integrity":"sha512-+CpItoe+oVxx/ZsmHTWPcJsewMdLx5uy/GeomVekUyY+WskXZzMOFoc0yxcra/aYuRTT4Fo/ezHvhiQkqgupDg==","signatures":[{"sig":"MEYCIQDos3wcp+3Ff9d/wGgYdENUVq4SQVm0f20vYNVeVl8EewIhAKNKKO6orVDoN52Navk6g1x84KjJuXObvtPtQlIgjuR/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDqIJCRA9TVsSAnZWagAALrMQAJJinqjC+2c4NfUMPXt7\nq1uKiuGk94k1hq6SX/a+KEQlsmwtAAUyXpjbpJ2Rl6aoDZWM3arejegXQ52s\ne/dnuYyqy2mEMfHQkIEI6gjCRjGmitaPk7AdiqMQLIIq50zTO5fdQWv5uFyp\npFu3wmw+3jI08O3NGikmh4f0jxNUgnL7gimptC9EXm3oApgDrHWylJjWet9U\nEQz9xPzo765ZaDJF14S5nyXt8OWdRvV9hB7aonZfdzlUEDFTm+JqoxtVNWiG\n+rZMvGq5TulQdtCbs9sO6b95VTyUroKGCiK97sm43c3Q4ANc5N1AtTwvLm+8\neuMt1w5JhIGKfXJaRwpBeG2vnaLlSS0C7/UTwcY5HnuLWutzOJpdCmC/fmRj\nUcZ5AR3avwFumMikBGJ/BAn5lFy1xo7eI/c6snL2xXtB4q+PlaGjYGCob2IB\nSLlLxpg//kJWpJJEPPVLTSwZOdlX4yhrzmds4jKyzuAvj/M4YP5JqgmtgbZ8\ns+fcBXOWXj7BdQk+vEP4mUg7q3q6mfZCvTJRi73B965RNoLU5nLOK2unMNKa\nFSbRoj9r32dKeP+LioGGwUcQc6+Ta/37RT46bSUtRYksWcMoZ5/+R+DpN25f\nUJgOu1qbNzaESgVQAH2hLMszi623EcED3sTKoVNAsFgyxyH7qa8SgAeNyj5q\nLiJG\r\n=M4Bc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-01eee21-1611571665816_1611571720499_0.9653794059627792","host":"s3://npm-registry-packages"}},"1.0.0-canary-c2e20f4-1611586330171":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c2e20f4-1611586330171","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c2e20f4-1611586330171","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f0c3e12c12a6e3c0110e073e5cb51e3f01090792","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c2e20f4-1611586330171.tgz","fileCount":7,"integrity":"sha512-v+/ppUOKdPhEbVU5Tk++F9FjBIDQl3mCsak6oSxwgFfUBa1vxzfB9pNchqgwwXjY8qQ4EbFd9FDUfff1h2T1Xw==","signatures":[{"sig":"MEQCIEdj0SJHvsZUleyacOaRJS8vd6oYk6iPclHj2Cm6N1Z4AiAm1iBeTy0vqtUODxi9JbBXLC5lC3TvDipYrg+aPqHjmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDttRCRA9TVsSAnZWagAAaP8P/0p+kdizNO002DI71vj9\n3IvPe4EWpt4cP3c9OUDfhBWs8bCurRCNoKF8skR5IU44HI6ZdOBdNM1XBZtp\nGiv/11cKocQUhQgSRt6zYm28NwtCQIlgi+UzmhL3Ccgk2sVJCTbILTWSGddI\niq/HY5nJb6VSb2D0HuPZltpRgfAN0JM0DIzA0BFB2XMVyHQXsmNI4UYAsTMB\nmElitH0/c5G1fLrZQtc+hsILGhGVw7SgOQ/Xs5rgaNxYuAybQpd0OHKxuKZi\nuvM3gvO0Q1vMf03eKtX82jnW19IPVII0n8/R32cSPX51f0IkJyADqDxv/vaV\nZbPAhDrz0FOZukXOM0vKEzlTgCGLdcWcY7a52Vr600GJ1+RusKTqRKA0aMor\nAuWY8hg1W+XCTtQ7bNDo7ViT7+dwXWJTr1N6Gi0VqV2vAeCeerCtaFGhucG1\ntjGU4m3Cwvw9DxkLLDA0DTERDrjrtkNWTtUko6mniYC1roYC1V+2xccRDW7Q\nPCd9QBI8N2lDlvPHc7oow3AjUlGs77TB1By15/xP03tWkguUHrWnqiG6/5qF\n6VLMpohU3sHbseoeBxuTWKBM+8p0b4oGm0m1quLhlBPqPpjLPDM1r7lMJaD9\nDIetYNaPD3ibDT12CzMo9Q1fRBEweTZZnbDSKLro7ByhNhbEyj2dpR7YIIHI\nPncW\r\n=884C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.19","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.1.3","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c2e20f4-1611586330171_1611586385059_0.5466558099852028","host":"s3://npm-registry-packages"}},"1.0.0-canary-1890b09-1611591136751":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1890b09-1611591136751","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1890b09-1611591136751","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d8d6b43b90dc43e9680f0d00b337c70bb751e2c2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1890b09-1611591136751.tgz","fileCount":7,"integrity":"sha512-tRpMzFBppwVYk0iLXyn/GVyk2P+pw/HbfYdLtn7dnOiKckIfosSbswXuw6b8iLnXWuT4xFaNXka8ely7j8oNSw==","signatures":[{"sig":"MEQCIBOcvrALDAfLU49uxoOBFM0O/JU1dCKZOOs0GWj3u6etAiBWkSRfUHj9V5IHr6vq6M83LH0A9VrbnBQHYMvnXNd9IQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDu4jCRA9TVsSAnZWagAAgtgP/1fIfF4ccRK7AU10wUgE\npfS6GPNtQaLFrwSxGm3yK3SnlYEEaEHuLSqpT6a+6n27nkxZ3BBGrTZPZPi8\nYRuoWsAR3gwvJbEhrrT8nkLI1CZ399W83+fTjxJTY12N4Q4oMvHAdicUWhAl\n++C7WRRzuqZmbG0+8F8Y3db6p169l8mnzEopbVpEaL4Bw+lrR0tmizcTLZiu\niIjLQ4LsA3yLyimL3AZ2I3mn17v2fpE2U+OlSQ5xiSe/+JB/Vf+snyJ3rXHd\ntOaqbAb2QqOxan0t/HVjpiyAjzeuHqdeRXkCGUama9Fn5lMbtFrFfWjFzSNJ\nRlQlFLmIWXJA2yWk/FFOugcCuFLVPJC7y0mwsH7Rw2CAWiUXV51A4EPK8b0i\np8KZLgzJajGhVLtZWvWfQ8N5L49UAW8Lf7tRsBNtVUzEw9TOV30+C+ixwV1W\nYDIpTwd6FknHMAfNvMKBoI6JDRdpIKL4geYn6ay+sLfQpTFhHqwGva+YigUX\n2LjuYNmjegx3JPQuucfVpw+kL7yih90THU9zP1cFaB23PT+shK6qp0nFp0ic\nlJQH+20mVOTxt6VahCXtQO6HdedphwuTNoNRNjWh9s1XOQcBPVx8RNv7I0Yd\ngTKI16ZhEeVlkP9GewcrzxPlfgiaxXdNW1vBCeh0x1+g3VcHWp2XIoUW3bzs\niavK\r\n=+wv1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1890b09-1611591136751_1611591202813_0.35029312937071344","host":"s3://npm-registry-packages"}},"1.0.0-canary-1890b09-1611591137036":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1890b09-1611591137036","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1890b09-1611591137036","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"109c126aad4965d66392a7493f9f27fcb747a595","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1890b09-1611591137036.tgz","fileCount":7,"integrity":"sha512-xcw3Dwd68xSZj3XYJ3blGr8OSlHUXkizbMKuw7XFhIAwsdmxJiAEQwRF/El4EonufhFiPEWepBJiarYzrLtrsg==","signatures":[{"sig":"MEQCIFWafReGXZYSWg2HjkYASVaabL3RDo9MH0lPIr4rPfKRAiBxvhdIzCibClm/V6GGyO9TJOYI1FXphb3Pk1OdUaSAXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDu4xCRA9TVsSAnZWagAAihwP/iDq8uhSNwOLQDfWY3fQ\nEHIPds2Pw2H3sTg7r615ud0B7GbHzObSvKobsrIBwscbMOHTp9KjRt92E4U5\ntQrkZvKj/LIh2LNZ8jSpU4sHSjW4lmoezAC65uoMHOiysPfaCHr7eaba6ddo\n42wmdoZhVi/yjWZCUZ7T8qAaZ7elgyOIqOx6O9c6ezq5+KUAXUgkcUTSWWkZ\ntkShB2HH3flGVpJbaOYWaFWevDNB0BMHt7jz5BM9abP62MlJYfTaY9IApErK\nriQTXZBLr2bquBS5BwwHvPRpD111ssFmTx2ENvQN3463qUy7WOzH/hQJ8I2V\nVMZ2z3WWiKRJGRb+X7xpuEGSxLfViXkpew9jGUTQ9xT1loucG9bQAgfhf26I\n+4+l1sbHOIMvNJsqqkOCfoX3X+rLnrKxf0AGVV2KlPxvtYin3EQ3+L2gSGRu\n/THl1kv3JhCPsl24z6Doli5buELOMupuyXyAVTZvNpEu6J5BUDRa5TOsIYID\nJxs6RVPqljOxrIyambVFHJKpv3fXcjgQcQpioJ+sgYjy+Scgu9YVRLcp0Eji\nopIJo9OgiXAKdP8xESKbC4EnYSx+25d73+PHjQBAMWNoe7jWrx7VmQe1YOoX\nliE/qVs/ANgFraXxyBCfyFD6rJVuz7TmQBe9VAt6rMbYfqDFBiGmMiz+Q4DX\nTt1o\r\n=14oh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1890b09-1611591137036_1611591216851_0.7301898390238728","host":"s3://npm-registry-packages"}},"1.0.0-canary-accde03-1611789349345":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-accde03-1611789349345","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-accde03-1611789349345","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"932139c19788824d60902c0af26a928df1efca40","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-accde03-1611789349345.tgz","fileCount":7,"integrity":"sha512-i/G/sW4HoPiy/HymRB/CNxAZ055uCxJz1zIs6Xcc1duIBtJMSXSIpuM4ZI+1g51QCsWeZsy0mIZj30R1Y6gVoA==","signatures":[{"sig":"MEYCIQDc/zrjzAFmZS6ikB209sLhVTGHHxuugScfoaOnZQBgMQIhAJJfxsCFHTHQF+Ltm4Rg8KjQ6CGsbs4A91bEdHLsnh+k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEfRVCRA9TVsSAnZWagAAJwcP/1QcVNHPO/u0vzIMIEv6\nJHSplfaTLkbdgZBeRtHOvSYU8eOvTmf+UcNUxvskPhr2BVzIKVCLjxENTBAz\nGVayTmls3w/GBdosuVD6a0tcYiA344P3xbhkZnIjLLN2HDx6+crheG+VRSJc\n96aGnpJW/kDCxUo0/l4iHBxSrA61aWvWoG2NKQiTkP26DBgJ70NwXhlKhN8G\nknCnyLiWfLE2YfIyGoqPfAzX5FBMeA5FfowYIzuyOeJav26KkEkOA+72b4cJ\nFWi6gH1qIsfwc8aB/27hLxZLVn5/XajisL2/72HwGrgiCYiw1fnLC0Kxx7x/\nGz3k96IguZQuNPm+gRA9nMAEPfLL1Q5HhSaHe13onNiDuI1ACkxWfdFczOnJ\ngBLi832qBwjySD15L/s2aJdzR1eC76sVzotntXX16p0s2PJqjXs+y+zYUaht\nh0W8xukB7M+MzNScoP+mJKKIT5Gl9yAZ4P629ouKky/1XQ4d1OaG0WWVqpOd\nvyCnazre0VgNUF/dcukiD2/fBE2DVylwCODBGOu0HQfhJGqiFugHVOpeJVHz\nMB9ikSMsBlB0io9gbI0D1enIP5ZlC9UYzIZJD0znmLKS5iy2NPGNE/5d7fcH\nlGpiOxgwz9j+80tabXtj7WFY7FIwFDRE8HR6RG4FCZkqcHOWQ6BLb6GyYDTZ\nJDv6\r\n=SH+L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^5.0.3","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-accde03-1611789349345_1611789397362_0.6636121082076238","host":"s3://npm-registry-packages"}},"1.0.0-canary-36141cd-1611789349673":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-36141cd-1611789349673","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-36141cd-1611789349673","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a8b00f45d99ec672d660181ce4e2cfa6c7008ec5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-36141cd-1611789349673.tgz","fileCount":7,"integrity":"sha512-2T9xnSpKXuAIDDJi4eRRA4wD1uqPluxItSrKz3XY7i0Ozmm0caLsV4Wb3df8DpLYF29lze5xibecwqyNtust8g==","signatures":[{"sig":"MEUCIHRmX27wola/jbmNqNfcxrNB6d0uHFGC1S+40mHW2H4YAiEA7XvxXnHn0qrnYDKaReizAs0n2WnS6/oY0H2FpBHMqcs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEfRfCRA9TVsSAnZWagAA/L8P+wXUMEdd1QJEzctiCxoa\nfE5/djqY6T239NWMpqdr3yBBfc/VmaVvWL45eOEqp66o3kMaX3vGlZQwLyU9\nNECgBSOFf2dPP5tQpmdN70tR57IuKfBhUHovMjz2iWAH75bPuFS3Lyw+eH4/\nnrciNTfLeZJominL0u9elZmFQOURDDy0zDpxLvk3xnIRvt3oGXuypCIUYVJW\nzXENoJB8Tkp1Ke6j1mkUkkJmi97Vr1cd8GYWPF//ONfD5Hfjw0TAE/L6Ewh7\nHPn/oeq0tyRSVxpa3r9l11mSu4nnfUnzTP8abIlqOZpMAgMh4usHFYi1FrnL\nTMWxBgSTOITN3btWAquD9zG06QN96jbMQ85rMM5ctPWMzdsgbgtjuEX+t+q/\nZUBkQMCKr3egK4IgYm2AHuKmQaVQuBGfZ5PAmxECMCcLCLyCqm7h55Igsh41\n6A4Oow6AfpFyHCatX3cZMjr390qZGU4QVBtFiuf63BrTqdRi+JU6hSj3i53x\n66A17uUnq0TxIM5ynM/MYF4H+hWl60+/w5Dwd+83ZRdcXV+vBpVnSsKXNAxE\nEJStWNMMdagix+VVgsA0TjBcC2u7owm8hdgTwVMRS7bVAGflY29jwTZpqN85\nWcRGhV4d6vXbg+cF1pbl4AZJb/hRbGh+rqbeJL6tFfAYADArT+MqOkHC+NEJ\nlBuo\r\n=b4Gb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.8","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.0","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.0","ts-jest":"^26.4.4","typedoc":"^0.20.19","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-36141cd-1611789349673_1611789406971_0.8034971994097029","host":"s3://npm-registry-packages"}},"1.0.0-canary-eef32ae-1611843835215":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-eef32ae-1611843835215","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-eef32ae-1611843835215","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1832394eb18eff8f8e75d206c7e093cfd7eb52fe","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-eef32ae-1611843835215.tgz","fileCount":7,"integrity":"sha512-J/wVFii4XHi3bjoA9e2+v1OMKDQ8xtpqdDIx0FPy+Fmb60KhQpp+3oxwj8qQIraHKQQgVkAnSXYebTbedvnkTQ==","signatures":[{"sig":"MEUCIBsmpqLL3uMTggn1h61J6econsrllZbhquJwgGyuHkWgAiEAzB2qzAlkqnnj2Z0l7AhXkx8UVoAZMYZ5h6nAjfi5QnE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEskyCRA9TVsSAnZWagAA8TcP/0lR+b4XMDEeHOEhf8ba\np4janii2r/58OA5hfnjhi6YTLNOQh/W+X2HhGPuY69im+k3/aHBuOyr+S23b\nyYEibuU0IxfZ3f4HvHGaYR2LSpHabVfpszXm9ji2b4jnlik52+YhcH1cZDbZ\npDkVHhPZeb7K2XG9If7uRCLsSyT43Q/bpr/B6gFWXUjbV0CPUfwRrtjooWYr\nMq5zPx+AejptDrRDZHuEofe8QNcoob47nsRweX9tuYgASZEkBjdV6wvuswAa\nB+ZE4cOM7YinXnG1pQ9wh30iJjM3Q1+rvNETPjtJtpVAVk4f+pRvhVBG5rwt\nSq3/aB29UhEYdwzJxcO9F70HgOma3XD/VXZalVWjI5YdII3bYEiiNdTsJtRp\n9d1/WU93NopvDHSwcOCFHMihlnxys+ZAAHWNspwHMR3c9LSFjLtTIP3r9fT7\nY2LbUXzR3TaSPmK2RRTIC35CxdOF3Hsd28CtVEY+0G2wh7xD6p0gHKDtzAFN\nWTqwJutxjStPhs/ZE5FRVXu0DyNITfUl3fY67HRnu9NSc59uTFxnw8Epecfw\nOJQGVkisImPv7PiwU88UvIXjzS6uWM02LPGoLlpkMVkClqKNz0H/5RSQWp5E\n6oOHUmkMjgtOTkt4uZUYXF6r6w/uoWj1qtdbIfzXPWHu5KM9FWo0fJwRlawm\nniUc\r\n=AYr+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-eef32ae-1611843835215_1611843889726_0.08556207272674787","host":"s3://npm-registry-packages"}},"1.0.0-canary-eef32ae-1611843840915":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-eef32ae-1611843840915","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-eef32ae-1611843840915","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"55f53b736653fffc7ba1e9f66f1621139701ff3a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-eef32ae-1611843840915.tgz","fileCount":7,"integrity":"sha512-QjL/6RuCtT3rmpu2OFM/EGukBHEPrFqznpQOJyqOwU0z3Un6SRjgtEjHzOuAIRkbLSNfgK+Of9JcKo74k6kiPw==","signatures":[{"sig":"MEQCIDaFVDykH1qhRd2pi3PN0POxG12w3PfOzsNiJO8jHa8NAiBZNDrBuvLDO9GFClfFMPycuC62Fw3DsVD3mfeSM2C17Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEslECRA9TVsSAnZWagAAA6sP/2XavycA9NvuG027Z9Ew\nN8+MtWtxvPD1k4zjkVG+d5iiZCwT5ETJcneUXbT1RMiZUyBwe73gMUfVeBfy\ny4NS3oDSAF5+yeJrFHh7pEiaKaMS8AzczYFVZYXFwxAOgo9aH5uEdMWs3EpM\nutq0pG9Re4D3Vm/QVJaoT0QZ/UBdi7rrIEbfZ0cGzCmtOdGSy7fWhUEYHzPp\neqqfY57RiDYYBfA+bTGper52C0WxRbEH5vRM5JedN136BTm9uc/1eBXR+WVG\nRw8m18qz+d23AdiY04B6S+He3hl6WZwUP1dlWzQHS64SIzXG2IHpgIdT44bq\nJoZ3thq6Dc01W//hvnCkqWYmka84xVXitDrKqR5pgnMOHVhGAC5X5oqatcTk\neueFJCj9TqXgMN0PwxCHqSXclIn89Z+C4eFWnsrXts9sxixqlyX/x4emHuHS\nCkK4+Ed9xt02ds1SgeroiUD2C9TLicQg6VmN47fl7CM69h5zPfeMPyuScNku\nvffoN4Vz6UeV+peb4DJ9a2nCCp6IWYRNYMMmS9nJU27LZ49iLBungHbG5VxF\n++XI5FBwU9ek2jEWQnjRxr/0GSZTB4mxy147v+Ikuohl6YJ+u/qYwDHaAxqZ\nZSB7R13tkuCFGSuqcPyaKB7rvdtgts8xzRz3I5AgKINnMFKvgCvymuTaLpkn\nzOhh\r\n=hd0k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-eef32ae-1611843840915_1611843907626_0.7466305668520155","host":"s3://npm-registry-packages"}},"1.0.0-canary-d87cde6-1611875751780":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d87cde6-1611875751780","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d87cde6-1611875751780","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2ce11b10dceb9d893d10f5a294f17da5c4dbd7bd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d87cde6-1611875751780.tgz","fileCount":7,"integrity":"sha512-r+zMPWSJIZIrhF81ZSxflYdRTgr2K/JqsnECHk6eWwUDS6stLkb7QvT1dBZyW7BM5fpkOZ/xAJcOQy/MPVZj+A==","signatures":[{"sig":"MEUCIBmkRvQqw0/GaBaUctLtvKyeM4GUO3oEfw5Cmk+nlCxWAiEAkmxLoqpJ5IeawNNS8uxBLDjtnIdvJ60JtN/CMeqkoEg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE0XbCRA9TVsSAnZWagAAodkP/jZBOdSIoMpm+OXXWtBY\nL9uWFVg21mas2q0jJt6Y5MfpdbixsdvpcCiQdqTjolM8ihCFr8EBAwCIKCKS\nt/LUXOI8G/yUJEjZYn8cPXyshB/snI/o4uFBupFkZKutow9yySQk0o/nqsYw\n8emYZUEQUEmev41mHLELxwBdOIJ4WdvTYHispTRg+HTa9/DCr3c5WvwcLFxx\nQnOVPeAwxcRr5t6QERi+t2/r0YSoR8N+DGbeuwbHWO5O3xsUItZzCof5bV0/\nB/73QUrGd/kJWzmDJSVeQipVyNBy8JPQiFT2TH4iKSip2NBlUC1KNy4+tsTC\nBzGO1bI5Q00jMUHlNAOC/p3bB4v9kPCBt87qLrUcEJQ2t3rTYu4lCzuNDgD7\nZah2F6WI3DDNVKcf586ed9I2lHGvCXz8gQFr3fQU3Bi3ms59sdgC0fEqvvdL\nJ+VTL1auoEw7rzr8PcHJJ9NM215QjyQIjNn+CaTB3oB56T8A2LUMbYW0f6Rn\nO+JIgCFATW7O22DP7Y6RydrVqWHmd+z39lIkPTn3Rj3iRHCgH4RH7wQnuh6l\nJmuQ04I2y8yAhw5Xwe+yvQsg0AwIfHAS35VeYU0QH8lyu/BYCYkkxHLaONfW\nK4yEMoLXikM79zJPDS1twEKfHlJdQfDHh3nso29pSKSBlLDwT6lCku0jcdUS\nFJXB\r\n=cp65\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.4.4","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d87cde6-1611875751780_1611875803375_0.9633772485776999","host":"s3://npm-registry-packages"}},"1.0.0-canary-1aeeefa-1611928474176":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1aeeefa-1611928474176","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1aeeefa-1611928474176","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2b425a95f0681557d9db1ee77f1f96c83a805348","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1aeeefa-1611928474176.tgz","fileCount":7,"integrity":"sha512-HAN2i9+f36FDXbIhImP5MA8Oeqvrt4veWice6MAwmhI+YcmPlYQZyoOh3QmM0HT0VqCW5oNPgzxH7Kva5qx9pQ==","signatures":[{"sig":"MEQCIHrnccZ5KsjAnpd6vQM2LjeZVzuV7XEy9UZhXufexC/oAiB7AEuupxPOnXVRhI4lu2TABqLUtXiu0c0Bor53WV6PGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFBPUCRA9TVsSAnZWagAAC6MP/242ft6mhTi37zCxuw1+\nNYbZburiRL/wgKoVA6t7xlqEWZnQe9RrfkKxWvSr5kCKycmg5A50IYCRVPLd\n/H0/Zc1ptgzcgbz6V2FqarOSeU8k6DHD19NXWfEmAE0S9XmMKvu/bDzzHuK/\nhd4jmZvU5Xa33ETpYNeACU81xvfZcN3Omgir7sL495jBEyN+D0I6f3yPHHK1\nPACBT0sb+LG4nDsQbrWF3kLjUNARV1N5gebvdTxmxr4nJ8LBvtEBDVsE4lbI\nqRCYtyEUxuoqDRIbS7czbFqUaBgEpJjLOnCNh+pcwIb7b8nRg7LHyV0rHPaR\n7OKfCy+aXAIBE7hfe4lL4Mr44R9FvDlM+pXdLbY041NM8Pieog27e171FFCV\nXPwqmJC6cB4EtBZ0jeOXBGcJl5RQgkDzMRypmg3+qSA7tT9ybfHrEK/CZz59\nOFv+5BYoTWEXFHb7749vs58KSjH5u/psp1dQ/DR89GE5TvUqRL9nUu+HpQio\nQDi3iJpLhxla4VzPhOnmhOcfDtRslmQ8khjGaYYnI2wTzOjW4k+754BTsTTV\njmjCD6EpWx00RYDOWQJIjOxMbsNk++Ujwy+eF60qVXCw2P7fi+4l671hf0Yz\noySqoUlXnlAbTBm7zHYrrZ0ObVWKOKDhyQ6hlWArgWnbD63TuxydKD2qr27h\nthWa\r\n=7b5s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1aeeefa-1611928474176_1611928532084_0.4590626007824168","host":"s3://npm-registry-packages"}},"1.0.0-canary-1aeeefa-1611928477131":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1aeeefa-1611928477131","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1aeeefa-1611928477131","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8ee71569f284bb609c68ecc8850a20f4bf85acf6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1aeeefa-1611928477131.tgz","fileCount":7,"integrity":"sha512-yWh0e6Jftnv11OtDBxD7AnrIiXk1+sgm0bMwhl42Cof1aA6lJP7YJJcm6Z6exsTGAYpu3kP8BQQ/7IGRxeeubw==","signatures":[{"sig":"MEQCHyzj+ISTjvoWAyh5577Is47CJ8yLxmE9ucjGwBdAmu0CIQCMYupqM5QYjc8Z74iNCjTXK5zTLo5rLlOB+5VSwWSigQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFBPhCRA9TVsSAnZWagAAQMAP/jUA98UV7WlY90P1cR7B\neo3q79ctNxCXvkdFFnmeZH8ueWkpEoNzovS3VT3TYtASmFQt84LVnGlOZz+9\nX9YMb6BewKBNmNjPX5+6sUk1FgpzLlRy9YDbTPGxPn77ETRQmZ/L7ZZCYgTt\ndGPx358gEtKIJZe9drY75ZrRuLOyQId2EBVwfIicTg5Q99yHEwpeEqPYh6OC\nYfUsavsw3CZR4Yhl1ZHyHW4qzRTJQyBoONYBBCP/SdOA4UEsrF6xcbwZgcRG\nVHITkeKwV+uxjd1lg7uHM/nH5A2CFM7RrKvQXxzBwMTLfWwl2BYzCFoRtM12\nKVKlZC5s20J2lGeh7cInRo2C6v6rzvxzuIaIvXMFGb2+VvPUdHauFmtu834O\ng7fsVG0ZXgHy/vctXsu7pGJv6nLajVGvENSCCaFy3nq+iPpzs6/GTYZjaYdO\nc84iqfQ18J7X8FGYa31QudUkAZzFO/3QPlm5j+EfQdCIhdEuO2flTT+7UHvW\n5J4v30CPiZaNhjUjyu+KIqjtP83I+/KCFOeyRRJ+l88N5dktv3QXfZb4OQ1w\nvI3Da4UWsrNCEkCSE3IHxji8iP3EFob/BFblXkWtu2SzGsGcyvXfFoaj/gOH\napgUAk7CCpqVBxSV557lohF/dV60YJuc7TJDwRqvY4STevXMcY+0oSeDdlYh\nadsI\r\n=16H6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1aeeefa-1611928477131_1611928544956_0.4385670028776203","host":"s3://npm-registry-packages"}},"1.0.0-canary-0cc87fb-1611930463979":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-0cc87fb-1611930463979","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-0cc87fb-1611930463979","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"61838a8efcb286227b3cdbf99a7d74bc38cba0a6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-0cc87fb-1611930463979.tgz","fileCount":7,"integrity":"sha512-Mqna9mhWDC7aySs3+PCfhdR+t0swFU9QlxNWGyxMcf8/FvyrODp+DE/bB6gHSw0PE413FQMuMjvDDKf5uC8TCg==","signatures":[{"sig":"MEUCIQDOVbYPLvo5JZnqoyIZMMJZgFXiOviYvrH58Jg3XyXtZQIgLCcMp55zrRR767ie1w7/E/ymf2CRhc9WJG6OCBVSpBU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFBuZCRA9TVsSAnZWagAA9m0QAJrroLQZ4our2MrnBKos\nsUBaFxFURHfiXZnaMYMI7sPjYD5xhR6tue8rMQ9ZaBxO/r2Fe2NO2dv/Q6uA\nfDlk2ri6OYqB+QNW1V5XAUTeHMdMlmHivVIlasZp9mDAYIRdw177y+PchNPu\nM6MR58D32bsjG3/PZIXadgKDCe5tI6IL1fDmuD/vwOZA5q4JHWJvPi0ojY9a\n/kxjVUlEE2GP98/Av7p+lAeb4GeGKyLFi/0jsjScOLEFd5EwfkWuKxJL55Au\nlfRhCKS9Q1nreuoJ+VGS+PHP9CV9kkTImlWiZSSv+dm3C3z9wHUhCKDzPldX\nv4XfSnRhnZ4BYjqWf4p23AX32sivrr7QsTpmORmGTi/PBYb2JlXte/Yvv1kW\ngk6ZPHW9L6HC9h8Iz7J6W/6kfaWK8RxC9wSdO3VQtl5/9JIQnv2LEDzvpTfU\nCIw3PrGeWA+TtUd3GjNTcQqac5I2Mj/rBeD+UDsRmHX+GFK4Mxkoq3iZAI/a\npr0KokujDEqealjkqOSTj9Rsythm2IuhkJVGZzHbgv9REgYuQQK7W07G2GNC\nBQhCJvbnHfLwukdEl0vOJxp6nwCzngU7mchtmK4FrzizTzEgiDm46FgN6sUW\nrA4chPc2ACJdbmz23jS9TbCo6VPGFsRGY8nOLAznJjd63cQlHMv1iij/Dn+t\nSAfK\r\n=HpGd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-0cc87fb-1611930463979_1611930521210_0.7972176836794336","host":"s3://npm-registry-packages"}},"1.0.0-canary-4cb16ba-1611930846040":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-4cb16ba-1611930846040","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-4cb16ba-1611930846040","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a9326760901a00c64a2c5a1d24c1f5b1604d463f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-4cb16ba-1611930846040.tgz","fileCount":7,"integrity":"sha512-bM4nbElFrhqQFtoZuuMDg/P7G0ojnLrlkyUmG/wGBegLtJERyWXRxWoCs02enCSlTLs2oPWQBcTieDgHgN7aSQ==","signatures":[{"sig":"MEUCICG23KAFIHMoFBDRoOLxruEsyQ73yo0rMtsAVlNFePAGAiEAlwd2zEJJkCMvYpGELNXp3S6yUogj/GieJY4cJ99r6e4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFB0TCRA9TVsSAnZWagAADkUQAKP5EDn43nePaJWDiu4x\n5UkCJHDGjO00zjCNksP2pvbdSRM6EStZ3/sB6dAdZDi8Mc6JkzuOY1/3Oihp\noKlb77Eup2WSYKkrMnczzcXoSb5bAk8KRc71A0e5I93ht+4iBV0fNfATLJo9\n3ONuphsKrrz33fjOUlxBSCvbjLzV7gIDyGOSRlHvHk3QDVvNHwJlMPsNkgmD\n0BhGBwq6Xe+xQoavjLDTfEt+r0/0sDpdZXYTbIjHuLowFQ03iCwHGMHgGQ08\nBHCERLjWbYmkYIEFqqkwKdeKcS7qij6d7dAksyFBEO0SudawuaWH9ylZO0/Q\nQ1YaO+0UEt9b/ZxtS8AkHoJyGMPpWqDJl/Iau4LjT216qVH4ab++Dn6GAfAi\nLQubJ651rHfjsjjdrxNmtpQ3JPOPQNZ7hK7WNHlMEvR8+2RcCoZ7oPz4lCEW\neTsWVHD9gu86asPhGamlShq9UHhyF3/7Nnr7jmuy3oWamiPhyPQvsq87csKW\niWYXgZAyusXvhVg3fRPaffm88emHykaalKL9U9EGqyO7jB0+dJ8yqNwt8uBm\nf3tBnHqV5NDVbxR/LMz/Fgh7UdUHMZjeWeqmfrtymWdh/760mbI7dhBhfv0x\nfmUvq7E6siJQzwNGlNAD+X1VNkhj56etAjGeMK7RZGDtB51mOd7ZLvEspmpS\nT5Yf\r\n=ir9c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-4cb16ba-1611930846040_1611930898855_0.14743657256875475","host":"s3://npm-registry-packages"}},"1.0.0-canary-4cb16ba-1611930851770":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-4cb16ba-1611930851770","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-4cb16ba-1611930851770","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f3d33ae3b9e65ce426b0b54c07340743bb08fabd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-4cb16ba-1611930851770.tgz","fileCount":7,"integrity":"sha512-KlbtgUHI81dL7HyJoaDBqvJc4CpcHcU8FQpLqY0JDDbAbH6QIn6QucuuFeqBTQgn8HE4FqxkjGiGd54wc7qWAg==","signatures":[{"sig":"MEYCIQDtScbvNrixHwaq5aFVhh7DT//JxO1IMOQepLUJg+cOzwIhAMJEdBd3PFKWzAvVmdexxQ/kn1P9buT/FeqK3K77E3wu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFB0gCRA9TVsSAnZWagAAmAoP/3ZfQM8aSCQ6oOPwBcZw\nAoO0pltTn53vx+0olzhjthgM8rh2warshsGl+B0CEpyXUR6027BxRrZOB6+b\na8ONfvqqmOkXaoMh66S8iLSXcym0sxMudWPScFbVznldTPktvv4TZpd7JVYT\njkXJDxUlLnWxbERxS54mRI3cVwLRug36+SoQTAp+NTn7lsy2lPUYwXxSo/Yr\nGnCe2iGVCirBFgQ2ZHc5NtmLcADHGaFDJgiQGY0cpMTnmkgmVqoUYjtqJHu5\nwp7CEfZtYyaamdtjApwFPLAqxGy9UShClV7gMWYortfY7uK8PoXWbbGbCh3W\nxmWZq8pdF+ALVWmTI2LxZ0c1iqvZBSuNlhMNwut4Y2wo+rjrQeuZ8QECsD15\nXgzdBh++vuzSF1L85rG+8OB0LiAR9OFFWr+4C3V4DV3+wTrwAhLZjAShAEYI\nPIRbKy9BakVlkfP76Yx8KVaw7Ry2i939I5Ddf4a0W0+7j5MttvtxsFgEcQSZ\nK1lFiPJvPYbggdn2pK8Q5zZD4aI798vuLhrNKccBtPHdVmbx9+hNrqz8c+OM\nZPOfrTngxnm8+pKMUkz4qmrelc/6ktOs/CIuKWVW1flqZEVB6tch5Ry/lEps\n7DoDpnH3FT9szTajyngEkQ/OvuRbVYSkQfv4mlxqAOLBsl9/S4NYzMtAq26X\njxWQ\r\n=RIr4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.18","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-4cb16ba-1611930851770_1611930912444_0.3449913574695991","host":"s3://npm-registry-packages"}},"1.0.0-canary-d722f99-1612125105907":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d722f99-1612125105907","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d722f99-1612125105907","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1bb58f33d4f0fd10f165a1c576e13b239343a1a8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d722f99-1612125105907.tgz","fileCount":7,"integrity":"sha512-fCyLG48h+aVbjHNoEjmFqK1Ffzzw5MWjRb06s8vNtR7tundGauriSbvNtZZ3cyhGsrqe/tavVQvymRVQaQUGYg==","signatures":[{"sig":"MEUCIQD6kyywduBTn48pLpy6ISCVTMqWqlalkIJrXQnifpgJugIgaiNxfr43r6MB4b1TbuDO41hBPrHgFCaPZspTHDRqK54=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFxPhCRA9TVsSAnZWagAA/tYP/iUoCNQBkCbUgs6KAIcu\nP5h/fm/j5WKrcdNs016ZhDV0Y9HtLnkNTdcBF43HLi011F9CTqHqeke/MqTK\nRQqSnzCD3gXIitG+WuWZI362/Yv8mXZBz5YUu6Lt3nFHZl404aX8ggRtpoSy\n3mcrwkag2zw4+paJ/V03CCPH6VDbjWYUA1+/ZNoyA2L3MWpKAVw8nBvTqRtC\nLAwtuDk83z33PcM7KRHkU7DiVedXNN1v1QeIfjWBtgSBYnUMUk9EqWLukcpD\nfWyY7AQZs5daOOX1VxtH5atnjKeWxV/gndv7gR0oq6VjFDgmkqBA8/I/5Fcj\nZGOEit+fpALZCLXsjh/A0bCqNp3alQ44+Di6JyTAglzcNdx2VloXpMAnUxQb\ng1GJB5FPYa20JHxGByyBYGdgH6LeyV0YijkoeUuU/jKPIdR3zYsTgyXV5I3q\nO/I1vQW+k0UTvyFZktiUYzzPNjqIOEo/CLDBpZXABDKyFQ8of23Y2lWjtkXf\nN8hzYg6XOIXGL8uzH+lbnoowbNXsRRIng6oW2SeUlrpYG4cT9eeWm6sVowol\ny33qOtF+U2xJYSX+TU5kckevicyIL4oOq1Ou/PNWRXWCGWYTdn3pVQLvOS46\nAK0YrwyOv7fxb6WUaGk6viuB0FK6Il+VMOubJA+OgrebmPs1oaG5gL+hL9ie\nEQ0N\r\n=0zet\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d722f99-1612125105907_1612125152951_0.766191978663914","host":"s3://npm-registry-packages"}},"1.0.0-canary-d722f99-1612125109860":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d722f99-1612125109860","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d722f99-1612125109860","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4c02be8cc303a8c35755602bbdf7a16baee9fe2b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d722f99-1612125109860.tgz","fileCount":7,"integrity":"sha512-jcsGTdBDYYJdoRQbEofr5w38gUmudW03vcw69w5sATZ2b3dJyXkpTnZcwr/8SWR+Y71yL8aKPjhrNh3W6iCebA==","signatures":[{"sig":"MEYCIQD2daGxfj9Ssoyc9eGdqmENrMJo95uq6JsS6aCEBemafAIhAIg44oLNPkQ/bD+kMnno+3U7IyKWUzSelPECTdWDlPbF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFxPmCRA9TVsSAnZWagAAfZgQAJkS/cs+9bzS4c9nf8zY\nEaGiD5IZZf9Hmf58gO3UC68YMreBM48HAGssroxQohpygFgwv4AvoxL8zkct\nD/BTAW9USrY/lmBPJ9TRkq8DWT5MIm0W+XeN/w2SDcEIcORiQia5VLBqz6Uy\ncWkPcEeUNPY8agx6AaLrdDUuXfy1aaT3KaFGR4enodZUlIEXLgOGmRp+9KA4\nvlUOXoJrX87ILK2aHucWbKmFqrfH2ybj17zEGLQjSTHqdYc0p+yEADdDZFkz\n/0NmBkgmntEKv6VaN6TTUDllUaIX7m2m5uUUJ8a4/K6Fh800lJ02l8ewMkq+\nXXsfs+mM+4h5Os6ey8TFWSjOWdDre6kkNAmnIPQuq0YT8vuUkFD7LMGDO357\n1jPDpR5WMW/X2F9/3TBuYDMya9qiz7q2YZfZNqawNBUQPzeqZgMTxFT2ClJT\nnyEJGutQlOETJGYO7YG95i+9OKeuyi0+i4Hz9+4kXJaZZtqiY4MkFi/+e6zo\nzNTD58EIabI9Y5c8s0/Qub98AxPvSeJD5MUvtaLet2PNXcmLWhvTZP5F6LMv\nlEq1JgGGL9P/mCF2XLFyaIwsijXJP3DzFy5U4KfFCXfhSYxMupOHp0pfpNxB\n2FDMc8/f6PqKUT6/3JKO3zjchcWK67NxU5eD9MNohWI60ZiEnZ+4aPoePK3f\nPmYL\r\n=JF7M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d722f99-1612125109860_1612125158121_0.9968609429748831","host":"s3://npm-registry-packages"}},"1.0.0-canary-d2235ea-1612171178213":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d2235ea-1612171178213","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d2235ea-1612171178213","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"afef65098f96d1d98882b377885e69c86220b1b2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d2235ea-1612171178213.tgz","fileCount":7,"integrity":"sha512-sTMoBMQFgXnMFqGzPul1sazsfSOUhBGHTc9MEI55yJOj8gAnraThquj57qQTJ2nVlkENXdFsGCVwzfmJ4+Wecw==","signatures":[{"sig":"MEQCIBf39qtGvXTkYLBzyNceuS0GlVMojIlzO68jWdcrwFrmAiA2eI5sBku+53+Wxq+yz9IRUKridot3ErdxSNFkfK3p0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgF8fkCRA9TVsSAnZWagAAfY4P/2WH5MxlH2WvJ5lIbUpk\n7L60+GexCB4FsVwFj2EqQ5IGxZ7jqbKnFCA86o/SqEeSCrJ+ZsPdYgHEXxCH\n3DZYD0aAFxrpuxDkaIbaFduoi2Pe4QxYk1I8Kjq10z+MEmU6s6PFmlT2el5p\naJbUdp8tKzARTjXp/8f38Ql1Oig0qzgC6eLDc3D4EzCHe1dezAQ9k2tPifKA\nYIzqbE9BJc6HUXzefP2QCvB6Q45TRDbDiXgs5rcQFjO6pXbHJqpfSSwzaeWk\nkLG6DeRQKEdp8ZD1ph/szDPxYyeys2nydaVHe0obc5Doha5b9CanLPsdUaex\nxZKHf3EfK9cq/53S9ghrMimJK7bMeyXy7GxIfB/1NTJf+TWQssM3A7KGqiE7\ns1xqEF82Xx9TDrbYTYbsoYKHO9MSNBBE8hVM03aHkQn32+yhKt/NVt0eRGR+\nxP6QutENSmujic9REFSOriyYjEuU7HCEmDkE2LUtpGth85Pwem+Voe/T1jpy\nQaxN/gDrGc7Rj7DUyyrrWBwfGwFiXW4djApsqnf/BQHNTzO/31dO2uuPGphv\nMnXUgOKPwQm5UQK9ILobjy3+I7bFLiiMKzvflwNSq3rRlijpK0xHjabmrVio\nhl0jzwCvliZx4/0plC+x7J4xjNxT14KttcBoDQx11Qa1utDWOZfabftuHKw+\niwPi\r\n=Dzmr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.0.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d2235ea-1612171178213_1612171235748_0.9587240015169316","host":"s3://npm-registry-packages"}},"1.0.0-canary-134a838-1612171616029":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-134a838-1612171616029","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-134a838-1612171616029","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5fda6836f9303737dd1471b4010f55cf5ba99006","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-134a838-1612171616029.tgz","fileCount":7,"integrity":"sha512-R0scxeQh8skBiY7E0t5CnN3KwEDmj/qciBIYPXzM9rMV0gFxVtO8F650sfXHL5AJKxd4UReJv10CY4x1nxZKMw==","signatures":[{"sig":"MEQCIGzx0ccXXunf4LARZk9dsE2vEGiBLth/GE059wG7wzPzAiBuH4yIti6MSMoLSPXgKV0EEPbwxd0vELc9W6Rdfame/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgF8mXCRA9TVsSAnZWagAATsYP/Ap7Pj7do6QUV2UpPO1h\naHbWKEPBgsN3ayGmtzwIE0ejOs4JsLd/azeatZryozxpukgKi1TWIzjuTA/V\nuHNZDB7sQeu4yTO6EXo5Kd+Ustfjq32nkzqwcOw+SicqpQmauPnbwSEHdwMW\nfJGjOvcz21jsgIuAZ4OYdCdV3Ows3tSRr1dUlwQLsh7ApLLM9BsR4BNMLuyC\nfG3/hpVD1CpMakWb8HLvlwe9j5IcBac+Q9A03nV3uamevqskUZnZbtuUTn0l\n5ZZDVdaF97rzeANLct95QPEC5b4amRSv6gMYGG+OCpuURa8owTw+a+CRZCCT\nVT0BftLtRXusOqQKM2fmQlEPc9IWcatiVYM/Gvya3fmKKCVFq+re8agEmaFQ\nSZPpSwfR4/bnCuAoRrwEt5WNS9j7PojYUqi93v82SCUqIGAh1a7ZXh/erBjy\nZNcvHXMr1ox9Eh3yen4LDkMTaf5ZLozH6vAYDN+r0HjEoLHjM1DrcVYHyfoq\njGM2Fe9prJyl+m1TZeBmy6vGhpwwFHynVHwc8up2jl4eNWztuXVhB4qgYocE\nXJ2T26ZpwPfwL4BwE8cCg7vBtp7hyaTJtDuhkIbVJuFTMd2+HDDgKdrSJIRF\n/KFHgEv1fr/kVAjUL/58tDAIW/MblwDAiqSWbycoKAn+6ZJ3bvdpxo3ccP0p\nBxam\r\n=8Dnc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-134a838-1612171616029_1612171670774_0.6203240137219215","host":"s3://npm-registry-packages"}},"1.0.0-canary-8dcca79-1612177184435":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8dcca79-1612177184435","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8dcca79-1612177184435","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e0c7502b89934368f4b9c62cdab77723b2787191","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8dcca79-1612177184435.tgz","fileCount":7,"integrity":"sha512-L0KsmHSDvkFJ0RSOKr0nWyXPiSsBBu/vPiWk3owCwOf5EFQovH402fdMj1iuzGiIZlmZVHAGqj/5CNDNzZQPHQ==","signatures":[{"sig":"MEQCIDLW9L5k5Fj2PujRPpndSoflvHDbsqLPfKaH38+KgaQvAiAdIRQCLFGdsPjd5d09hUn0/mm7aTMEGf9cI9DNqDjTkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgF99QCRA9TVsSAnZWagAADv4P/0AfmH6OKWaXVbJwVw4q\nyp9qDWO0hTcBSDH+rltIQ0u/FdFxEaX5XkXw80aqS2gLFVgw6AZAxb/gRwdz\nC9oVtT7deHFKFUJatm9foBj5W1/bMjoJng6KJkDzCV9nViBHKEwFYtc4DylX\nx5ejea4ROi4tn340qfvEgxqbGsKYEEZVFVWen9+oq9hYHh+iBhxr6VUqwJzE\nIVhafhBJo+CLT/NcCfn2FLnrT02au6HBhi2Jf+ThCYDe35XmDPQmNfbCFpYH\nJBgO1druXjKTu9cIZtits1Tp+37F9jak8zxQTd45fCW6g7vTnVWx2fAh4x/j\nf4jMOnumwyWPLA59SIwEzB/BhXoN9ANZIvfNgTtJZo4/1jCpeZrsIw6D5c4K\nNOzECF0emRfEq+oRdsL7I9C6Kj/EPZ+gE0cjXvWq7cjgNoKGkKomjCrmlemu\nW9UgD3pPo9Obj/xfNrNvPkfh5m1BWzQlHqj6U0HLATqkzxVGWZ4CS/wjCSUd\nET3V5BKZ8SlXYHItuJWddcMm5UkSBh7PNqg6OjMW9By1nqfLCQyAxgUNg6+z\n1sPA3nbf8fa13D26p/ue7YHrQ+q22CzO7/lbEIp5YuC6JX5XcyvSlJi8L10w\nc1ZNo9kukI+fgMqYmOe/92+0tMwNbkeXIu/wgwKazpGoXJtrg6ajyDtfcJv2\nPyLb\r\n=niW5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.3","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8dcca79-1612177184435_1612177232362_0.38808654553981103","host":"s3://npm-registry-packages"}},"1.0.0-canary-f03d3ae-1612221388931":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f03d3ae-1612221388931","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f03d3ae-1612221388931","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"017ac2ff5ce479e0b5dcde1cffd46428dd574011","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f03d3ae-1612221388931.tgz","fileCount":7,"integrity":"sha512-ftifNQHSyn33tyFRH8UBRqXnsQp6Sz/cXblEOJ2l98KYhnoFrcHJDFRul5AVkA/Nf3E6HNIomI/1LVWZIxqY3A==","signatures":[{"sig":"MEQCIAbVdE8drtogN2ZqNWMEV3VRYkICPUFlXX9Fr8oO/cu5AiBHVhIoZm4IaN0sekdYJHauj6J5qBv6mhNRz+IFjCmEMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGIwACRA9TVsSAnZWagAA8/MP/0ULSKJsF5CjdoV5z58+\nTuUhguEeU85BpuznArs59eW4fA2RWIZYsAffL9e4qGK++AdPZy2sMpwnm0Vl\n16vi385f5FvNLoo/MckdupfDzUnJANS3qGAiLNFpLtA04JfSUErlx+Dy7x7e\n8nJ0q+Lj1yapeVnrbXYGY54qHlZP4/nvZYiwexYAPlllN/HZUGmF80k+l34w\nBtOOOfyCHtygZ4+f+R/jpwu33t4nerM4HRJ+/oTJYC1xHvUzqlDfk2zu+4xd\nDm3uOdlkGtiVPqgm//hfJivC7Mnb0OUE6XDQxAFj1t8pnSwDC0TxAqTzhblR\nIAm00tShocyJyuiMujkfnfbrlGixsBUBCsRMwNzl14iI3Dml7JU7iCkc1gOW\ni4dPIm94t2jY/vlD6byRYQL4raG1JQ0qvnV06M3vZQkWmjyvEtogj3DMFhQW\nZuRLpEUY5U7ForMNAEZrNZrGAvVe95FObMxhC0OE9rnQ/Ia0pXOLQHA59VvR\nM8OU9pOXGwNOgt617bixSU+VQNXnu8YJFEb3a1tqhFLfwS2gFhL8/ZDZb+mE\nkSgBETJJ7LVbt36zASyaDvZTzBHRDA18RDZtMQMwO++2wEQcKB5yjmWY5FY9\nVO97kxMKyfI0psJ0n5rZA1ZZCyeyFCRM4EeBt5iGd+KyD5ub016CBQB8ACMa\nthfJ\r\n=yb7F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.3","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f03d3ae-1612221388931_1612221439325_0.023326965208302353","host":"s3://npm-registry-packages"}},"1.0.0-canary-2140b85-1612221401306":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2140b85-1612221401306","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2140b85-1612221401306","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f4845363b1d0edeb2281adec9eb6bf42d26cd7e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2140b85-1612221401306.tgz","fileCount":7,"integrity":"sha512-JY6OfYDxRtt4mlsE/x8ytVVk/qRkY3u3VfXIlRphwOxyqT6uh8m147Qow18+/Qm1LPkP9hQgyqlVGOafkzGyyA==","signatures":[{"sig":"MEUCIQDhUtcfNWhY/KagvfOAzomLgnDQf0c4U2kRImCk0WzexwIgE0iSG0NHVki8HS7omWqZGlg2ZJHHHeWEfeIk8ss8YdY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGIwMCRA9TVsSAnZWagAAtOoP/1fYEYl7P9KdLK/fwCuj\nGrZdrFy8LIL4ZbifECo/wak11CgfJqUTXnHXnJgfutgAAm2ZJBQGYJg1H/7D\nUMsGbPhb1A7JDY20W5ojLEOoebMPVDLygFKyQK/q4gU2mPidErcVzauDU+zE\nZDxnzkmvlhf0jFzaCKplYyd/WvvPi0LOcudLFVvru26CvlFCpNra7tqDrNvU\n0w2qlhNFeI4/7SODHXVz7OaH2+Ylz3acUoWM+sXl86KDPlpH2wm3MPITdded\nMVjKhLeuP2yM/1RgyR7WRn6y3QIFB5kgemcsEz/tJww/BjGThQ0KvZTBkn3Z\ne1pX7yBubHPJMXutcivwjI9dlJ++1ZuEEzU8oa8ffZA6pAnL/Lzh70vBup0Q\nmCVSZAcotfpChZp/IDl296kt326CMZRPlahaMuq8+MudhutLgIm4JO8WFg3r\nPc4KZl4564w98ow0c7tuJ9WQLqdjphD2kxh4uNNFvrd7mc89uXDs1HXX1JhI\nKiU4pStuHI6Pkr3IWfAJGlpYRaYOCkzd2csw5fYrPN00ez2KX7GkcDPMuwK5\nlpj22undP9/MsKgh4tMXNVYSsbX+8xB8TatJjTeXz//5EtIfT/RU+qPzVbDt\n1IeTYqen6LhXkeDHSRwsv0uRjMhTxwpwSYq5LmLAYeKWJcKtOsnUZzI+K5EI\nlyQi\r\n=HA7K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2140b85-1612221401306_1612221452119_0.7321222786231047","host":"s3://npm-registry-packages"}},"1.0.0-canary-fa19ada-1612255212267":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-fa19ada-1612255212267","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-fa19ada-1612255212267","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"99dc1e3a9303fb1969d1c707eccb3f1a23226fba","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-fa19ada-1612255212267.tgz","fileCount":7,"integrity":"sha512-g1h2uhW7/id0FvRnyo03jWyyVG69YR3IQiQKgE/VhaYYc42hb064O6P1FrjcBUqQjmnR/zYe929qkD6kWo4dmw==","signatures":[{"sig":"MEUCIQCujToISvZfRvFc+iKLy+RyQ/SPhJLFPtPvFEA/DvLEewIgLqC8KwVwd3o/vqEIphIJcXXUuNfIuY3ty+vtdozyZEM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGRAqCRA9TVsSAnZWagAAuYQP/0KVc3XxAD3ok/cEIw3P\nAsDlsJPkb8oI3D+tbeWWA7jf6+OVu7PchxXq0qqBeBPHR9uRhxHUtTSlWEIq\nSvX9tf2yq3M368bIaBb3JNeUHL0d8Eqmb8z3g2UosjSxyAMXDCKBwKzuBnFm\nbcLrqyn7eaEjEMv4mLokpm2J93mwT4JDsBq3LQjHXXXl1zDRJQAZ46hKgxwz\n4um1JZ/8n+ogYJ47ZlJc+ei27bh6Y8tBEhhPSDrW3d8S233Q1ImU+UtqVjzG\neFvb8ji6TT5+SB+DKYtB4v+Q/fvYk+0EAQleEeAS40HX203SzlftIWbBWi49\nMQ51elDrySbSBKDDVe0Og7XVTCWTZqO5Wl6tzAyldU81spIShFXCxt+K02uc\nXaa5wH5dXGA4qCCArqGLIkWQctBWXNqIenxTzvDhBWSnOgv5NPcBJEIgtaq4\nLoCC7sOREJrQuUSpjzOGVnSXkcTzpWDnWEIVw5ThqGSbR/2I/NlgkcvOeV+L\n73Vy8Q23B//Cj48xXbI0VrmgWRhhnwBmLkhQZRj9JD1Wd8bkZJqbLILrrgbB\nkOpjuO7wPT15j6QMniwMs+QufcZUhKdc/jDN81hj11ZH/r3TJ6brkT7UczWs\nTjP7qcJGqqTh0QGwMeFpyNnod7uyS0rTOBNxkoZ+JaIwM9cKxut34pnm9pg3\nSclt\r\n=kX4G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.4","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-fa19ada-1612255212267_1612255273618_0.6162939080446532","host":"s3://npm-registry-packages"}},"1.0.0-canary-7ac5529-1612262929719":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-7ac5529-1612262929719","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-7ac5529-1612262929719","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2c01cb219f93822dec44c6d4178b616827a03cb8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-7ac5529-1612262929719.tgz","fileCount":7,"integrity":"sha512-L+Wol55qO4Vn8rLzBUhKw2zDl6vt+6ljRnCndkBQfttZ4Jbo02/w0kP7dIRkWEUuzYJep1xpFx+bnZ8Z/KrDkA==","signatures":[{"sig":"MEQCIG1m/NMPOiJeWmkD5GLOhM+jxZMu6Z9kCnxSHDI7ZTACAiAAue6cNb90z3zRBnFKuOmK5/bQAB8+nWYlRi6+tdBiRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGS5ECRA9TVsSAnZWagAAFVkQAJK7mI5rvwyjZ8UDBheD\nkP5SVujuqU9iRcJdrum0DELkGRq1RMR7nwKyBaIHiFVNGIXiFIirTaykRa+w\nFdkwf+xDPrMoUVebWvfzvy6NR+t1oMoJlXBNcCgPOw+17vya0wL3hXvu6RwA\nn3yemteAi0wNloDInswYnnAc6PWLLWnuADTwbVvRgWRhv8//vayyCfT+dXl6\nyPnBqe+/s6bnm3XusQRDEWUyn95BthRX6aVRxiRAw0FZk1HB6RpGGGECZWEK\nscTn/bjEQvN5p3Sm3UWVBOIU6FLeV72Cbw3FDHezs4SmIZfqf0fQmNqh+7yj\n+LCIHC8/oGqv6uE9RXtIkEblWOlNOIGjT2CAuuKFfOWehOpIk5CnvZHzMz1o\nYJjA/2aYkzxu/n86luiVhOUlfro2dR1ya7xze4SJtysEBgGLhx+JWlhHXndT\n1Q4TlT8Vu07EUeE+3CqZtnNFSVAIRRuelRFCSgWxTESpUcsnAs08SI2rj9qV\nrCv/X2P5vp3B+VEgCYn/abZfw9vBwJFf8yXIN2LCypzzF5S1zfdoQjvqFvas\nMgI5H2yKu56RfL/1jxDzYINLKiHL1Y53Ch4rnxoJ1yE6pHzPE7BTv36Xv0/M\nhbSBwrd+LrJy2sTvnxM/T1YDhTIHptbW/kHsDOsaEKjH8S3UywiJ2hrghyzm\nvKcL\r\n=IYVi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.1","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-7ac5529-1612262929719_1612262979505_0.7138606903170781","host":"s3://npm-registry-packages"}},"1.0.0-canary-de0a30c-1612282289651":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-de0a30c-1612282289651","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-de0a30c-1612282289651","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"184caa15698ea3e5a4e9b9096576b0081a619aab","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-de0a30c-1612282289651.tgz","fileCount":7,"integrity":"sha512-9Arliqtk+PWQCKxWcPSy1iftNBx9uM4qoWkx8ka1l35i91GdfIL5atQ0HpjzRFJ2NtJ2+E1mqHRNBoeetMV/Iw==","signatures":[{"sig":"MEYCIQDdOgTYkKyrk167ea4wy59xZS16/Wa99l/y8o6DcRlJtgIhALjcic/4M8inkypIQ8TCOb9bo0TagC/XZbDFdFd1jM9w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGXnhCRA9TVsSAnZWagAAv5AP/j1/+0TxF+nPg/DjJNPr\nGLRttHVGwF7Vlx5C2MsxCj878XJEpCUj34TJAE/gOeMXwNzUPl0yJq1duNpF\nXK9/5anb5tRLnNU9mIYTmXJXUNyxKwniBbF5jqZ4yJIwlaoVw1dmaDMeE/tP\nV2Y85AyvBRTCOkH8MQTo5maZltwEwUxPIBVblAYhNcZH/foZnt48Pj9YP+iy\n8GYGiip1zBVOjtMk6b2x8yMddWRWSCF79NBYiQxY6OV7Mu9ApP29pvjvkwSm\n6rfIU69ObQXx2n9jCz7mmCizGwYbiLJ/wm/KrH7T0gS7HOyQrzrg59cjZ7IU\nIEzzo2KwzjzMiDkRjwpYMjy9p3bkBKs3ofwiuTHTlRyqBEaf1BJk/IPS17+w\nGLnCQbiQ5aZfoR6oAd8XvI3+EV66PAnt3RSLvoQ5mK1uIKMnW6jdC+g7V1mi\nxK7dEAsNd3PVn9VfQLB+cH94tAb05DzM1o9G98Sbje+dm4ASdo4+Z9Zsa924\nVmsSh1LpR8vEOcv5XOIwAlj4x+MpXZUBigA7LuJdSidx+gKKLdAMyMKA/8Ko\nwAcm5tghV7n67jf9an9cFE2MRnkLTOvMV1RsMX2l+PjRjkg2omfZsTFm60E1\n25ZEqkDY7gZO+C6OjaWJTrf+qA3Dfg2IGEeaVCUseD9gT8px/dcL/Oijtw6n\nIEaB\r\n=H/01\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.4","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-de0a30c-1612282289651_1612282336738_0.7768858053404661","host":"s3://npm-registry-packages"}},"1.0.0-canary-b03e253-1612355587521":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b03e253-1612355587521","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b03e253-1612355587521","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9fc8ae9f4f57983c1eddf3932f3ca28a575839d0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b03e253-1612355587521.tgz","fileCount":7,"integrity":"sha512-xMpLHJOMpDjrztZPU5wpAtc1BnnNTmq7FAbuPMDoxGySmDL6TifrMagHKRaZMhKh6OC7/Cl8spa6q+hmoAEpyw==","signatures":[{"sig":"MEYCIQCpZ9HqX1VOYQ1j/VFhaZMS7u9nZ5A3m1hndyIVcAdmwAIhAOBJiqbVSJNgF/kTzhzoOl7vzoT1HMOy0s+WnTGoc+4k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGpg6CRA9TVsSAnZWagAARHoQAJrkeoyAJ4+Z0HV/fMQi\nV1e7Wwz9ZpixLrcxcVyy5IvhwAOpYcPs6d+NpmEOG/qfp6TvB0m/YSj27Udk\neWOy6s+BHPs7UYyJb1NYkmxoMdCMdrvLP20Haw8ne+U016LvJqSL7QAzkqDN\nzfg+D+MZWo78R0jkL/Hz4M3Ev7odCDXHpNVYzyQEtYYJHwsrE68WRoXJC0E1\nlpOBw7GaQvurFzJzqbIh9GUFHcORywusREPDu+qfSxFRNEOub7fubtj22NMY\nOHE9tuG3Lxy1JG8D4G8ShrybkQsT+xoQf+p1i8MKriitsC5wjjKsTuSzin6n\nfEYTuOHSOEfyv53/a3h4VKSWUTbcgL+rufC9QuNwSEsyfaEI7QXHsi7ihARw\n68fq3odzTAr/Be/WDnTtn5hhDOmERp6ZGMY9ulVWw49nADQBAYkasqJWa2Dh\nr7UA04cyd26uQZYttiGJZeiISoFxJ834E6ZMFDae8knLrDW4mQz4L92F69hQ\n16+J3QSnBGW+JRYe31c0he3AtRWafIto7ufv8ayDPxjR1srsgYaiR5sRPeb9\n597hZDiXz0i1AViLKw51h4d3IUfODtRRSsaBzaj9eHRSJPWEK4726DobabfA\nMTw5kzmFiyMkbYxjMwdQwIX5NzAFhTzsnEHBZ9waBheq5Jr7CtlIekunn9G7\n6/DD\r\n=vUUx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.4","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b03e253-1612355587521_1612355642123_0.5921397623944973","host":"s3://npm-registry-packages"}},"1.0.0-canary-b03e253-1612357205782":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b03e253-1612357205782","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b03e253-1612357205782","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f2973e4ed284876b7a23e5923bac37160da4fd4a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b03e253-1612357205782.tgz","fileCount":7,"integrity":"sha512-nQ5NLLFowYm4uQpPM8SdKOfcLXjl19xkH9MhOD+NJS31Kpb4sVyj985Drh17hM9+BvUNNXgl7YWPKIa8PF8yeQ==","signatures":[{"sig":"MEUCIHw+9kCWQm4AsFaBNe0mHILnbe94LbnXs29sPLSAx2k6AiEA62UlsGqb0gsSFjFFB/2UnQt9nufZ7QZlfbz13eFXVa4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGp6PCRA9TVsSAnZWagAAbFsP/AuJuLN4FEWCT4NCFUxt\n5kaVI2lrW2RqNUYzxnhWSJPZmXk+pPq8a6Av1mjLw2TRRSGrMaHv9TYZzSyz\nOlaW9dT1j8i6pa2hZ/vhaW93/bhJaOnjAHwwRrK5rucNqlximihELawIfeGi\nDPm7OKi3HaDIV2fylpxGVBf7Ow+bnM+frzYnTCIC2BmIccr5I5+FPJc63gqG\nAfbPJIg+X3sLd3fUBpxxMVFgsJPIe4/Vc1IGC2/vqTzLEptPD0kWPSANEYEG\nag/FvsRaWe0smGFK/C9dqtdfmn04bOIwiFZwiIDyJhRqPJVScYmFI7SoIcur\n5KBiIaWZ7DS6UKxliZ1xUylXTKc4h/Pz1v6TVYYIQ9dXinrIhwo7r4haOoRF\naeZ+zOsRLTq5YZyN+i30buSSZ4lnFmOrvlez/i/ShfWItGWdSgUYFvAnmsn0\nAXJ01xQug7Dxahm5N2On1Dkaw0De4jdo2hvxHwBw/1ftHbJk7oiOT8Dfa7H0\nAk+GOTsGHerXDUOH1/Iv/QxBNaDXfIq/2oeWkwv5dnTtZkUsSjqaOFk1ikeI\nFnOrBBtZiM/p78rMp3dM3c3gkJVTQOHyrvtY24Gv1DfLgRNzCq77LNKM5wZa\nmXSYG4lKXYyyQMaU7w2I3VWLBQZ9UqsB3Um9m/jowQEp2UwtzcG7/3AlnCSg\nVTAm\r\n=VAHJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.4","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b03e253-1612357205782_1612357263318_0.805233735980045","host":"s3://npm-registry-packages"}},"1.0.0-canary-780e726-1612378043379":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-780e726-1612378043379","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-780e726-1612378043379","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5e7e49e47eb4790634a9072ec27cfd6fa403c38d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-780e726-1612378043379.tgz","fileCount":7,"integrity":"sha512-tfysRlFlbKAiXf8cp8IET8eY/0/Trxgoxaels94ay3gzkzwb4eHalO7dklBjzK+8Zz3rpDK2tGs46OhsxJd3PA==","signatures":[{"sig":"MEUCIQD+GPrmaWncSz0hgmfm3Lk21m0PG2RW/4Nt0+YLZg2uVgIgLJ+15B1qkyOzmLADCyMGUOy0eX0mkgaAsJtiH+6RmAA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGu/tCRA9TVsSAnZWagAA3TEP/AmOMpeOS8elTN+rF/UP\nisQUlJDA201mhU/tYEU2Qg1P9PKFgMz5BSDZxfC09Ujtp7a0c9Tt4q54NG72\nMETOTzQpcmHcTKi3IpLC3lkggJPkJw2AoyYnNP7LWKuEjbFGTEl57XiJnYTm\nDBBqvHfSH2wx50uHPBf4aBUdqW/+WyH7ZJ014Fv8kRqb7k3TX4kEpIpgpEiw\nMKr4M5D4qN/mIh4uTKnSomDUo0Mnw6oxokRDoKvnNbBFa4jho0FWoas4Zbqp\n69sSdtD34O+5Ur2GDd51XfnZ0tN2LGYXu3W+3RNNTVpNtg2DitBSZfh4m/ui\nEALL8rN04jwqXiBgihctql1Cptx+FpfSCOTUUo8WVWLk7shthH+sAFo8nA50\n2thvwIzCgAsBv5iG5q0Tr5iLobt7YJ6kIksKdwTOyqiSViK6KpKTMJzVYb7z\nCcT4QqJq6bQvCmwDth10H59fs0fXAtRK1YjJPFX1v6skJhybxpSkzSVjGlFz\nxy0F/Yn9ygYELgwEXKuxQq4xZBXmYI4iYPjDpi4bzqWscIb+ZWlUAyORb7TU\ngOIhxdERTK+MopejeMi2Sa/lLRfdXGvX7B6nA9Dhpd+ZSvyeno/NvszqdJFT\nQnPTYlEpToR+zDs5/6fDUnV7I/Ujr11VCwx0dTm7duzYNRwySvmcLZ/I99SQ\nhmpm\r\n=K9k4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.1","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.4","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-780e726-1612378043379_1612378093060_0.908758899652802","host":"s3://npm-registry-packages"}},"1.0.0-canary-95d6bf2-1612443124753":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-95d6bf2-1612443124753","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-95d6bf2-1612443124753","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2fb89290d5013a9f651ca642cbd6f014511fe8eb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-95d6bf2-1612443124753.tgz","fileCount":7,"integrity":"sha512-HP6R43FHzBQ0jw41uWOBOuGDeNilfds6lRbfR4Ab/MEXJs/MNjgyaaDv/4YB5poA09r6kfHh9/cw2C8U6vSDzw==","signatures":[{"sig":"MEUCIGKtzb3q+2THayfJrSO7CReGAGcRksDCLcSy1GuDBnGvAiEAnUf/RKQK4fTvoZQo/cdUov2XcFltCdJ5RkCTlv6VBXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG+42CRA9TVsSAnZWagAAl5EP/1tZ0HsqnKvmrge40ENC\nJRaBzvtMrd56f9ZCxIovpjOyjURSuyNqqBoXnpzSRK1WzmgKvD0oAu0tIrzj\nyrw3051VxRhUvJDLV6z4B2IWsIqCvEORSMlbizJLCJrbb1WS7DND+yI5kDQS\niegNNs9QsEhnnF7ow9XG9425dyRkCLPwBSL41A+rg9tDkuU/FVeJ1p/enzW0\no9yPNVuMj5U0DR6RoOd9wNK4fiIBtZKe2nSHdIA272YwkzMSk8WvutMn550s\nEQRKPB9ptn7c77gM/uhQVMGpkUxblkP9FCI5l13xU0cHjoXpWNeABwO92gLP\nRmqAwuSffpV8TNuymrsF/IZ6GWVahUvmTzSCqwZ5r6Xm+ng1yWC3fCYgmu5c\nUZQEtw0Xmk4oNs+QbvxZdygmGIV126J4l6lcIgdUk76b7LM7jGwnoYGGRvpI\ncaoqN5I6Moxye5qTVcB03oUev5HNOXiJg5rV3loo8ThdTpQLujLpBaayiK5x\nsKLO707vyuOi22mVAcLwaikmtfjhi7ueOQf6lVBBGKRxIX7g0B/makGSXq5W\nRvLczwZHzxMqcZKlDZx1ddB4KfQDtI4naCsHJH0pPKGASwK3Vl60JIKwBwmE\nxDFrBxTD+fKyIGdWrbdl3Qwvgm7Jf2VzOh5Z3ddBp51Nhylcc4rqBZB9UlR6\nRdt9\r\n=wI/Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.4","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-95d6bf2-1612443124753_1612443189576_0.8767515653099156","host":"s3://npm-registry-packages"}},"1.0.0-canary-18ade9e-1612514200035":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-18ade9e-1612514200035","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-18ade9e-1612514200035","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b2bd362caeae2857471e4cb02ad6ebfa811a7490","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-18ade9e-1612514200035.tgz","fileCount":7,"integrity":"sha512-q3xhWVb1wn8+FWZB4C7JhnoImwUBeJ++rCHRMOEz1yKLTWAE2Bh0CkXix4cdrA0CbovuvbfwRy44wwhiWEG9qA==","signatures":[{"sig":"MEUCIQDe9K4RD8nZoXKcKzcSteFO805fyUn2QoEY/cLemNDnpQIgfznYODZebNNmrpzhtUaQMLh4jldP+va1oPhizGK8uB0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHQPUCRA9TVsSAnZWagAAuHEQAIF86nHhvEZoowry0EzI\n6udL3BlI4r2jMx3jEVeOm/COF9KX7sp0bkN+tTWAVhqCfSAg7ZdbgQhQ8YLZ\nv5DjFx2kW4RwxTJ811+J60qqVy+eOdbPwjFS8vUV4Twtn2IDpSQcSgqH9iH2\nnJVzQfgnPQtqpWRKIyPPPYFczQAQHK7WYD4WdR72DxKWCM8ytPYnNxNJtGUk\nmnaI4ZzS0VyW+IZ5tDHRp2F3q7nbAMjvu0PM3ZUV442hQsRfSqvQI/8LbsxO\nWjJTcmj9CLKm322E8olDSa3i9arRaY1NZOosHMmRwpcofl3EPWYGOhINzQsa\nYGUyxMKLihsuhAF41TXUmZKdyKA6+HClwXhEijBsVTlSZyfxYBQdbcgcIIDO\njLpQJJlgyzgmY/y3Ykzq8bKFvhJDRXokxfnpYK4ghs2GuFP4JDQbWt5/IMRQ\nWzFwv2AuUBJXAXXcYCcRLo5FotAu6LqMxKdr1WfJQRl2kGnswtovAcWQSl5H\n2JWtmr0sSJDiYOymqfTpwpzFzm2Q10HRELTxMbxTMrMZudzzBaCZHIJO1+uI\npq5PoD3UCwEOV5ucitL8x2LlWj/LCKEJtpRYSmKwQUEMs71WW0T/hjvl4j4c\nDXM2qA7GuXbV6+ADpF+bwqO8WSVw+3jAzIuHHjRRsvmxEheE+z7ldwQKFDNF\neXVx\r\n=hhoE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-18ade9e-1612514200035_1612514259742_0.19004929818873517","host":"s3://npm-registry-packages"}},"1.0.0-canary-18ade9e-1612514199364":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-18ade9e-1612514199364","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-18ade9e-1612514199364","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"aa5b7cfb045dbdd7bb7f916c89f676d2e907001a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-18ade9e-1612514199364.tgz","fileCount":7,"integrity":"sha512-Obl5cRYSpqFY4ryTlHHza0agw2/A53w8oo0vQv5zsZv1Jj+5Dw3/JA7M+opoQE07aRWDhy4/6nTbwD+grv5bAQ==","signatures":[{"sig":"MEQCIDMsx+5IRnAEDKz9z8Oxx2A0doSm6zHVgP31cEwJznZaAiB7YFZH4pimcMMsTWKtZ7rMuriVfC40cAWFPpU0YBpM2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHQPcCRA9TVsSAnZWagAAi5YP/1Pz9aNka7kHWQWRJCPp\nf6isBjD3PhMl0ouiCi/OLMS/4XPr9b8Ah1+j3XB01BFKenMoT9YF2M8tW9JQ\nYnC/UUAvhTj43cuV/f93xDzbo+JAHB7JzGeZgOZpa4QxOwfDpfdY29S5R7JC\n1d74KRLY3sl4OqT+A1CMfaydWJ+srQO1NCzi/KHPFo9i61MiygIxvwIjL2FD\nKB92ltQbhYFJ57fCw5n+AR0xxJx27hqTBMP/AUuBgmxWksc5b2MhgI76Upmf\nDTH70MRiDa04hIStbHTR5G3Wsm9Drdcv5iCNnht+asZL4+ADP2STws4FrNXb\n56qct4A+8a1WC2dHgRBJT/eWUhAr/6r+eObE3orELjpSKPclBdRIjXZtNmY/\nPv65EfRugYk/8v/1tdFNgBFyxXem2hIkW9k/959PJnnIkAeGwQMhVL7a7NqM\ngItT8QGsbOZSAmpI0wleUQ8qPQErbRn0Ll3Gm8prj1YslpNkxZceTRTewbeq\nXchQZ9eWYDsr8Uz4/X7f8Ygxy+cU1uYSalCfXUv5Mo+A5KcORNVI5xAjjSZK\nQsVtIBlyfmAtWffpKUtHMtIzuZq2Kxr25k9Xb7xEtDQEZP2I+npZ7nI5bWVF\niL9a3pnSMDQ4hdicbSEgl2rbgvxEVBOa3wFsj6SPim5dtvjx1ISN6fMBw7jy\n/w2k\r\n=HMev\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-18ade9e-1612514199364_1612514267491_0.07952652227376067","host":"s3://npm-registry-packages"}},"1.0.0-canary-1e28cb2-1612528685314":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-1e28cb2-1612528685314","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-1e28cb2-1612528685314","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6c4af3289965f38e965f0c044b22706047f0b72b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-1e28cb2-1612528685314.tgz","fileCount":7,"integrity":"sha512-d8W/yQSYM7lHRkUhRLdgeg0gd+vRQ9CBucSw58jjw+HP5gjaBqYwTyiI17V2A5m8H6DzynZmwbM13epzG3szPg==","signatures":[{"sig":"MEUCIQCJcjvXvujVdw4od1hSI9/Nak96h2UcPf/vypMy7zZZJwIgQtLt6N3UiJpFq02jh9IbA7jF7tJkiiDs8WRLYX1hWZA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHTxYCRA9TVsSAnZWagAA4eMP/A39VNWGUeM+Ndc1hD6q\n5kOeiw0tXP7BwDnwpjl06k8urWv4GenuB0T48Zyf5RWRfR02q6p4bOHnwYWX\n9siwye1ilOLqT0SwDLlZD/X5q9RriMaPR1MrAITitkdNypbgGRZT3iKFT9zQ\n6aELXM+xqeXH5wFEesxflqa6snyC4eTAkiYU4L/b4mTL6Bc/d9ZuXrwiezAb\n5eJYIjxHcOfx/6cszs3EQYhfPB+zgINUrwxU9+RwlZOi7ocruBJRaUFEjVIg\nZO7KUm6otwe1phCW3spc/ZMrtj/RqUDIfKxUD+IzQLPpLNNV9AQAKsv51ovF\ne6qNyujPV7ChqVMRJxAaNt2u41i/By8jZOBQhSKsxe98WLPIBs7EkplvCrGb\n4Q+3Jcn+mD4P8UGGeS7u3eU3TcFc1yqC2QKpHJgrPs0TDl6hUWkD+vjiAYRo\neLepqmZFaHHFk0S8XCp7bc+ASytdq7KJFFhfIEnTPsKExG7a0mFUgU+iBhRo\nLxS2eSLqswPEUAF/Ye4K7+/Pw4YZQVz1/xVK/3lHvVCAoUKHnJ/sR663UKK2\nKch3NcLa8RuFcwR1zf+TsPr/TuOCHSAComGaGIySfHNlY2Ocw6rtpLG3bbjC\nTaOARnCn+lYgmy7FLBmYfAWMBUXHubiSqqddY/HLjhOKqmEE72CqzzuoEayC\nuGYO\r\n=HoAY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.20","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-1e28cb2-1612528685314_1612528728104_0.7094445179229469","host":"s3://npm-registry-packages"}},"1.0.0-canary-aa084c8-1612548389374":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-aa084c8-1612548389374","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-aa084c8-1612548389374","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"60ffb0465e546cd0da598b3fe4baf9b0f67b2232","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-aa084c8-1612548389374.tgz","fileCount":7,"integrity":"sha512-2KcIjUvwC4oDatwAo7k19XD914dAbbQe9YZZLEp74qdFxZBzVZZhjM7TtUNDwHW7qe0sQ+Yrmv9wMVU5NbmGJQ==","signatures":[{"sig":"MEUCIEwTShPG16OL2OsfiwF2ngEe7tQbKGSqIoXDnPZWXXO6AiEA+o32hvJ3UUOHbAjAZ4HIi+mK0DFakvXVgQV/AWtD4OA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHYlbCRA9TVsSAnZWagAAdK8P/RCAisEqY45A671wy317\nxGHpqWETG1RPZ1n6oE91UCIF+5yuLuhzdKJ63HpPZ/4obo/9TecMtzZQxg5Z\nn7odYyw+DrApnJ26tuSUhdTS06qP64350RGs0V9uc0EqoUgmAt4ftLubmtXc\nEzXst1CicZyUeUYUZ+4YpmCMNSoOgN49gq6gwY2nqBVYpG97R+2g1NByRG9v\nc7tXQmeaLJ84Q5/eBDI9Ffo7xRYXmH0BdUVuy42D8/dfgLa2h9DlbVb2HJcu\nFtaeSgNJmYBWWxsgyBN1CmeTzb3aARNFpx6psN69Zose9E5EDGUq1gtUMpXR\nKH7/RjiE39DeTsfh6DBYblxIt4gd5d+DjQkWZkG7lqRzYlSCdDbhfTIlj9QX\nMM0AOuBH+KlQHgBhevY5ZH87Jr0nw5lb0xFHnL9snRthTbPVZE4PBf4gd5g4\n1KWjIxZAdK9FjNVEb/P/o82Nvd6Wvu+IHwdZFWvsnTXJbSAIZFx/v7L6AP69\nR+AHR5mFnUquVQ6o4QsdHBQ4X+AlNVE6+mqUo2Q5sEwYej8baVeG/xK+Inyd\nmnImqx6L/gTgzskTh84ONcQJhhhpZ5s+vx7SVU/I5AVdn02+upyiGRGPtt+e\nrvYMTz2MOCTgoMn6dYfDarN+FG1xUGpip8hhPEYCpE8d8ECZLc+LXVJwHWbY\nTKAO\r\n=qjeH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.21","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-aa084c8-1612548389374_1612548443332_0.6241586139980009","host":"s3://npm-registry-packages"}},"1.0.0-canary-aa084c8-1612548391303":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-aa084c8-1612548391303","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-aa084c8-1612548391303","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f9225cabcd88aa49716a6df90e56888be85288a7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-aa084c8-1612548391303.tgz","fileCount":7,"integrity":"sha512-VZ+8KYSdx7rKzlH0/hRvmGhZuRFYpf4P8PTdNXVc5qVXtxaLFPb5uMh3QoPZi1crCiwwcfCEsaiDpbVSgFYdKg==","signatures":[{"sig":"MEYCIQDO/f2q14zesDCsHBJtzKZDkFr1OTBSmb6HZeod+mCmbQIhAPpgF/iOpIzftG4A9AKp/Jb72MvnnCLDaZdQndDSPpAy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHYlnCRA9TVsSAnZWagAAkZ8P/1N9D1n+n160Al42xQ+c\npenfi+2RRp1Z0syCdyHHPVDxLcHQ+AXMFKx2pObH8qIM3PRL7bIbsxMxaKG7\nikosDJJoLQh899+FhYqKPGPNeUsoqgApoonI5WZyyJnZPiVDhkUgZG98eiKz\naAL3T3nGKIyuD8SCtVwuG2iyj1TWSG6FW167MJTFUZs4vOAa8TowUwN9O/at\nMw7JY55wDTwXN2a2w/gZFFa+0XmG1AAAA/eNvBusy1xbbAOzvrOKwDTCG9vU\nZL1dQOpK7cpERYd6qQqkYixNQJOfWB6md9UwVO8RE+0x/CwU4VawyerbaBxg\neHULWVoL09px+mUeZkUDr36dbnjIU+uP4YhsALKUiB06Z2QDKXNOMHNe93Hg\nCHA8yU7Dd/LDiYgZihgB0GvIoC1CodacHydGmsh64JCWXP/vkZUzkAf4cZ/m\n/EoRNzK6lexrMggVVZypn43ERTEtGhlN0iG38O0oYuNOHeoIlrnDFvsBCkte\n05rpu/lF7UG7WVeZXydge9Z11rX1ON97dUlnfibhLXDM2dl+8bfrj8WrQn3E\n4L0zgXrIrD3EkagPYWxNirRy/lQqz7uhvdKWJNCtXJfahud7SEBrlJFwT/RE\nPya22wOiRcznnXserlwW0h/2Aiqv7sGm6z0A3AHknd964L0uY0iLAk3YimyF\nl9YV\r\n=CPlX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.21","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-aa084c8-1612548391303_1612548454631_0.8399678893075442","host":"s3://npm-registry-packages"}},"1.0.0-canary-14f86bc-1612628825786":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-14f86bc-1612628825786","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-14f86bc-1612628825786","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"765a4fb2435a4f5ac74317e25cfe32a0c879987a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-14f86bc-1612628825786.tgz","fileCount":7,"integrity":"sha512-OkEn/ocjGj/CcZeG5eh4jC1uY+FCbL1URNOUoYqbq9v1+k70E2j1GGgExNtUG9tSooVrjNU4G02B2a+2POtWlg==","signatures":[{"sig":"MEQCIH6cclzDO45D9CVW81HKCaUrjclFl/XurYImH/VElU/NAiAl9joD2grwQ2pO2GxgZeioI5JEKnZto19KjoGeZoDqYw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHsONCRA9TVsSAnZWagAAUJIP/3C73QsLQWyyFCvbn1W9\nhriJ4TFNKp+kJxo5zCKlRUOZocA0sO7aiz3aS9hZEOTYgSzePA40vy+cfkoh\n3KyBtmlsoh0gBA4VwjEPMQlwzCTwWJlGa+XI7efk+Cx/RFGZeW/MFqOa6o7y\nmzTbKjNn3D0BBpabdjSLWE/axZpPnRlrfld8zMzHdgPVqbCI9YBf+iAwbbyk\nTZi2SIWOZjle2uA0glukXodqH7smW2BNjw452kS6kwnm2McLW9MCfzUqkrRO\nsxepA8526Jvgf1iDEDjCJEqaiXmYeUq3M12ChoP5xzmqj9ExTouOgQfNlFMD\n6awn69E5CQOQ0+4zWRxIXG+xp2bca01gBwgwUuHlcywDYZkXke+cZ2elRb0z\nk0w6If05eamqX+IoiswTtiDo/kVebcv9XPncry7Uh4b2bHEc2NDJTA0Dinim\nHCQi9xJMMij2Dh2n4yHZFTntO0R6O64GaHATcgRAW8D8o7TR5v/91ENkbyG9\nvjPvYLq3X8RBYv+BV8GClD51i7DQJGvzY0MRqZoa7b2ZJxPTeI0onv8en3xb\nNRERYZKSRzEoLE2a6+uZ5YY1AQCmCRwKUVGgygKAltfvn7MAJlPSDCHvziIg\nP9UyDhU+yjCkigypEp9LmPwsZaJOeUHSwR8vqgcT0FHkPKb2S6I+aSod/hvm\n1Ybo\r\n=b9Df\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.22","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-14f86bc-1612628825786_1612628877092_0.9319962730084972","host":"s3://npm-registry-packages"}},"1.0.0-canary-2de2123-1612652128822":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2de2123-1612652128822","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2de2123-1612652128822","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"58d31a534f2b196e3b9e6dd0f2d9d2efa78f0373","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2de2123-1612652128822.tgz","fileCount":7,"integrity":"sha512-JE38fWDmerf7xscI75GMg1Bl7VXLyL9vlWKxSzmjmjPf2ABWEqSSRRLEx8ZnGBcySEld4ymMG+b59xNs09kSVw==","signatures":[{"sig":"MEUCIQCR84oTlNbJQl4Z/c5ohIyWQ1QBLHTkQqm2SHF7VL+ovAIgBlHYSPxVolGb17Vc/HK8VXrc3hIujKH3fRB8R2xs/7c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHx6bCRA9TVsSAnZWagAAj/YQAKBV5Uz8MKlecgnws86z\ngOOCq2Rrf2MBg2FCX5mAyC9DSadBC/DkNklNBe7+FhiARJXZ2qz8e8gCa0Cu\nKkhiSZzn0VEJgAgZUbTP9eqq8rCPwsp4X+i4Un0HAXEIsAC12aX/PBzeqfXT\n2AwJby2CCt4lwf6eFTuGlMso0W0Hni8K1+Mx0mfL+MhDhK0mhL2XSGEE09Bw\ntQGzFYOKYCm8QOQwaqtBoyeGhxWRRsz2xj3ZEXhN3jI5+37tT1cAY0qUjEFk\nsJOtcHXL90QJRhGB+eTJlB/66lFbi0pPgNFA0gpMR1VeisqbMRXVhKxYvxwE\nTn3Rp1nfUCVp5o73VXNxdKG1jKJ99F1Eibgm5ThnjREBeh0HIt1rhjYpg/2z\n0xeQewSrvzfOBbU1l/WLuNLdrJ0CWweQIMZib94NYc6T6WZVLxmEMc1+41wL\nemgeDPjyL5w5zCM2DQwokBUNqWXn0cvyLwNGW3NVNlDIzPoU3aIhOfN8o2uA\nOITxY8DL+UXu1Uaajcna4u0TZ8cOttwFRJs8OJMO0Ng1XM9JTKiuzGNHsXML\n8c04ydGGxLGsjK3YN3+S+ny3bTfgTSpfw76CXhHD3a30vcaUsjLLg5yGQEgo\njTGGn6rvG9qbCPVxNmk2CYYn78R+tufctg0THb1lz62wHeC3lVk/deq68d0g\n8Hgv\r\n=rlL9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.23","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2de2123-1612652128822_1612652186748_0.2711335531312571","host":"s3://npm-registry-packages"}},"1.0.0-canary-550d17e-1612739844135":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-550d17e-1612739844135","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-550d17e-1612739844135","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7a67b013f59200e8f0631dd26fead077536d4ebc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-550d17e-1612739844135.tgz","fileCount":7,"integrity":"sha512-J0AkBN84GAKNr9sQPzOHD1l1Iws9TNmQbIqcZV7DWR7LgWZ97WN1tDFXQ/IaDE9h3dn3M8JQPwWOmHOjaJIztg==","signatures":[{"sig":"MEYCIQCpcd49q6u9VZ2XkhMXL75aYVfAKovEfef8wHranaDjRgIhAIKrNstXMBygp6iPzMhNnXfuF8/unIhrls798nwb/L9G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIHU4CRA9TVsSAnZWagAAFOAP/iAFAlyAOwl/nu0iYFCQ\n+WzeBX0WJ5vbsecizsKiO/ixg/G3mlrrEZFFezT6bKu3Wlzva/wSgNwFlP3l\neM7Vv5cgJ61ZxQyLHNy0B1ubrb1frP7WPC9byn0YqDiiEMeEagu1HtX6Kax0\n/hnuDJ78ErhsHtVeLCNODPJz9ovDkk11YZPUZUHy2HxQA6grP93Vatd6OQIZ\n3MMBBhlHCs4cIHekW2uhiW9WVJ2tytkYGfipo9TVMSvqJ0+JT5gmmLUsAaTD\nU7ezzKi+iZ0zYch1jTw2Yo5u2C7HmfC3kfe+CdA+sq/NmZQC9eDbJDApJ6EV\n3Z5xSr0ag+2LTQ3AKV1yl/U0CtjtBOt5RXUQ7fDwcnCVmomdwny80W1hON4X\nbg6NzcgkPg0IVRp+2FIap5pyzv/eGQH/uEfQrDMzVjyer16h7E+MZFTK3Fzh\n15MGn54YKhgXeu+PdcJ9T05AAx8KLm6jJFUsgL495zxuUosxpH33acN3Q7pn\n/vuvKW+82hjh8kvNsy7hanTesY5UAxxdfIW3xVh2uw5yjSL4cR/RGIVI3Qlb\n7G9AcqcgqJxHqJ+ffMHBqtVti9LeMFAeRFTsf0S7n2WZGEfxTJM03Ry+JxR7\nY73hCpsL1ubKZWuxi/Vf2Ibdv/2vVg7LOT8uZTs2cvQ3BJ6u8oStsz5nBGLj\ngmqm\r\n=dFql\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.0","typedoc":"^0.20.23","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-550d17e-1612739844135_1612739895403_0.31073102912887984","host":"s3://npm-registry-packages"}},"1.0.0-canary-5d18bd5-1612873605615":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-5d18bd5-1612873605615","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-5d18bd5-1612873605615","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fb0ba2ab4d06c7b680f1b4f6d1e7a53d1a1385e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-5d18bd5-1612873605615.tgz","fileCount":7,"integrity":"sha512-UI2k4kHRUy/q577xRabff4zgEODT48el1blJmoFU3oC9hYe3MUXrq1ZRcIMU4UXdqEeBIDZ2xiAVpCDyDDP7+w==","signatures":[{"sig":"MEUCIAXwVf++H1UVB140iTzVHeL6dYUn3iDPhHHDcsqse/I3AiEAg3j9YqxvRNytv+Dsfd7Pr0ByVnssueD5gp6g4etiqZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIn+7CRA9TVsSAnZWagAAe5MQAJwuHAXd6a1CYzwK/anL\ngSoXezI325ENZtuNtGju2nVYvW5ycbjIhm1ZyD3SN0rdIYzg9EQTJa7qtr+a\n8oalqP6FVyUMT5w6oOx9zS5ehqooLU1+T4j6CQiSnpmF1qQietC8KxPq/U6h\nltDSmQqzcBWjLi8Rg/7x8tI5IS3vhG2FK0jEgmUCPGYnlAM1984bDWHwhL93\nmheTaiEVLiS3HTIU/zLcpv30jUksfH47Rdym7HcbqikywvBHgKI0IlEC9bVs\nTIsd8FeipY5uBhrCYJCYg6ob8p6QZi2nsMLTqEEws6jEgAbUUYM5iN1GXBt0\n6cXs5GaeAMDa3LmzHKtsAQ/sqdN+nEilTtVCkHYa5RR3aZ/H/z0kHv93M6lW\nrnJiPwndXjJScS+2K/iEcqq6PZ/UJbcVG7LSMfZSvEzki27eFr+nUkz6uwi7\nvgXK4C2Buo4mT1a/lCRk6DrkhZ277QgVUaRwKvD8wAo2mJ+FCcj6Ia1VSKWZ\nsPnWKOWP+dAixenx7UPRU6LBuKYBmi5WDgcEkR832GClcuPopr2kvJ9dP4ek\n6nh2pNBkO+uqBqM1r5KWU7S6TUCEM5y2iPaAa7fLEbjUt7zP+F+IncTecM3e\ntH51mF+DrBVxhSWPuv6rKwca6ggvpC89nDl1y+U3HKe8KzW2eUnxACaoyT5r\ne+/N\r\n=nNES\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.23","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-5d18bd5-1612873605615_1612873659383_0.8996768745112551","host":"s3://npm-registry-packages"}},"1.0.0-canary-5d18bd5-1612873607596":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-5d18bd5-1612873607596","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-5d18bd5-1612873607596","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"970a1706b3c07814fcb9c3b2fe14c166acdfa7db","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-5d18bd5-1612873607596.tgz","fileCount":7,"integrity":"sha512-l0oeoeQgzoHHqQLmOLMOLyxHT0it31jhkuT6SeSW95gxHQG3fzEA6wGpyNauw9ZD/nJpyLtb8aiuY2F1pstjmA==","signatures":[{"sig":"MEYCIQC9Z8GhYJJ+vabxsgKpJDdX55OIo9yqDxXvyTS7elVphwIhAKUkw4dHoblQHp/rDn012nvfYLAbukl0k3gEW/4a0S0J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIn/CCRA9TVsSAnZWagAA9VAP/ji/ezXVHhD8AS8AKyKw\nlYKLWRgqtcs+Ri39c27ThlCsOBVnOZyXTcpnBGoonXOlWeApxvLG2OEP7++r\nd+oomF9icVrL+Y6xhcP7LRDOdDyosVbMc1E2BWpf2eJgxrQdKGrs7JKVwnma\nrW/4JVqi6SRqrXncQH8+qJb2Y31QCyHrSN62c01ea97JXEQ3GbhZCLWcIaa7\nsolA13pTwDhvkOy36M8kLYZ+ztc3sNbCT+elK/iuSvZsjfewYIv1ylIQ024F\n+wZ3eU0tvb/s6A8bFz8FMtsETpmdJ9pUyPma04LURO4UnnAtap849fiAhE4G\n12ZddmBKjDVC5LiC3p56ppu8ahO+6raVg41xWqy4Um2ZN0hqczHNt6hSwFe2\nBf75U7y8EE41gdTDvmE5ttYefBSi7e1eweDc8VOt4lbbghqINz09xRoFdioz\n/gHyZjjf+WfdvRGLrkTsNS8e5g1RRW9KaQXBGVJdxtFQML5/U7yTxs+mWl3l\nKLUH4DIQbgQAZPK3MxJflvBnhiXeZj8BOHl54VxB3QtvjG69+ARX5Mnlzt8E\npkNgh4AIaQtDU+ctg/V7m9Y3S5SXI4GbbJPio2zMss320FZhEICMnM7OsjFS\n2UjN5LTohvqn6e+I62lTPjF42XgofRqCjEGpaF141tKFwNK8gfPQqh5PUUD8\naq2T\r\n=o6lB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.23","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-5d18bd5-1612873607596_1612873666096_0.3408406763325511","host":"s3://npm-registry-packages"}},"1.0.0-canary-5a16d3d-1612876353841":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-5a16d3d-1612876353841","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-5a16d3d-1612876353841","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b549286276787532af2a4b666290c46fa4f3d21b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-5a16d3d-1612876353841.tgz","fileCount":7,"integrity":"sha512-DbWRPPezdOrrpfUJ9pv/wd7Lcu9swTBdccB2Oj0v65MasFi5BtYpaHedgDyZuIiaK+pwHuaBAaQBGP55on8PVw==","signatures":[{"sig":"MEUCIBg/rDjTA7sHebfncNCxc7UcEFLZPUYb+1X69tC0t5/9AiEAmXs81aVkh6IqhEdUx/KuwAscyT3sJgtYdmfhBIRJJwQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIop7CRA9TVsSAnZWagAAmnwP/211qgUuCIhPVMvMGBeg\njOhLZ1Z7V6dgkLC+5JdwVNfs0D/8dLo7nv8wXTo5/xArEJNdGh7u8Dhcm5rn\nXfjMpwHrFshFso52qMUEJ7lEZF68T7SMAlk8yhlV/S60dvCIKsjvLtUMmKK2\npQAW15elGThrXdwNjv1nINpbfz5vkSsJAVt9JaF2wmbbYdmgZUjVOptv4I+w\nMmKY+RS6VWGxY35Blkt1hZQVqFsYHywnSEwrIz1KerPVJNn8iQ2Idq6eiRtC\nYbjFiT1f8Fl3HWgUrCpEmaH7xSl2lpjZenaOMBOg7pe6JNs7OuaODNoErlRk\naRVH6FxLTwXN/BCbxbyn8GYCcZBCV5RuW1ZYskxrxUwn/Jz5AGjDM04bBEP9\nbR23l0CH69t3UEBboZS/JK2NiQzvOtUUhMkV+AfcrC5bRxdd9Y9H0hwgKJ5v\nxgyDYq/UYL7eI/EsjPeCJyy97oX0VM9thpne50k6uNg+wLVpRYa16bZMoAnp\nl5iUkb51u6YViogisJq9Xp9tTLkaR4cYPkdIE7bpVhL84V5SHlW5XHFcdYJl\nvt0zPHdEvdk41ye/+FOBL5sBIYczrKDQIr7CShesYJJkod8htgEJ3UwcM6Zw\nTAXBju5F2LhWAFVbAupxS4oimahCJiBh6DTzSrE7nETGifGqzCEtA9DcEKel\naF8A\r\n=tLNC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.23","typescript":"^4.1.3","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-5a16d3d-1612876353841_1612876411059_0.443418938587939","host":"s3://npm-registry-packages"}},"1.0.0-canary-a4f58aa-1612897614628":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-a4f58aa-1612897614628","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-a4f58aa-1612897614628","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9e5d7bc6366312dd8fef6b2f3b07e8db1f9a3ea0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-a4f58aa-1612897614628.tgz","fileCount":7,"integrity":"sha512-zWkfEB92ogdaQwZIh2aMF/agMBYNAq3tJihGoDSD1P+ANZDuWFVOnXOsYTgbWum4Luwr3EdqFnONEHB76346Yw==","signatures":[{"sig":"MEQCIC40lpzijH/qUaqbcGcPC8LzjtzFQv9Zl8hAG1jmYei9AiBxUeGfSFWVlptcUvtdTZE4qkNO7NV5E2GcIxjArFqhTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIt2DCRA9TVsSAnZWagAAlKIP/1kRDvFQhFkBF4k2UPqx\nEhrZeHF6VHT9Bu/KbZW5vxbi6z9K9OK7oFh95AS8rM0lYsXS1ecHtXZ8P0kY\nnfDGcxFrLI8L2vUGX4gvRMzVxfRIgDY+6RnThF3zb7C2cvcDlHFwO57MLArW\n9iB4wlXKBG0g+TUR4rMRNMXe8WPu00NTtRz19M/8IEnw+p/Nou+0Y4mrehBc\nUN0SSav7KzALzMG3cn0DRyA9D15JR/O0G46XUVu9FsVPPBrFA2SqEOBuCgIq\nEjoFuCT9SlDJH9BJ2DfC/gKZCjo63HS/E9xrhdo7sCxmDekeWXml1md2GoyN\nThdG5frTLJctbHZtjk9mXo/EmJpN0Rd5Y3Q9iBEd1w41uNQLt6wg33pPy/AP\nQVexBVm9BJbKTJlCqIH9TuaBz4MgG8drvo1YiRF7leiBP8JsGFLX98d0xKsw\niA5KjU0tmwMQxMJd34hooD4lTgFBp2PBUOMgptFNQY5yPl3p/V5jWbg1EFZ2\n/tZPE0btGH0QAaTxt3O6pvtU7HBFyoFeSaGhjMpk1HJiZOa3626eWLjrzn9A\nu4v3oJAyQuj/A4q0tAzkJohSaFeriOenyo5BvJLXOAlQgmAAyp38L84AxQ4z\nkoJLEK/3jMnrQGf7luRNI/1Uwhd7e21vdkHLXR/BPzd54j6S0EG3BRfa4Sz5\nFtBP\r\n=9hXX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.23","typescript":"^4.1.4","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-a4f58aa-1612897614628_1612897667389_0.05471673124910459","host":"s3://npm-registry-packages"}},"1.0.0-canary-9d20744-1612990082151":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9d20744-1612990082151","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9d20744-1612990082151","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2d553337a70b8d736bf01bd491c49c859d02efb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9d20744-1612990082151.tgz","fileCount":7,"integrity":"sha512-4TNT4WQlT/cBuHQn9u3Hujo97t50CEJMeqg5VmsNTsKokAr10VvYfT/2oEaIqPvWLHwRQ8FOcGPCgz6rXESopQ==","signatures":[{"sig":"MEYCIQD1mWGyqNvlolMD8nDKu4dt93BYjX4wA6DjVCs+UPgJOwIhAJM8YhBJ8FDfuf8odhO6ofiuYfJk3gL2A3SE/bi8CWby","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJEa0CRA9TVsSAnZWagAAAgsP/2WpFZB2Fb49370B6b6r\nAUMDkHVaZ549DSDWmT1KFNLzv3Ro3tA7SBMiARsYGYb+HrnDoW4OCxO9nsIu\n433yCJuhEOhiQSnWfBQ2E3XfVP/Z1GEMk6EHgBRpCv9zGsQcuHhuRY/eAh/V\nEILvZiNj5toMxo/WKiRaUBRR+q/RCIrZkbz/mB3ptvRsOVi9ZE1Q6b/wzFqR\npa0SGfTATmUaj7Hs7e++beQvBQrba3l4JqMfqDwywO6DbQceUKmOqg+WHrJf\nV3LdEEm946SScXLM94SqbPZwsVxYXeoJndqgE0y1lDdgC1C69SvuahtltXYM\npOofjr8OjbpVy0A1+BoS7KmQ2oklUnMdD/7pKa0LVEyGE96Wz8qYGZC8RjbN\nSEXyuPGHWE448d52J9l2Tx5QcnOE8rpyTn417HlfDM+AblIqjh9zifEs0R/z\nqfNQ170TIaJEPveOyszaHzPJ1UOprjvRqok1VYk8Iz4zgJL3be06z53poURs\nE9lFLNVNAl4E7X0TnsraXOlPtAz5eDuW3iBqkzK56sbsrmXg68mvgbOd3icj\nNZ58vSI6DHD4/bG4Ad2DGYkWeaMbc5PCciDOIp1gPInlS85iZ15qc+pdqteh\n/8WclhNTfGKx5UyZQV2Z1e9mNHcQkInk5nKTDAL0SJYUBrFPxE0bJ8X/r3rK\nI809\r\n=G+ZM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.23","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9d20744-1612990082151_1612990131777_0.7090473359182485","host":"s3://npm-registry-packages"}},"1.0.0-canary-9d20744-1612990087243":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-9d20744-1612990087243","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-9d20744-1612990087243","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"47257c6538c464abeeaa153bcbc912feb371b05f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-9d20744-1612990087243.tgz","fileCount":7,"integrity":"sha512-+vrdZ7rQa0ZLUwTYY3DmikjfMA9hM3326HGL0Vlu9JFcWarP63PrLFE4VU1JLwsk7VqpYrk+EBiKyctudSxCAw==","signatures":[{"sig":"MEYCIQDPD+MPISwb8ejmfsqlAkKvWRiNXOIIb625J/lWMm0++QIhAInDQnoSqBFpJbn1kjujMgoeLcgaMRBoPyxY2I9EysCd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJEa8CRA9TVsSAnZWagAAr0oP/2q8BZZLI4GbroEPnDlr\nej2a0+X91icY4gme7n2L/9qoMoLMqtZ3OD6b3ejiLh5Xdf3BIV0Q7ObHucv/\nI2iRqnd7mBIeDCVYo2L+lPW39WXEtfTzMsoGbEk2be+GhaQ0N8QFbr7OiK2t\ncnEmNXMdq8MJzD3kwwO1kFynqsbZf5L7Pmyuu/gJIJZDwfby3KwaWo6z25Gj\n/AtSbbiNJACqiJFA7uWAqDGqzRNYf9akIZ4is/p8PMKzNHfxrRx3X4vraDMu\nnGz/6TfiCMQNMwvic0GfUutJkRBlGKwtTlMu2mrhtuIKCL68SnpkTyZ9/HFZ\noYiX9DeaR9sPKZdF92zyxjcjx8c/h6B1qPm7qosdjAcl6RghiGUd+fjGrI5b\nr6Iut8h5bxEWoIEOtgSk2KEIx5QIZNORyBFppopNW3KCg/HHWtx3NjsFnfeO\n8fRPvPWMNJIXoom5YzWHZ6ROP/Jc2HOKqsdZojLa9HrHtQ6GQmQ1e0IPh/pI\nDDOun4c0hOZZbUUIixX243HuCeWHiq/HE1DAlpL0H24vGZw8VaTz8kmO1EIX\npRv3k44rOs+26aLq5/QeeO/NkRDYrUNRNM2lzCxXjiKx9G8RWxIlE2uBnVNm\nCPZS0xK7Q8j10tCAYc0mIOGJmWyNjmn63bI6M9nKaJGMtDgjlkvNXVG5/5Wj\neGRZ\r\n=F+WJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.23","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-9d20744-1612990087243_1612990139833_0.21138152371326036","host":"s3://npm-registry-packages"}},"1.0.0-canary-f5a408a-1613014658357":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f5a408a-1613014658357","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f5a408a-1613014658357","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dc97b46a5a6c8d0fe6544aa3bff00b44ff830bf6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f5a408a-1613014658357.tgz","fileCount":7,"integrity":"sha512-58e2vw+puSo3OQwykmMov15UxVjDW+eQgqiGqTYSyfbvkxXbTVVNAxGkA3/TftARAEBoqfAX0j6IK701GwM29w==","signatures":[{"sig":"MEUCIF0GCoHgY07aSY4sa4doc43NOJGaXV8oqBcUGLPOH46MAiEAiBGamJFoLIAL73J6i3UAa7QhNNKNcK+Kfww39RTUsRk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJKa8CRA9TVsSAnZWagAAAdsP/AqfKfvhd9k0oOsAQFmQ\nYhTwiUG0JXn7E2eqKg6KhfVNPRTRSgAbVzU1s5goQZkz/p/tnNmGm1x2gcIZ\ntCOiB3qvKPQMF5Aw8nuH5GNEteG0pK2bVhf6Wq9c/g+/LEpoJBg2sNgwwFZL\nH6oKAHXRhu/U5GDhIL32bEA78bYjSAS9l+wZKscZW3pHoSuu1xYW7UVbLLWQ\n+R5Gv0K+Q2aSxKx2K5hhVAaW6MhldsY5CA4khyJdISG1XbOkoCMgtoihr4HJ\nyvvZ7ymknyqDOjP2KxmjsXYu6jGylzrkdrKNRdgWsAcMe6unGLjPHn4M211/\nxOwuq4BkrQsvhrBMFO6+zMBPX9bb60mIy3hKIIFq3JhSMvcxpk7eKa/4C0Xm\naYxaY641O6slKPTEDgPgPOW62nzQvuiEebxZEVesbngsrxCDwLBOuwFa+x5q\nNT/9P8HuvWrKEeX1UKUwqZivmUE1SHuAIHYy9uVLKfaLWB5iq/HBGLyxkkXq\nCSDdSE14/58dPHFTuKNuILP6ox3iBQBToey/O3rxhE3fGtlCHTRtHlF45Yo5\nGafKUnSBwmNgAbGsE4ocu6O3QMYJOE3J6xxZJKTG8sXaG2M5HreKE9dVuG1a\nURUnCkjOpR+SoEpK7gyYHjCGoy0Kk/6X3sFZ5ce3DL6LbUjGeRw/sM7sfeIU\n3T9K\r\n=mirW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f5a408a-1613014658357_1613014716170_0.4512407488111885","host":"s3://npm-registry-packages"}},"1.0.0-canary-b668d75-1613061816105":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b668d75-1613061816105","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b668d75-1613061816105","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0a0d8b7fe6a3682ba2419a248c12120e5dab9f81","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b668d75-1613061816105.tgz","fileCount":7,"integrity":"sha512-ohJ7eYjPlK2XLXpkEL9+q0AEeMbHN0Y1hNqjZRF+8XWTty1mB9gmfCjcABixk4Uy1nzBpFPACwZ2+wFwQOf9JQ==","signatures":[{"sig":"MEQCIBSkuLbxVVwABSXcZXUuvCM5lLiVZW1V5ftIxvWJcCb2AiBL+/IrwK6+Gp865YTfz4kAUKASmROiCP0xNHv8haex8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJV7vCRA9TVsSAnZWagAADlsP/2s7DN5RN/j8qcBwherE\nuHfpYy2wsyPSbq+FXQ3Sq8ltHzQnqBWJSfvE8eFLzbfvk79579mA+1oVUo6V\ncvr6vFFp70xwU2UzHqxYSl1tZXdQ6A4AJB7e62KlXmLBUdA+4oP6OX7QneSX\nPjcz4boN7CVZIQ7yKxRpD2MHMKsOsWs0cFHLwe2u1hf+kulIRviSXyq1SKZD\nJ8unsxcVD3cNlMfX2KcPeTJXT9iKO9B+KwRnJMFwnPaANlYkV6AcUNFVOvEo\nSMU78f483PH3hRecW3anMP3khu7QNPrNP8+8r+Q9gZ06olus205/0A5z4Nb4\nHtlRhoKiEumjSghwXkC6+mGiYL5corp7z4aD55JpJxoQr2K+zGv1BjWMpG9U\nVpNjq+D+Dn+76QI2Lc8pzUchff/eC+vBWZdaBaJZ17CQqktq60p4a+o+deQF\nsq9kYceE3t4eFAHCfJRugHNKDHCu5ituBtSx6jHdSsCm5deCJsWBtvbTNmZu\n91EEj09RHXaRUqBd8XKTds6jPWfKbiYipSluEGXuAg7ZwDgXe/fJpmUTJBtv\nqBiOjq7jGSNcQlvQ9wtd8Ok7+x/G0+b8FBN7Sdbo8quJBd+Tqd82dyuWQfMl\n+UKYCHEVEzE/o/VEHGesYqcFXzIMDcu61Jzo4uBdn7OfXjFtX4NbT0yzO+nj\nN1YD\r\n=Lyv6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b668d75-1613061816105_1613061871418_0.7645543462909528","host":"s3://npm-registry-packages"}},"1.0.0-canary-838824c-1613146069775":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-838824c-1613146069775","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-838824c-1613146069775","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b81871942146280e299e6d81c23fc2d86d2058cd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-838824c-1613146069775.tgz","fileCount":7,"integrity":"sha512-YxjxjFV8+eIUgrBR9ngwmkhr9LpLpVK8HsALm3HBLEuomtEJgBJXq51Aa4p2JeiwUj8eUbuugMhsP8dHFzgjXw==","signatures":[{"sig":"MEUCIQCyxve8GxQVwdePezabvZX4f/lfkdozMvUh201hILjVfAIgYdOMaRUdeZepCxAClvJjKNc+ZVcZjlv3g2OtRE4j46Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJqgQCRA9TVsSAnZWagAA9ZMP/0rZgYGrU3NnYxSf9Kxb\nZmfNKhMQMSLub4EvaH79Lc9yT4Lq4VMOvxlA3lUTvYWiqYalVXt+673i3qO/\nruG+WYTBEp5vt+G2vvZW+n9azp+W8s7WA+KrR+jFF7xaPt520hP12hy249jw\ncwNnZZ//caPdTfVh0PJRcFTsdHYCXIm+07O5EyFmj6Rpr42xVVEypslegDOf\n6SOZQ/9pgYxgmqdqDaKNqEphdjMXRdWe22xwAU9bH8i0Q7j+fw8m7p0WS6mf\npn/SKE/S8Z6OlAy1w1a1wdaadE3cQo3Wq1R7E88pTN7xasvoHKq4b7cQQ1Ks\nQr/l1HJUBCd9mplOxVmmuIF4LN9Y7k7zzHnSGA16+P6IxH5MZcZ/03+FDECk\nItBGPoDHuYJdPBPgSDqa0VDprkHQAxdKuAps6KS9LOePHBb6QNzcfN7Bmxb1\nB8c7GUEvY8ufj/y7PCNRTqsBglta0g0h/i8PrC2gl+Iy73YvP2t/eCEOyZ2W\nFFGITf+uuRaYPeind5viCLIAOcnwY6+nXI+Uun6bicAXaylyClJ5IXoypmZK\nn42aA3Yn8FEDeRVZq5cRBYg4DMKD0T7tMNMZLPhwLary56XeUdMkNRJiTKoM\nAuVfq80xEoi1+KgZ6ogSV07jdhqxHP2rmfcy68A5IfuQ7Oo0IZ5uhmBT5jK1\n8m5Q\r\n=S+yy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-838824c-1613146069775_1613146127424_0.11444371577858958","host":"s3://npm-registry-packages"}},"1.0.0-canary-208ed24-1613170029349":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-208ed24-1613170029349","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-208ed24-1613170029349","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2746265a27644b96abdf8a38b2f901afffee0958","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-208ed24-1613170029349.tgz","fileCount":7,"integrity":"sha512-7P6+zW0SnPCCGTvNWkZIw0aotP6ZWyNh9PNdwQg13teu6WjFGqrsnaRBLTGTwWPMCjx3uXs9vNDlw9J3rzHzgg==","signatures":[{"sig":"MEYCIQDM+C1YR/nMK1wUpZhN5Tihgn9u1SyR9hnZ2X/vn9TzSwIhAO4Xj4+f4HMHZgM+ByJ+CfVqT3d52uI/Hpq3R94pR/7O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJwWdCRA9TVsSAnZWagAAQXEP/RogalAqCKk8MZ2aXlTA\nhIHsDsjVNfJNuanI3xQWDOUSKDCtFJkvTg+3t5Iofcgd19ih1o4BO+ZI5nQd\nmu3CPxWu+zWPmgcCLcMPgXrmJ/CpbTAabvNQlSZwLlilEJgv1Z2lK1wb8V6v\nd8yuE74kxupqlV2JRaGa1P0N7PR0gTDAr0tszGotK3RwIQuwP6hBZ70Y1KE4\nHEYe0FBi+6iKRG31n0hTUwcGzVi5FMAOIrn802YDg9FRsc2PKlRtnDchT2MJ\nmQxUFwyj2V3b4GvDeEt3tkw2GM4uzSrUTaK+D/Z+AQR4+bDMK8SFdS1nSAtW\nzIZI5AMxyNM4sz4L/kgmsXiVG8SGyYCy1tEt5YoUvIeen/YgZCiRaka6/hbh\ngN18HiHSOmC4vOA6kwJqIYVFURZVIpGkgdCITzmTJ4jAvAJLD9c75+CwaFtw\n37jhouS9zCN72eXg9a6YzIud6ioX0xFNwj9b356YGIO7dCRv8yZCyNbmV+nk\n/nxkDFZNlY2LYGY46LLzGVVN6b5JACwDXMmq18Ao98c4l3ssoM594DXwGmzT\ndTI63Oyjb6X1056ldx7D70ePaMuklrcHFSkjoZS5XDtSIUDx5MqUNdQ4qi9T\nd0fFQWJkLYbb0NKjZUWEyAqHjyTp9CpyGkebjIJ/RJQd5S53PUMpuKFXsOcN\n3fUw\r\n=FR1q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-208ed24-1613170029349_1613170076869_0.13237759088032952","host":"s3://npm-registry-packages"}},"1.0.0-canary-208ed24-1613170028742":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-208ed24-1613170028742","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-208ed24-1613170028742","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"48c7e2ca8e82ab1b36bf106a9885036a7ed613fb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-208ed24-1613170028742.tgz","fileCount":7,"integrity":"sha512-B8VthGTXiSYmk/5UQbPR+/O0jOvDgvy0WyCyScpnXf0lSMDdqv21UZdqW/9xgvNAGM14UPybYZvf6zZWnQG6Vw==","signatures":[{"sig":"MEUCIQDcK7NBSLVowPWHMo2q4xZLMHlC929GzFUwPIQXeunUUQIgXZBptb5COGHRBGxJkW5Zrnh+D/fbTWhMQeigdUC32Bs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJwWiCRA9TVsSAnZWagAAlVMP/is60qVsILK0iT1J5sBf\nEIa6YO8hguMpvg5MK78s5wB6wAXaB890fZY5sie93087Ursoil420ow3Qr1W\nAhVtT1su4Gj1P5ltZl8y32gpMJOb0/g7zijVf+9M06r+DwTjuFTcpM3FAbTK\nW5ouJ3bdV5v2c52T4uFjwpSlxphY6nvwJXZpGfk3xL1Jx14tlatQyPXlzkwP\ncG3WJ3wDV9l/44yn+QvaN2HjnaVLzQwN1gBHZuGSukkodV5NF8lCqUvLFwpK\nq26o0SyhPeiXva2vBrw6CDvaKPabLLs1jMDMqdxBnIEXQhhkjKEOkNUMw9wy\n1ZLZH100D75+lMb1PUKvSV+GfeK9QQ6UOTRIPevoGTmJslOFXJP9rLVWx+mo\n1Rj3VflPKt+xEOag6Tep/6ooszM3TMLwhFcv6VXLIApZpid+0q0OrYDnUrSM\nkMoHtn9ts5bG145h9hZJSTYIW8Z/Zz0qlrPtwc2nK66eYOFJBxPlNoMbMkzM\n8lcE3e+9OCjnItpIB0i+5mKsgM243U+B6AxISCsootvIzwoU9XYo0y8+gvXU\n3yyS9geSHbukBwO6IsMONvMoBTkJHn4p6FXx8pgcghEf6hYeebu1ppLIO8yv\nNbxKOzCRF+Gd6NlnFYdFz2WAeHQdaqNuGVe/XMJG4wpNqZisGiviBqzDrt9x\nXO6Y\r\n=tfPQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-208ed24-1613170028742_1613170082325_0.42542548141893954","host":"s3://npm-registry-packages"}},"1.0.0-canary-957f7a9-1613313154485":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-957f7a9-1613313154485","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-957f7a9-1613313154485","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a50f4cc3fa30709a72387b41b32e15ccd9e48068","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-957f7a9-1613313154485.tgz","fileCount":7,"integrity":"sha512-rM+XNfAOx+wtauGXzETcf2oBIlz+eWu0+n4s+wMXh+JG6ce6F9PBLSVlUiB4rMxkwlvFw0aJAsbDe+2TeHC9XA==","signatures":[{"sig":"MEYCIQCDZObrFHN2kh/NJXvTiuvAsymH57MrgybpOw1KklRhIwIhAMy0X35PMjpN/W0Z+T8Sf/i3PzdHv1vHtHMZo1KzojJg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKTS8CRA9TVsSAnZWagAA2B4P/A3dO8NHoRg93Uyn0BXj\nf/RiL7/mX04r6yDVIxOjhoP8G+Ac1nGxFnvtqu9ceTVbRtupgVvUduVB8WVN\nT6vuAc9TJiMsc+AMBCVMDtu4Hs8xGSvrRIqqfKuhX2bnPyDdXKsTVTxOvA7+\n3i1cPlb2wV4e4l0TES9ihC7YwfhbECCEStx3lYhUhXkwwI1eOOIBcmz7jCKO\nT8YiJORJLW77GxHUYuAn6QwXmqIjvZx4UzRa7suTffahZFpxPgfGTDvUwuMe\n1hd0SOKiy6pSJy7eiVuCiCCA6/5/jXsT1zccD0asjyKZsogM//8OZmvi0LUB\nZ6IRhdYYrqDTEeZ4rdzmwPMhPZbsrodexz3StPlqZgUwU7S43gaqBrSBnvzW\nR9K+aJtmwm2wxfaS0JNAw30pmgFz/SxgBvcnOagz5ucNXiJOkaEaEF0bGp1U\nQ5HfhWVRAMV/nbd9LIXz5CDPESkMyYX0Ml17ombOjZ+UbzEerK/bGZKTe5wI\nY4HfSMmDw1cqUz3n5pkGniETzell+JyNLxA7zprlf1qdJrCu/m3xoQnlThDm\nDQPLCX0kgLhrnAimOKPcahXMkCj0iHPp9/Lh8LYLhsbDj2ELQmSoNKKC3dto\n3UappHBMCh2hiSanJhkdR4TvKGlDw0ztO6LVoqz3pu/geVcK70/RbsJA8OrN\nS8oD\r\n=lgwj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-957f7a9-1613313154485_1613313211654_0.5418770112894771","host":"s3://npm-registry-packages"}},"1.0.0-canary-4883d55-1613344498745":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-4883d55-1613344498745","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-4883d55-1613344498745","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bf3a8fc4a401b1c030c0fedee3ca442362432a8b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-4883d55-1613344498745.tgz","fileCount":7,"integrity":"sha512-057Q7whmgKmfNv61GewyWgcgHkt3P7JVFKbJEKBsL4vWzIw3wQCOVhZJMNru74QG23I1WhI/DZ26l/m733CxsA==","signatures":[{"sig":"MEUCIGMdVoJTWAXpExWRmmhWYkmVEQxpz6OwWRdee2a9tLhrAiEArFgSABwKjBB6+85bxhWu8kaJObxxtb//ZCrBVAe3aPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKa8uCRA9TVsSAnZWagAAFQsQAIBRjGUTkG5DHjCZdzis\ny/5BnZNGkWpXbXh7pSLnDR1YXDUmQ3mmzPYjvpfJ/ayktrt8D1ACGEVbBs/W\njhRO67ka80X0BwgDAiVC+uhTErJVYHo29ZzzaWI9ARt/V4W9/i1hcdKaYvVJ\nIJB8QjuR2tV3wVp/Nr7yIwHZ4mZSolUl9BhDzFMaAyxmBLFg1Z7J3J3fIqp2\nojlLbIzk08eieJpxLx0HeB05thtLeQOXH3XOOEFzgFlV56izM2ioGe0+uuhY\ncuBI0wtBUrbQDXmq9KWk6oJ8vMFrUNJ9UZdHPZK3auvravZtCI0dcZ/b+bzc\ndOCTuUn/J2f+Py51awVhx+Jh0wsAwGCza2SRtk2e7kykRGXqVytoCmTD/wTa\nOAJAFWz77VhbmEd090NB0+u91Lv1+AmIxnGx4uc1AZz0STnYhYiRc1aTKhPL\nFyuKp3A1XBglHFLY6rIORZjR8emnOyv4wgxOlY8McWz6ndOsGF9w9U1AbA6l\ntMu/rBi+zs07NLvjJ2oIflO6bNplH2s3ADEvoO4Otwx3tutYcXXnavJNOzrY\nQJwemak4jELbQxPrMmnXwddMApYsMkmMolsSBtvRfv9jNCNduIcQ2mZHrUiw\nGhHxmYtVHFq+3zW34KyQaloec1WH2GL1JiYGZUX4lAjwftWaGE5wte7Gsyf4\nsNmS\r\n=ItNQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-4883d55-1613344498745_1613344557602_0.24452428805180482","host":"s3://npm-registry-packages"}},"1.0.0-canary-4d6726c-1613344513477":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-4d6726c-1613344513477","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-4d6726c-1613344513477","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fba5f77d2deb938af989d4245a86a8bf6f6bfec3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-4d6726c-1613344513477.tgz","fileCount":7,"integrity":"sha512-fjAaqnZeQftNxOpbY+7dZ/XuQgt16FeyHXqpnlCw3YGiXl02fNNIq9ErQEbJIXIMNZ5MTb6hL7pUm3fSX4JptA==","signatures":[{"sig":"MEQCICfEwDaYGYi16UHWunGJAQnA32E7Kq3DKt+3WhCSS51TAiAhkMvIUi2npo0X7z0ah/Ljli+LstttTvYO2/aO9Ikswg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKa84CRA9TVsSAnZWagAAAl8QAKMDP0ddfQBuw5EEsP03\n5dZUs8V7VHfLf36FI/UlEtS14HOr0oQF1NRVNlkKogZHhlm2glu6lBZcF5o+\nnTu9yitYy5Y/++73yYbY1VWTLT5BiYjLccr1CmHsVigAb9dvpu1Tar151gZe\nhQxTN8WsUhsF2360KO/3WKPTRQFGWomQrJlB+N/8XDrQTwoo0S9+hPnyccDP\njsSpHoclHnQeko6fptv0RCEro7PN5rluLzXEzJrNBLzyYVFp4siCaWpWYymo\n0CNysQBkVKxesSNs0VQJoLZALVINrwrggxt6bcNj/04k8Pdu4/vpJOzEahPu\ndHMXwZ5+sJGvncpXKoIGAr7+AafXfs78vCZjxYZ2U/m46j5ReYoPmH/T8/4v\noo61f1kLhr8uOpvTxJN1sYv+DsYLPQqtEmIErA2ziJJwRgtOmQ5xO4KDlXoy\nUyBsIwbXfBeGV1x9dHAmHWu2z7KmveBDsLk8RLmnQmOUHp9pvHSqAnaJGpHI\nXxWQRsG20OmpADVo38vOkaZxgSxbPMsnl9nw8T9sj396CFimCPP7eJvcGfMD\nwflmh/EiZVRjmAI47qDPi2ZPnaA4jfhcVvfxvdrc7sJp5w4S+EidiJ11LCk8\n8QTlChP21GUlPouKsqmw85A3YcXsYR0HnqKXY3sfL6ONnSYUUFit93/SJLBq\nptWe\r\n=e/id\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.24","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-4d6726c-1613344513477_1613344568207_0.770937017891498","host":"s3://npm-registry-packages"}},"1.0.0-canary-b32711b-1613360737468":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b32711b-1613360737468","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b32711b-1613360737468","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"570d7cca4226701cef41d3f4616c2fd792dec87f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b32711b-1613360737468.tgz","fileCount":7,"integrity":"sha512-CiU6mIBw1NTg8vM8ZlbCKSNNbQuXMtfkJbFPB/IURcuAdRU9zfRwhnH5E3hcYOPGNCWI18Cgo9nd8k7S2JU2ag==","signatures":[{"sig":"MEUCIQDQvn8TNfr68avaE8oZCjej+pXoxSs2GubGm9Sc6XYwuwIgbBHzcj7Llf7kAG8j8k4K9D8pMqEw1ZKsxeO1qlpPuk8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKe6cCRA9TVsSAnZWagAAAmcP/0lil0Kyl1B4JqzI0LZy\njfN1sDWBu7yFQcji+uEHoOCbLIFVDpga3x8aSG3e1LSipnUsYuAV+CP6TYm7\nQ1VRyBdhzYCTEpPs/6Jr6VgokXAh5z34L6qTqvEjhgTG0d70s6QUXDvE7krG\nHtbZXj5m/wkcZyTmW2a+93c+9MAnxnS8kVjAqPzXcE7mRsTDn9eUS79T7JEI\nhGtMtPZ2fJbmJabu2ycd8ltWLFKeh9voKAOqGf/laUU6dlGyv14JB+wEUawc\n+ceXkRZHBra9FCS8Ltkc7YONCEk572BvQeBDSiWjgiDK+J1vj3UPLv9BnQn0\nrDDiVIAtPH7JIrwl/I9TRcj9ck4nEb6//p/u1m+oUfSD6V/ht83nUSbmJKFy\no57yFaLKstASEVMiFyq8rEo8pek6j4R6yTeEPst8s7XBIHFfDUhxbcwUcVwS\nXRgcT9wD4wB0CoKgKsvNbEm+mcGLVtTNjcGZm3StHiX1A8eITVsDWT9yfTxc\nzHGW07WYpvac70pzrm5FLbN97LFmxLXa81yohELc3iPOKKTy/aUkkB9CDAhq\nOCLyY3wxH1KCPhcZro23eUL/i3BJzHgss+9ZfjrbG8w8dCwMKHOjJjX0yQTG\nPdqdMF8aE28XC+MSToYqTykKClluyEHbNNolO+by8h6O/f+f0MYIWB3Op4tX\n3lvW\r\n=gB2R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b32711b-1613360737468_1613360795651_0.08624517320841929","host":"s3://npm-registry-packages"}},"1.0.0-canary-31d233c-1613382979870":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-31d233c-1613382979870","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-31d233c-1613382979870","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7812ca170aa1dc183828040e906a4bc207354b8a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-31d233c-1613382979870.tgz","fileCount":7,"integrity":"sha512-01qXPVJAGRLRv32t+astxfWD6lGzHnU7cAN5TxRXYcFqKUfq0VihdhyYPXj4iyonCDDCg8+xmeQXKCKIzEbaVw==","signatures":[{"sig":"MEUCIHZU4NGy/mL2dgLl+o2of6Xcte+DxhABA+sSTIV3I3RxAiEAl7pOF8sVfyZoYLMGhHH7ICy65gXoT55lAoLCZPq+0dg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKkV7CRA9TVsSAnZWagAAPVIP/1cNJHSRMpfouVSm2WHc\nhrAeFcAR22MQWEAAiC9iKnuT7HMBc++kuZ1T5o4k1cZgIB1ZCne7N4AV/N5e\ntlN+X8ImKWUu9mLQUQ9aqX1PlsbRTU2wS4+GpLJS7hiU8KeH7RNFqEZ5uHSZ\na35Gf2dc8WASpadNwcpoRS2BPiW49x8ouxTt3D3SPL0rh2fz6UXd+HtBVUf5\n43ro1WJe7Mmxr2CDpOkxWuv5BI9saRd/jMJWHI023SM44d/n4gHpWFMYwQ6Y\nW2ACEpWFQypuvKJ6ud+ycXkt1LAUx0ZAgN3Qq7cap5rCV8ZScnKSBNxBdQYT\nzF8eSpIzovbyIhy73yHnexZb16oxga3TdmoVD4a2DN4jCBNd9n8lfPiBLmJl\nF7vC2FeeoGxRqXHmI+os0plbdyQToOU5Cu0BJCdgEh2S3/uLct783nGFvkOK\nyqv4EOy+9Lc47oTnK/9VANBY9wLsk/1lIZncmcP60oC7tezZf9s/IEEQ63+m\noonBtEBfycEFwVil+mfaw0ZJRpS9AXHOXra1ndPxGRieFKa1ROKO7nLvAXdA\nNkd/ZQGmMQUxCZszk06t1PUtRabIdczV7+BHjf+EOKB4tSiwZtUf8+4rY7oI\nrwJ+n/cdKgRHMNnrjI49yQY/TEa/XFQEJRW3FzffJN6eCvU0m9lgnwOfCmvw\nJ5KG\r\n=/j8p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.18.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-31d233c-1613382979870_1613383035044_0.282310833506626","host":"s3://npm-registry-packages"}},"1.0.0-canary-04cbbda-1613383596461":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-04cbbda-1613383596461","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-04cbbda-1613383596461","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"30e1f8e62c6cbf8f1614301d441848383c77c80b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-04cbbda-1613383596461.tgz","fileCount":7,"integrity":"sha512-J6Kx/uMb86LloYb3xHLL5udbClqWVKT07+n4yQvSBe6bIi5BVnlum/y6XKnDusyLXE6sq7XxNHmzV1lEzSJgJA==","signatures":[{"sig":"MEUCIGBFt/cMXtGv/foUN3qHt7Gle+UAE6PThUBaOO9XJdBBAiEAq2isJcwyTyo3MgnSCpssbEGNPwVCrvzyeyqLpZBTkZ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKkfpCRA9TVsSAnZWagAA3akP/Rdejdsfx4EJ0uvLS4OZ\n2BgS7EKbZTzhGZGH+SM0b3V4NcCaM8uTSi6gzau2Xftd6sCyLccWzXwyzYIW\n8V32ge8vfrTaBA4tsY5mDHAC+lHAEP530+4pTo0SHUatM6pWRSoomgCecjCI\nR75DS90zMfmm47T+3hNixL+KadqSmzL/z+QMegCb0FCNFHxy7e6CSrft62Pg\nxqLW+BeKCC67VjppChfjqxwC2wz7jL0qL057mlOIXbOO0rWjKYjSR0ziFd8J\nt+prvkuO1lGQ7kz9RNLJpygQSy6iHeqplM64/BP3u6GByrKCMLMwieAi/Dym\nkSw+TSPonNTqdDPxhMYmOGgRe6e4yd/4MEt7WoF5wOuUgjLx4h+Tzu8us88s\nkg0PQU0UWUAdzLbnRbNuUV4Fkj6jSt/FDHAmA/GzM6krSCBLt0ywbMv9P616\nO1uFoftKqNwORpRFRamPAuE2+NhZhiY17qsmJgFPsWj3ssePCc2BvHAalLKR\nuOfrbOr8kBPI266ZCV85drddPucpcm8W1LGibnROauKsIi4IOjamxRT3v7hX\nc3lbX32NUL78AAhJkUvPdTf/9Lxp7jnphPhn5m8UXaTTXJ0kWDMvMVD5oivs\nxuc/wx9+rjbGzj0RxN/AUipTpOpIeQDoqWOGmhwaBYO4e5MYJRrSZqYW3ZKV\nHqpU\r\n=HOMb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.19","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-04cbbda-1613383596461_1613383657525_0.9830644541766917","host":"s3://npm-registry-packages"}},"1.0.0-canary-37d0747-1613385597440":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-37d0747-1613385597440","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-37d0747-1613385597440","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dda00696750dfb3f7ce3e19be04dd13de409c814","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-37d0747-1613385597440.tgz","fileCount":7,"integrity":"sha512-/kSDT6SN7fKpjoyX4SvWpTZZnjuspuhKkCmoZ+6+VPN4oqQMjNKfUnJiOHEc6xzZo/lZ+ZM2YRiHg4MFmZXzXQ==","signatures":[{"sig":"MEYCIQCl5v9eLh3oYf04p+dNeG2KtpYFEQCt3PSKgVpVLIA3bwIhAK1XokQMIOPvzEE6PsG/GhL1PMZVTVf2d2aLBMcirLx4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKk+vCRA9TVsSAnZWagAAs0oQAJzz2U5YHHTkb2iLzcXY\nFFYNMIazMg7kD1RMz7chPJBh3DwV9MPJjz9sPLOlD7t43OztKmaLihlIkUy0\nGSp8f9pFMsMTW21cfqBu714eluvBkmR3afd+RuLHFJvJhDHIVSDG5eONswSf\n/TWOlUoZWw282/nmCeG8PJrVncjOPvx163VIj2DwJ4tYWUQYC1oAutWM7lnf\nWNCWmFPmOpj68oKp7aaAFbP/X7Qy2Hx70EHwm9SGlgjAqgg6WF28M7UejQ6b\nP7e/E0H4hzUQ5BwTKf9qbaWg9LLB65zZFgkPkPQ9OqE1YzM14YMf53x8sLge\nOUErwK+t7AD+VxGVtRhlpvW7rVZGCoPUa4ra1rIyQViKgtoADiylj8lcswAG\nQg0ZOh3sWD0feJSFUoEOTVU192fYedDE18A1mYzO5yrl2ZYg35Q8QvepvBfk\nVhBIZU98VnnjiX8XoKS8IRzipCfL54w9KeSLP3wcmBhBbxOW4+7B+/97ldVA\nQ/IWf98N9/S/sNbi8jcE3Ee8St6SAbByTp3FZ3v44C3zol+woGOM4hrcdHmU\noNl18TpcSUv2hwcKlpnQJBe4vU6esf+foKbJZokK+sqjyJFSEeAzIIckGxp2\nA2gnjSAjrAP3uCnJ/JsiKoEsiE8WJd6F3Lm2QLjCT/mzU8eK6fRZ+yIDnMmH\nXaSk\r\n=yQfB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-37d0747-1613385597440_1613385647183_0.6521538502119419","host":"s3://npm-registry-packages"}},"1.0.0-canary-37d0747-1613385595470":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-37d0747-1613385595470","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-37d0747-1613385595470","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"42578783cc1fb613344edfe702ad4e6f12f514a7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-37d0747-1613385595470.tgz","fileCount":7,"integrity":"sha512-CxEhfPeRma3SRrtL4yhfMBp2krPme54+T5Y6u4JgtNXO1/xmGjNZOrx+HW5Ro5bHcHFCoWbEy7iT9zDt0aRFVA==","signatures":[{"sig":"MEUCIQD30T7U8p2z/B3vVWm4TT7cweTyuIWJOYmqTd61QqnopAIgHZApamEyJ5n0rEd+CaCTFbDwzQePKasCvejfoRtn2t4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKk+5CRA9TVsSAnZWagAA27MP/2wMgcfbrO22Wfv+phTW\n/SHf1s5Ll+AGzjogpR9bSaslwdZxKkTOgiWH7uST2uCntNL/I6BX9q0fFZut\njJTPZoB09kUgkjaba/y2Sx+RMJA8cnDl5K8+MPDkQ81YlvPG9ReVQM7Tny+Q\nvER83Q4IHRqjElIGBnBWKPSS3lM8RPd8EdgpH6co/GkTQluFJrZh9uUb7mJn\ny0hXUtsZfp+TvATJx4ef6Dsf6/e6LwkYoSdTLKQd6XN7Ts5Z6WhdHKKdvgqA\ndxL4CutRhuEV76kI9Rw3Y+DyBXRbdEWprfS8LDUu2SOPRZZg3gHGgjh0mpQt\nKbyxSc1UlnxB/fZICmVdZUhKMMue+55813mBpV7ioCnNJOiDfjvD9mdaU/QV\n1GguHIkk7CULqiZoMeWoid0k6nUjF/qqWDk5j84PoKlHNzhuhPO0dA2wdNvp\nnAkojyBiOvdqrRo88vwKXB8ayosPwgFSIn36T/G/ai9OqvHZS2oCwK1+Dtfn\nc/EaEULzkYp8LxdiPAu5qm2dO6Y/itFDVR9FX+9zriOU0MT2Ryg8yKBBhgpE\nT/cRNnjBdd5T/Q74OlV7VlANB7D3csT+CjFRGigTXgbmf2TqtIW05Z+r4MCy\nOfSy88ofzx+EW7rHEKzrJFIg1X06t1JdbKblXwVMgmdReFrnDSeZcxw4P9K9\nXOZV\r\n=rw3A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.1.1","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-37d0747-1613385595470_1613385657274_0.9456187072260398","host":"s3://npm-registry-packages"}},"1.0.0-canary-850cb9a-1613393362701":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-850cb9a-1613393362701","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-850cb9a-1613393362701","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"32b82cd6b2c9c8e6438dd7d932f96b0abc031d60","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-850cb9a-1613393362701.tgz","fileCount":7,"integrity":"sha512-XlVttAJhd7XHtCWcDMMjW/JceeHO2O1GPnYLc589TJhDGXVZ0Vjlimof4AGKF9CD0eqISFan+d3NKEa5FTVhmw==","signatures":[{"sig":"MEUCIQDcYJPs8t5ok6Y2XOUxqSUxhmVFhHgsTXueimZDdInC5gIgSea0OFKUBP1tDPXZsarAvNtl4nUYXhEKGEr9Q2hEi4M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKm4NCRA9TVsSAnZWagAA97YP/2f114wiXrWxCEyv3cU5\ndajPjCaVsqAM6WPS6Fr0dGb9QmsPGYpNICDbuYMjHxuHiTyRY5ilsbpyzbnc\n0/iRDo2IXGCjAmmldzJZjKouo3fJb0Lr7KdR+DZPDs1rCsoX1uHzu7EURHGk\nWnFuZb4TQ5Yfr6h+mAbkj1duD8IikXQ6bJK60f9cZKsLJ2Vdj9/FkroPvkF3\n/HCZYr46sBnuGHPMIflLqhhf9znYu9j3V/qZuShwMS8kvxF1t7Xim8E3yJjJ\nLainIdgsod9BIA2FiFjy2tUCeea2ULQMGJTf0VxYomW6ti3KZJ8jfsA3Ktkv\nXv96GjnJbF4ujcXILZ1KpO0khgjgWCX1qnw+/zP6Q/oOaOfMh6P3mkEkqDOx\nk2Bi/fVXFSBAblpYNz4BNvg0mUeQoYAOWWLU0Bj9uStaBkgcRSrZvsuNcWBi\nV/SzntZpGyLgY38d0jZLxyfnnbU77ANoEKCLKPOz6zxlL5Pvy7WLhE884ccD\n6kG9mU3yYBa6pTR+bgrxOEFttd+tMa+j82RDmEEk9jqq9SUGbW4m3uFix9Hi\n6VOdiLJp9Qh4nuQJicf0UHVCTMBlEEWNP/vRMe5f+fRoiy+ouSCL70ZR5GoK\nZMJVcD1YUhKMRtFar/i8bMtWLiUs41MYesu0ZrnENMtd4owmClkXJUXa3mq2\nFr7u\r\n=8FBl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.38.5","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-850cb9a-1613393362701_1613393421157_0.9736692870832016","host":"s3://npm-registry-packages"}},"1.0.0-canary-b08805a-1613394614953":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-b08805a-1613394614953","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-b08805a-1613394614953","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8237c3ff8c52d2b48074df1d577c67fbb248a424","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-b08805a-1613394614953.tgz","fileCount":7,"integrity":"sha512-3K34p9Mu5QI4XTiPZz8T5BwVfh8VTiYHlGKAIWbQRm71OBxxZEVfBIvW/074mJUXWBPDtlOUCS3ypEoNahWeRg==","signatures":[{"sig":"MEUCIQDyF71ex65UlBk6fM5IuxWS2nSThWygvLA95kqvaLWWAAIgQR1C3yzAgEznIR1XDWdMkQCi8oAndfKgkOHRioE/Zhc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKnLyCRA9TVsSAnZWagAAtjkP/2+p8gchHIqiAb+82jDc\nYiX0H8xcahdX3NacfI0UMVp+ZI7Y5py2nqrTBkHp1DP/Lm8jmrZOVMikgedp\nmVJv9ynW/GriJ79SSh8ZqE8Xg6L7KbhSJU8wiPbqiOkmpng7snnKp4Fz8TuF\ntzgrHEXbgCNyjbx+ZbkS+FkoHhem7vvHv5PAK1rPpHGZp+W6IcKLt61FO+eX\noswUYwyClu7pWJoyjtbXwx8y/YMosMLePlEzXibAkEmzb1CR737xI04Nd6Iv\nRcETOx1LkcUBHF1IUOcgM9232waDFrMo9cKJfrV+ClTF8dYaJuyawgpeaDiO\nsEgLEBCubwoDVLVFefxMPF6F2m/zEdZRq0ppiLRW79kAxE1G4gQIIxn8sLTF\nhk7/gXx7heBewvHZfqo4bmkCVERkyDl3rZ/q0rnYtNh2saGJwe87mPdAIf71\ni/8wnw6w9I26Zzix4Epww3iDFd7jmtx7uh+YYeAvZsFdc8yntBz76p4cNeUF\nD1qJuQgcRApf0EuPLchB/pDGyOmrkDtcJOtqC1W2CPn19bflWgktamMmJctl\ng2LKob96fUxwJZMoipJVEp0xDIC3WxvDO6suvo+6j2bZuns0+QmEZGi/GYLX\nAmkH0AZvuuLyD3wgBpA6bGzg5TBk4ZPNvLRmhDZiHdI2rkOzFLP+BU3EaKLA\n95jk\r\n=jOhp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.10","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.2","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-b08805a-1613394614953_1613394673889_0.22840635671576348","host":"s3://npm-registry-packages"}},"1.0.0-canary-e9345f1-1613666335352":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-e9345f1-1613666335352","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-e9345f1-1613666335352","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"549e0a61e10c220d35a6ac8b0f92b2dd0b88dea1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-e9345f1-1613666335352.tgz","fileCount":7,"integrity":"sha512-gW25ZdguihXZEXCBb7FfSCSmX2DcTagEiZPsTQoFK+S4CLDbNxlTtoCpRTNOQ2ysOK4VOgqy5131R+uenwSdrQ==","signatures":[{"sig":"MEQCIHCnwzaLBcvrxPz1SQ368iNOYhOEAQZmGYd6YigUDdYgAiAWTC4W4aRz+XWgC8YULrt6rYQdgSNDrIkHuBtCj2j7pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLpheCRA9TVsSAnZWagAAu0oQAISkCIrNdTCU0o3Kf6QO\n/osdhm+s1goNS9EA0P7iW6ND1ODNS0kN9HACOPlSQAbyKXXfJEexqdDqVNg+\nhO6AmcKdZfEG5jOJ22nf94Fyx2RTdEeKbAWbBz4jZkRtQ3t5lhQkYcJ/zGGq\nu5ZbybUn0q0+Np4a8Nrw0ZDB1S0acMsymveeAGjB1OWYhKgsjBKyCNcCu4BJ\nquRlV9/VMfaN7fC/5pay3Sfyom4V39IUUTkBOVrsooHUnr6IPXovcjERCIbW\nleoPi7HkwUrYf+OQtN9f643+iWfvGZjyL7inA/gzNXOJGFJ0ym+GIpwRHq5H\nX7d7skUaLBm9UEI/waMYYVxG7/GHf+ykxQUlbnvuTqjMNbV6PlbwuSEfbd7d\nBxou8EXB8okiAkMiDJhIj5oatM+ad37/VRDLEBsw68GZwbJfCWB/iw3zvH95\nlBayUb9n4eGwU7oZL++Iax8qxJcxZYjW8yfb+pEbADjl4lRTzIc74bvbh7Ls\nIUWWjyVfp5zjkeEAeb95cq3zmAotMBq5oSAjUg3wjaX+BQIHiG9Q9F5WKsg6\nA3Af+GWtNQiCsKyeBONEwFvuHGX1T0g4jiGruYwJVpHoe0wmPBoL5hCDgum9\nY5xGPfGfJ3nJdysqQJn23JRbOcXgSgetxCe3vlCxuIslPUvN/rceerNnDxWs\ndeC/\r\n=JUVI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.25","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-e9345f1-1613666335352_1613666397561_0.13186784917579297","host":"s3://npm-registry-packages"}},"1.0.0-canary-7b489dc-1613791367490":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-7b489dc-1613791367490","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-7b489dc-1613791367490","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"85cd7cab9693482148755583713d96a3d2dfbd68","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-7b489dc-1613791367490.tgz","fileCount":7,"integrity":"sha512-FC9PjgfxxQJ3572+3nYbErnObvYBg5yHPnKQg7l8i0rkmBjqQLavWoQze5tnZPvU9UshyrMKO0VCJ+FN7I9K+A==","signatures":[{"sig":"MEUCIQDfLeUrcF3cjS4uuqnrkrJtRWbHaYmR1+iRWLXMqw0cpAIgFPn/jtr7z7zE6bjjkH0T8AWyoEKbv+Qy2kNw4I/N654=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMIC9CRA9TVsSAnZWagAA5RIP+wTbEHDGpGhaX0iOIyCf\nXzS0XSj6uR/uJL9L/y/9GNXJQvmGyRDJ7K2hauxnWvRcuZ5eixy8MbiahS0X\nTyR2gO7TmUN0eW2YFoBIJvYQ8GBSh8iOUBdd7K+x89Un+hSjoEMzOOi3ZeWL\nwfktNshi/aPHFUUv1WwHp6Cfpt/wH+FmgcN3yuaGwYUyvJpZBE1pqIwZk0iR\nSvdF9Eca4MsaXx+7J7IvgJCTJQt65p4wzfSZzgyhtm4tx+ey+oX+mNh70Eo4\nJYKLxD5MuhccNrJlcfMooDxxTUvoJV8cGgjhcVYIEW9CktsbvqxXPUeT6ofg\nkeZKJK6CJoS/Wrzi0tW0aaCZtj5e1dIY+9pBC2wi6dZFfuy1p/kdKlbj5MV1\naY/A6ZC1nB9BqYmLbnKsP5rWhvVqDWrF8b/8SC25c9upu1O30dbzJsMmo60j\nHxpis1Zl+bEG7BaXc/Oux4b6yah4xmyFkOMNnqlxOmdUl28z2YKXy8CTYHs9\nqAbW99T/ijEa75Tfyh0KZGHOLRG+Z7iqzbYfjXItebMLiN0688/j7REIjngZ\nDxJp/4Jd7/h91LVvVseHl7Uz2RG2jpH1rqe1XLQjX8veUJp0qh1c6P/SAZRQ\nYO1XP/bcylVeXzQwDG7kEpQkkygkgJWo7MnKEGngUQQ75LUua0zu/4wDpuHk\nyHfh\r\n=em2l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.26","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-7b489dc-1613791367490_1613791420726_0.34523650728022015","host":"s3://npm-registry-packages"}},"1.0.0-canary-c5fa988-1613865690742":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c5fa988-1613865690742","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c5fa988-1613865690742","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a98a366d59ce676c48db8125929aedbd53887c57","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c5fa988-1613865690742.tgz","fileCount":7,"integrity":"sha512-WmfNGY1tHXEKBFkTU7Ne2s9A9mtnWglFB1sF0GzvAlhtErCB+6ORN+jdGVRgnBGfOY8sD7dM6OxbM8EraXAuFQ==","signatures":[{"sig":"MEUCIQDuW/9UpGxylTxuO2HJXguARuo4E9Mw6FzLSnIT/3ycGAIgErOaDQeJ1Tpgm35b4GYaApkZya4c/P8wHO8YbhXqXyM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMaNJCRA9TVsSAnZWagAAG/MP/0/P/DWUtL+8d3n5Gb4/\nMh2ChfZIP0N1hnWvOb0XAGUSJIU5tDHyBmEH7LnD/7BXSaEDM5CDm8AO2rLf\n2ETM4wFtLZgkGITsipaqPU1RzPkBgBBUaeQI4cOj2/the20quyce7r2Nh/WY\n6il/cSEqEGfVBwSTSTSWz5/SBpkP1o/4qZwkCHdMPn/ytkz8xrkS0uZOwDtl\nTOXxDCPftpFOUz5VItLwvvxw9ygi6aF5BsHxkjKMAxdkDOmvianv21eJ3UsS\nHuVS19tODeIb9iiK85DXrWfoar/ymNyyvsFIsiPII4HQFnKaQsFC/EF3Z3mn\ncBZDPB9P/XoxLDU2PLrPGFBOlMjrP7PqbSxDOKpHx5n2qyMqGE42mFp4DidS\nWDSYcNqumbnhWQFbfKkm2T1Y0H3h3P0ajcn87nZGDKfn/+S/OfrXiPjui03V\nK2EhY6G/O8FLz7bSLrItOdsusuA7NBpFTD4mPytTHDu1d2pk5pBZtfCOp/1P\n4TUG8AmOO7TYhk9hE5urKsWx4pDYqM9WHgo/PDrfwvtdWhP+pdg85XqkkJBC\nHiquUK5gRup3JjoAdyPDs8/3mWNpeiBYXAoBpKfSR1btadNcXabjnXhj8xAZ\nJrPZDlWPYP4vFPezBaA7elcASdP0UkygAc8LFVKp27ALGttcAsn1L27M4IY2\nvlWn\r\n=YBRV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c5fa988-1613865690742_1613865801147_0.2607775183028105","host":"s3://npm-registry-packages"}},"1.0.0-canary-c5fa988-1613865692044":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c5fa988-1613865692044","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c5fa988-1613865692044","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"239c03de353753f31febe513404d88643dfca498","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c5fa988-1613865692044.tgz","fileCount":7,"integrity":"sha512-E0JoqCyyNaDQ53vDOr6FfUn9xZpSIijVCp/edoui0WEbgejv06FYB9XFyw7eJ3VL8ItW/PY2aCVee3c6k0bPLA==","signatures":[{"sig":"MEUCIEY36ZHquDfedBoinXP9bup4f5W/ZIju5FXUjNR0JtVlAiEAkZqEJC2PNGPS9mUD/yBEKGqVpzrlz5g//8v1qsEPjwE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMaNtCRA9TVsSAnZWagAAZTQP/3M5MI8GO4YE+jg0sNaU\nsBIoDTXwIvG5DD1bVCU0lAEVkb0qCJoFdZiusQ5xQz0ziJDF2j97g1QdU9sA\nkwgwM3mmR1/ZOLgrqpmUF7PJ+XwzJC/24iz/4g19TsucfWOoM4wJz/BeqR8g\nnvKs5DYuAn9ifCcvgpDv5mwFXngXziZ2QHg0wDcCJfKrrALf1ZTXdnypxsbO\n8aOL7nBaVsVLQz8qIf/6en0O4ktxtoy15vVukzMPu7wYaSviF4EmgeDg6CwT\nZQ+F/ZIzqfphE+qgBB4GFBlK0j17TmJrSkCkwO2ucbjhMfLSTLmPaU/fuyl9\nTelItp96AHa6r6VvT4+Dg9rZi6z8fL+M9LfnN5bBGI7yDaq1oLyLOsEVU6fb\nLaC+beMnhzvdQbfkTwz0uA8wCgVisdxOWRDaJTVDbYkE9o89CFW95h+sfwDz\nAiV/aCNEIiA4F7foeQ+0wXCruihCJRJvuGzPySkR3YwzUfX/qnxgeB+5FtOR\nTZIbK+pi9jWaQZ15wFTOL6q+A4gf+9ccFoLiaiz95Nk+74q/kcmIo+nJV5KV\nilMghOVXZ6vHR2jPk5n9L0l7Dsbbm6HHNcluwL8CnFDffNzBvo4hMgPv+euF\nXp4WEHlKIYiK0OEQNpjq2CyDxly5q39iwm034+0q6YYQsRUp5SlgypLkmAg1\nkz+Y\r\n=wZ7m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c5fa988-1613865692044_1613865836757_0.008346676506287398","host":"s3://npm-registry-packages"}},"1.0.0-canary-f621381-1613949368391":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f621381-1613949368391","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f621381-1613949368391","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9ececd1e8d407f91b466e3664c2b9d843b343965","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f621381-1613949368391.tgz","fileCount":7,"integrity":"sha512-PFg9GSsHZ1dYel3u/OTltjE4v1EcUoGciu5l7vp0xtyLpVSiglgQu8zs6uNo0SaVYMd8UMwJ0W9A056AzJdrTQ==","signatures":[{"sig":"MEUCIQDkbfT7WMLDarbMPHIznkS/suLULkpHZowmW0pHaoLdwQIgcauk/1hd/aa5j39G5f/r7h9PiL9ZXPkoG0ppHWRQ5dw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMunqCRA9TVsSAnZWagAASMMQAKObX075JQZOy03s7dTV\n1zdYD75uVhJPzvQG9WuvzzbvISuGx1OD9gs59k0mVGN4uU/dicbX7GQStRoo\nej4U/Jkx6OGivSuP/+L3XwdUfqXh+6nhqg9coxE2bmNqTBZRLjMZe08yZuAt\nTTa0YAudmnP1TVAcV16OAppofc22uI1JP3yAoPMSVP/jxiAQT9XNBBrdGWSw\nIhJJPfSut8lmytUoMxcLSHeHZSnymGyjF9/8Kl+uDM7GgEYX5zBRaohCB1IR\naBWoMcbDwJts5sxt90FWM+7PqDSGv0ejW128/eGd7fiGolhMasf2GPps5XJV\nYpQLuamAFJPSWIUXy5Hr+vLhQ8rDHWXyvpz1NICsx6cprh99RwaNRjZErtF4\naCVMI9QP35DrQf0RB/G2SPGQYlvPgVZTatMaHysuU51BBAcKTT422NC/xugX\nC7KFstcMR9AjkzoFXWMeMcxUSGDGCImxBOghlvwq7juvhf/Nm5PDZGN64PBD\nlFbBn8/bytC3LTxZ6sd9LUSFj+ICWKvqL+9cTAfRcsEj2bg9MYsnwzd0d/EM\nJUKmQ1yG4CfVqJ9ITV6U1xWfh18QDdezIghRlx0E51X+vG0h5ZhtTtDA9w0e\nao5zK0eaDhmoVg4QW8nUQUiR//Ro2k4z08XpWhbFOxW3lCVXeV57doAbrxCh\n4wC9\r\n=jORj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.29.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f621381-1613949368391_1613949417450_0.6469039101892313","host":"s3://npm-registry-packages"}},"1.0.0-canary-a756664-1613984643925":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-a756664-1613984643925","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-a756664-1613984643925","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6d1bb99d4e18eb4f8a270808f95283339cdb67e1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-a756664-1613984643925.tgz","fileCount":7,"integrity":"sha512-U8g5s1d7Tq9Q4w2JK76NJXC57cP7xQ/tT+HF7ZcYfICn4KdW3iQwLyD5eGpFAUgRBilhc3ReAQQc4ZLbXKOrxw==","signatures":[{"sig":"MEUCIQCkCashruh+Re2lXmbYTeWfKxU+xZMe3k2JHGNZ6WpvkQIgOy0U4xrEC2vDSi2YDscmNx6D6ybsPBQ7NirAh/BVXQs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM3O2CRA9TVsSAnZWagAAttcP/3L6WpWUM+dGag0esGY4\nL5rzmwmV4yQb4/IzoIJbq+oEOfNfLkXK19rxVvht9WSETuBRHWh39/vI/QEa\nDspWPRjd2f4GGK3LabQjQrt+eDirhMg4CFEbvRzmyGKP2V+E58KxGdxi0jcZ\n2Y4VSt0dFkR1HpYOatM+cUlxckVPLOOACpbZD8snyMN/aGUlLmEvo1oAgHg3\nouGfyxHH0RiSJlX0KONiCo/rUDloC5oXQXvyzqz5zVRhQXuJxlzDB3MA/tjP\npFU6zxgkHSjCUazVK644tHATAhgFxIskiUQDMhsFlwg+m4WxyrtJSn1YDQ6m\ndkXIm/2ndfIu0MlNxiF4Ntd8LjeQ7QHHtppZqbE7ydeZyWswcfZPv7tx1+vh\nDKNwpeG12XVHH0QAbg17lN3kkXu6dHrQIGlbweYE6HnOaaltTg96A3A0GGbq\nGGhUzPJZqXQesm0IaPQDN8uOH/Od2XikyWSTEHufyXfA7HU/OvUOJlN/r3VQ\nCxVACVF0A1L8sYg0JnX4SLV05SNinek0nKZ5Kulqrd0V2lbTBtyPapPMHKoL\nAFWECId8X2BbMqR5DrwuQaSN2HV7qluudXAeb6ZNv4EKXOJIi3sk9smtP/Qa\nf9P3tweZVYYoB1EP7HHcvHHgAZTHz6X0vUeeEQpVYUatAsaizfs6SRxkH7Io\ntIQA\r\n=pB5C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"10.23.3","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.1.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-a756664-1613984643925_1613984694260_0.7968279242453886","host":"s3://npm-registry-packages"}},"1.0.0-canary-d715ff6-1614002165868":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d715ff6-1614002165868","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d715ff6-1614002165868","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"18e78b7a16c8e36c1423a51baec8c699b75fea55","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d715ff6-1614002165868.tgz","fileCount":7,"integrity":"sha512-M4n0/e8LA424jAxYNGlH73BfyXRlljfhpv31uCgQVaKc02Zuz0NhdNneiVWo8eAYJh9+8xoFESacCWVE/qKoSQ==","signatures":[{"sig":"MEMCID09nZPRkc499zrs21gXtFz9mEcI1ntEXBrfG+8WHDUcAh9ksKLZHjeRBr0Q1tpB6X281uMuC1v870QbySr+mF2B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM7gqCRA9TVsSAnZWagAArBcP/jJvdryJq/GaKOvJKrGj\nAQFOeL6z7PW8MvZEgBrMB+qmjGGNon8KLL+pTqBcOBwQboimvZOK7neL8mgX\n3leUWGSX0ugGm9jWqi/hsal43pQOBJ/kDHH0IKIKoq8xZtIOh3uGwwwKRx/T\n8fLJZsKhZpT9qSzs+41s6rY+z1Z/Xz14kNUc+8G8hIrqHuH6AqYbn1VR2vdA\ndLoA6UAibRnNXjkDdGn1wcD7iEi0nZYxsHyds975d6dZ3c4YHaWhy4uA2Q4v\nIIHQNn9EAnhAf9g0npgsAwKArmW58ldUruie0+PKDw9zD/lOWBb+QMDqab3l\nA8S/zLluAVirojEIOqkWABwZRAeR12yXeSy1XU5wD+Ym0AO7NdoE0X7gvUR0\nT2y3R/G/Yd+kV7IqW7S/qFh+R0SIk4NjWyOGCjzHSnZRdrOMkVPBsqYedHqg\n2TkexJ/5RnXcobLV7+E2lHniVdDryo87+/GYqCF/phB2M2NUt8WrkRzbsqo6\nKOCBrhGJjTW/WY7gd84jyid4SmRLAlKrCS9M9qnRnA2PpmGT680WrCIqMCAG\nUBGLq7NxXCYs17WB4CwVReE/NRdl0pnKERJ2+c8sw1SQxqWP4KsgSzKe0pLW\n/aWEhTYUXXayJqtvH1A5T7tr0Aww6g/OICDMjpebYgrY5ANM5GK72PL/RX/w\nNaqB\r\n=6y4d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d715ff6-1614002165868_1614002217838_0.9754001121780467","host":"s3://npm-registry-packages"}},"1.0.0-canary-420ea6c-1614005038212":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-420ea6c-1614005038212","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-420ea6c-1614005038212","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"68f7b111de167ed6f29b4818805cb6ebe286c06a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-420ea6c-1614005038212.tgz","fileCount":7,"integrity":"sha512-T1XJW0Y64O4VcVoumsrqFUAzc/u+qVKRF9Ws1RiYcN1+o1hYQmCSqnuWTVVYKE+lqBx9914jpUhfZqQOGV0QCA==","signatures":[{"sig":"MEQCIHSS49Pr6HZclB6tzu/V7rGmUU5cwa1jYQrwMQiZWB2zAiA9ef8NjSqis5ujD/B06h/gl6qPqW43uCCbFZCrajIyPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM8NpCRA9TVsSAnZWagAAA2cP/0BLwZkwuKD3YjDDSBFB\nb72Z/LX/QW+3AyksWeDqyshhioH8UVWn6BUQ3PwGyur731Vh2C2xSibsdQBh\n4e0ANxhIN0+VbPhZAVndAARlF9kU3ilszsjWJcXOuMCKqLfgZoNXWlo7zVFW\n7hrhT5B+JepZCoP6pk+EHUYSq7UCZtEeKOL/G9V49e9XGoePTROkgw26SH7V\ns5dPwzBcByg7svEptepMxy40oJ3GiHLdeJ4UezBIjzyt3Q6D7MESzMCDo9+9\n0UkeDJttCKnM6+L5NifGy89BE+wcIAQ3Uq+Cmo999zHgk310ojetp/61XeoY\nYPVLdVZXoWmGWkBqb5OZWMCh8YTBGio1bM5Z8JDmYZDO+fv8ecXQicGoNbMs\nYHkYNuGN0Z0LJNcvXm4EXPYvoge/ogMghbxm2OOFKVKU7h3yFZ7lpBNdIoi1\nBinr8qczDj4BMEMoZWlvRkmFGm8KmQ/LgpwYPwv+m30W3dp+Bjvul6usKs9P\n2x5Uj5K/EeFHx5+CXg1PL1F15Xj2f5klPpr+utOsTdY7gPtubKuR31iyCARn\n/RHuZ7Cep0ql4/MCZDviZMff2LQcaKVsal52sAxkFl0xSqxAvoqPE7BnQNQM\noWo0cjp04sUut+WsBeHgHmnxpOXv8jgyBquHTW6XZuDeJq8wmKVVbjHTHDdn\nOv0l\r\n=F0Dy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-420ea6c-1614005038212_1614005096594_0.9423927378926171","host":"s3://npm-registry-packages"}},"1.0.0-canary-79dcde4-1614005036115":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-79dcde4-1614005036115","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-79dcde4-1614005036115","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"295cf10efe0f10ed401a8eefee427904f9c86b31","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-79dcde4-1614005036115.tgz","fileCount":7,"integrity":"sha512-aOlu8HyysNqDB5PCYa7Yu5nhYuGVqZM3poAHhnC/OxqgqbTIT+30pxQQ1TFetKzw2vuESto2P8riRUMXIUhaKA==","signatures":[{"sig":"MEQCICuVXIGrDExcVKtD733extZeriCouJgujfli1Q44wum1AiBXX2Lz8KUdBH3e4TbyjaBAtiOz+H+gJhgMLK9+zdw8YA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM8NyCRA9TVsSAnZWagAAA1EP/jgvTG33K8NVJcNWm5JX\nkgYNx55EidifUUB93UZtN5CsphgDiS7LvxP5yVCifzJJlxiMdT0CAyV8IG/p\nG4AH6Nn1tk8CrPD4KCfpjUOOSiXmxvPX+zLi3c13NnKxbtzFhTWEnr8QYD3f\nehFQUH12Zat9Gp1kVY74VMRX7WqOekJ/IRzHGoIjQxzUz3ihqIxnqQwN0n3q\ng33EH5OUZZ3+TVTyPw3kMS3U0tsTTBZDRyh4iNNk1G/xhtM+ekFunm7LOxHZ\n786L9Bb78gt/NNvvK/zndbUd23EYi9GcAzc8gM433jnmDuqRBd6GhBZshkDG\nGu4V4x1qvXEL+9UEvMDU8EOIjrK/EwaP7+Nt6XrA0Ze+TZKalKhUksNgkIqc\nRkszvM1EIlhBaonHg6CdrcTQVMScet/s9g4hAq072DcnsLnQKQdcf0USogng\nLIEmk9MtEin2JAQV2Esu5wZReExn0H7ukDYGw4+LlsRhZI5ie63kr2rEPlSQ\nwqwlZO5QnXuU9Ke217oIuUXekUkbo7lNMELehjEliqhxaojYbtoIq0QQxAYu\nL0uBrcI/VdJrZRdhdxjDKWaMoaq/zGGs7YaKG0RJC8yUrySmFcAv5H69VJVU\nbkgJzC7aS/AZlUWGkCfjEeJ548gGY98kO4ehiofeMjREEI8+c48PRxZBQuHx\n4FqN\r\n=crKs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-79dcde4-1614005036115_1614005105680_0.31602772748731756","host":"s3://npm-registry-packages"}},"1.0.0-canary-318b0dc-1614008904760":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-318b0dc-1614008904760","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-318b0dc-1614008904760","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6a510031c6263cb7f413736111d4463aab21562f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-318b0dc-1614008904760.tgz","fileCount":7,"integrity":"sha512-pLi+5yA6AR1RmWhs4bI98Y/p5yrEdwsZ6ejhqKXdR9JCXjNfs8XV8LI+8RCKr/cpxRAacE2LXMIgxK5+eVM6dA==","signatures":[{"sig":"MEYCIQDe+7gasx+KSVVxDfj5sIBCRgfj/eBNS11hHBDKJDvmNgIhANlSH8ow1uZQKcp0Wl4FIYl59fVSTw0WvhSkPsX+EggD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM9KECRA9TVsSAnZWagAAlFMP/AubcAl20SI/qK9cWtbm\nR5zxbpzBTsixFf/Uo6xu8ykcDZBQuafhM1QnsipQf5bk/kbJ3oFZwjEU8G/K\nwc9/LXWc3QnlSwgtumVcoV9r7pu7XtgrP+IXQAH34up0ih7TGPOlvEX9SCan\nWAZmEaGzAwRwskIWB+RiK8k7hxa5VZ+gCgjmAUFmGu1713TxvQxHSKRzFiav\nH5cm0dST8avclnwxDKxYwfEW1ZeZ5iWSVbPpfdYZCm8GzZg8u37uFd6bkqQy\nPyDpSvQC0s6oF5bB2W65nANMNNw0RJwibDyCBrKCYN/N6q4OQP2Ao48017kQ\nUBvlrVqWG18PRna6xKi1LgKFWbLqlH1pN0l3VlOh5GfvkhcbvE/5srGf7ZtJ\n8VhWHoaPxCMOLeY3NHICg20HKmiJcqBcY3BTlaGDWh/bqlW6hRVAW+/ZlQPs\nCVVnyxTnZbuxwGcyW90AcCw4iYR85bedi9qfl3dWZYZ8VFVNL7qYDLSVQ0rO\nTB2iIkgxy8I/GUVErfF2CPgUNE/rLK70H/MGwVMVHmuxJ8IoHpOGH0Gs8iyS\nJq5KRvqjQGPWC6NZvCgABage22CcE/3ANVIUSR+BpOQKRkXxep2FyLd727n6\najE3mA5e2lT0u4mtahvogYU8c1MdJ2lK0N1DPabi54H9z8h/LsxkJHPsKe92\nn5Zo\r\n=LIfo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-318b0dc-1614008904760_1614008964205_0.25249427284110504","host":"s3://npm-registry-packages"}},"1.0.0-canary-2e16716-1614008935320":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-2e16716-1614008935320","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-2e16716-1614008935320","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"365e5ad382ab287585f174ed9fe57d6b607634d0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-2e16716-1614008935320.tgz","fileCount":7,"integrity":"sha512-CecOYa2V2+wR+jYiAsVV6PYrGGKzeOP7BIHtToyLEM+jiF3ZX00tYrFqsz5qImJawtZgzngVhIcgOAW6GL8Opw==","signatures":[{"sig":"MEQCID3lc7bGU9sWhz7NKP+ycVRbU/ubN3OGqBvfsj0XzOENAiA6tSWJErTUhufU98s0ZCzwR8GHLb1tPwJ0Lt1w7y2Wtg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM9KeCRA9TVsSAnZWagAA92wP/jkf4qFpNgPVjxV6JYdZ\nL0aprrdB/Um9wThUfs9kJdF4CSMXabULQ1pC7RqaJl/kJPKIJeYCKhJkvO2u\n4JXJPjmO2DPHxnqjwxgokvIjChy+aXzf+ajQ97cMPm27DIUV6tlggwDaMtG2\nnPcmzajmZqPE5krQ/yf6Ib2oUcqgtvp9gL/FHqi1iPeUJbMg8pnMQJSLwr14\ngYaB99mZlFaIMAYEyWfdmjJcQAhe/r2ewwiiRMsQAHb4IwIklN8G+BnA1P3J\nT7YpBOFpk/DM87UiDgCscGMROX3HEZzDJF/opLIowFeYy/kYk4v3ylN7n1ng\nPuqNHYrrgCwX6sPkdGLwvdD9U1uQQI5JRvu8IaUkMpoGbl3rcCvNVPdUgLeg\nZ4Zlt4N8r3NXhdjsztgJ00D30awAn1uvQPZAMjZ7D89QSMOvRDHS9fE0M2lf\nEMG18bmmrgyFF1ZAF7H1+Uiiclj6A036WSL2YfH6nBPvoejfh58JUrDhVZY6\n9IUI14GkSFEPJA87MkF+PwO0lR9tnxKlKj+TU+DWaDVRWyhZM0Xa1R+u5VrV\nMcuWwQeAvgGptwzZiPiPE+dk78ey4wRlzSDgaGy3IjfKy0Lflkl40gvJSnTq\nulDQd3vVjgR1hqZ72j0e1YOl9uj6/4Ep0lgtapgPcc7cWgq7kOY9p6xscbpD\nKXKV\r\n=lsiR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-2e16716-1614008935320_1614008990488_0.5495494993203294","host":"s3://npm-registry-packages"}},"1.0.0-canary-f4cedf8-1614009445956":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f4cedf8-1614009445956","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f4cedf8-1614009445956","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6ccd4b2d240bc7dbddc44af2821ccf3f3d2786a2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f4cedf8-1614009445956.tgz","fileCount":7,"integrity":"sha512-LPgmnGCYrXFBrBOEu0JNxL6a3YWkcQO10tcj55e7bYVYOLrXJ3PLwE0YH/4CQSHn5Dz+R6tNeVqGTXzcIwRhEQ==","signatures":[{"sig":"MEUCIQCn59AFZu27l7kjAK5RrAtPdFjCgq2lMzo+rea7SaozTgIgdWZB1/X+4wvtBRsLejv2XBHG5183/8SPHM/mTjOwvJc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM9ShCRA9TVsSAnZWagAAoEUQAKUkoXkHOIlP7MAOdFy+\nt5OMNIabY8N5YBK18lpTqp0j6fqupo/hrs8IZB3z+HPYNfBFLr16V2bU7baY\nPRE2Ozb0KawCWz9p57eRVM5oUYl4Zoq91A7YiwQrU6cC3XXsd8wdlVhkhbBY\nKc/bomTrM8ewoau0ymRoBa4zuzlEthkjAxYaZS5SXjVBoQmqrjCMQdXQ2qvu\nAN7JaYpLjOg596kg6H0U0pL3h4DTP7s88vxAMrCfkS97BPzOtmvTfwFh+ghS\nrN0XS9s4F+/SxdLP10O91m5RCH7e0m/8UEL298tQl4OHMij1TXXEmkCaMQLM\nJdbN4sbr5x79aKQxOtul6vNnNTwVJmpSykQ1b2ljj/12F9TAhS+V4821fq9w\nGen7TXJXwfOiNGyrPHNzkDM7g0C4Ob53v5bIk6ixCIR/Uk1+nAR4+XW9ywUC\namGCR90QyxKt8aYYeVjCZ19IewFQOk1hBiGzx0WNzRVb6tHE8iPeWh/fahQc\nM+cXpLH1VvnuySeKORXHFwp4uzw12x3vzIUnt7ZJwdrcLaGa69lFpOgPWocB\nZRl/BQpmtzKEoDng/O8y1VpJQtRrTBIS2YqRNevj96WJJYq3Nee+rxsemAmo\nRe4F4rQOd6egeIvwLWdpcyy859ptG1rpdliSkIjvRmGgCUtouPu0E1np+MbU\nknBC\r\n=K/A8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f4cedf8-1614009445956_1614009505286_0.8429032020915395","host":"s3://npm-registry-packages"}},"1.0.0-canary-8603ff8-1614013722243":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8603ff8-1614013722243","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8603ff8-1614013722243","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"24ef180ccf9f1543e52d06de2280a1eece70ad0f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8603ff8-1614013722243.tgz","fileCount":7,"integrity":"sha512-6kWTNtvOP+ckhZKdc8nNYzl4r11Gu9o8h6VLvzvQV3Zl/DY+2/YItg4RiSlK9l3dDlY9K/6sBaPsem7sQi+dvA==","signatures":[{"sig":"MEYCIQCFG29p5Hn2ULtRMd3YMh0/ROhGz7ByKXYd7jRn3yxk4wIhAPZOuK4HhHD5zAVbCI064oey6oK0I9liw5d/xwgYLSop","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+VMCRA9TVsSAnZWagAAe9MP/Rta0R0DTrziabV3g1/f\nfIQYUoPRYQ0RA2KuKHNjbpqObTlexsLuoYD9hf2GSM9nQNVOAaXFEMQwuVfB\n6iLbE07GlMunBse0gvjqo8TKOdNXErqGOw0LHBf48DSCYRMXhMt/Qt6LsTyM\nhajtPtX/ICwAZHMiJpDK+Vt71WIV+ircBMw+JLBZvDSXDLcwmJ4YzV7UplfY\niqhw4xG1YKGmg0nxh9/Z3b3wYjiAwWLcKYaE+DKaP23sORSZ0cANtAnD8OnE\neimdLCd6t8hBGsRRz+GFqbOWT7+4YzAeztiAUR+a5vE+6uANigFqjqOkffTC\nGTB9OunumUq/Uqb+Nt+ZsEfcssDhvVPuaWVSsWd0iIk1kiTp9NavtTeZbA9h\naWVYcQWe2ihxt6rMcRVpClX86cVka9+fY8I8zwJDYOLhZx5DkQGYn/yfyhxs\nB5m1LyUCePnbTBYPaaGA/0OfGeMUs60/w1gElZK+8CgVe4XWQ5BLoXwofzCW\nsTDB2oKxtF2KzkiPIhl7BmssDhh77dZqMZ2/sTQfv1jWw1LjXz5zYLXE3ofm\nDgr5V09rYGut8Fk7Z768YF/Z407dRlQd/kDlO9PjT7BA3ExO44LQbQGLDxZe\nul+PnEvzli/cxgOOrXx/FAIz7t0G6QiyF8f1eEOVvjohsa78bfyIUX38tVdh\nrXhA\r\n=Xs4D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8603ff8-1614013722243_1614013772409_0.29801111447835793","host":"s3://npm-registry-packages"}},"1.0.0-canary-8603ff8-1614013725107":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-8603ff8-1614013725107","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-8603ff8-1614013725107","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8231046fbc8c3d13f5c68b890550578beb162b7a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-8603ff8-1614013725107.tgz","fileCount":7,"integrity":"sha512-JsHUoKWXMbBY50H9VTBLR4XC5ltHAIOjWJ1C4EIaveO69RBeZ/QMVXcuYEYN8Ip/LZIkfGQn6erAzkF5C0BhMg==","signatures":[{"sig":"MEYCIQCWeeSqEOHvLLDunZ2ftViJASqN8tMs9xQPbyq3sHcgOAIhAJq6jgwGggRHFxitcAIZGUgpD2fp7vhnhzmIxBxWzkJw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+VTCRA9TVsSAnZWagAAT/MP/R6IRZLwR1lIhiquVscA\nSz4M3diIh0d+P9Ym7Xtfl7fJQaq3zpOysvpaU7E9qBMNoudtEXLMKWUxc/0V\nh2tCriMfXksDwW8jFcQw3GRDvgSd8ER1FyhoxoyogkZM8rtlAtx2ml/wUkp0\n4HEFeZaDu+yOi5j+3+8iDLvr4AdGYJbTl6th0x20msJ0JcNHMaWgLInFEDJl\nTWhsTflAe9aV8hHOL80q27REVlmEcEcK4Uv4MibRQaY+eNzqvVJP0+QCI2Wm\nCJGsDZqgWh4ryXuGu1glZY9HMg1hdS68c8yiNou7lhsBk3tKJbospYYN4Mew\nEN6uITFztqF1soV7lTclsNJN2ob81REVY0h0WQKQldeAof1KagvA6UsFWwxf\nT9Bh/3FzJKZjLhmQ33OekAJN6JA6+ro+irswxjZbAQhmlewl8NRSUqcv6UaN\ngDqvWn97DYHZSHWhYC7IhFGwy/s2iPLB5QwtKBcu424ZZIy1DsIHIJJRRD2u\nUDS/bXwGKRYDHMEWzCF4WOR4GGSt+CIThOMpFf9A+dzD9+Kr0o+RIFyczFDT\nGt/LYTVHN3vhOiFTtm432VsSpb7G/HBQrlpDsEmN2FhArija4JdpsTIByafp\nzqtjhFk6CGRGBDU36Uxs06mQarKHeLMbn3Rjoh0x0FJgmqT3FsG60PJ/lDqQ\n0jo5\r\n=610K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-8603ff8-1614013725107_1614013779297_0.7663807931200353","host":"s3://npm-registry-packages"}},"1.0.0-canary-5e9fb96-1614014614894":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-5e9fb96-1614014614894","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-5e9fb96-1614014614894","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fa6540e99a3cd71f9e27d7f41e0505d6c7da51be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-5e9fb96-1614014614894.tgz","fileCount":7,"integrity":"sha512-HtnmgD6ah07HB1cnbfk15yTS9A4+hPIJXpQG2naEt8rnElbJgAQZMkSJNMipUgyGp+hWQshBrO/mJr0Aij1FZg==","signatures":[{"sig":"MEQCIHXMR6XP4cTDU9A6+C8N4Jz7xlcB0I8lA7epQQneWLprAiBBMIMt7N2LAqiEFK9EcKru7YKT0OsnU3YTYOb9keeLyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+jXCRA9TVsSAnZWagAA3woP/2ylSvph1LOE+/36/qz5\nFZSspxER1dLLLCs301VESend/9znxhZC/iteYEVtWoEo30E7AgPSYAXPIesM\n/wmFTlB1ktiaimEETBkkxOB3vdKj+jsZzsAxvWvm/62IQ2ey7Xmr0Kvvf4Zv\n1l1/SwhI/lHcQ0cGSwQB6PtEomESIqHX17KdNTe8QgMgx3bcdn5/YLcZ+NIb\nhCu3UVLr1Zl5QcruFQvDORp/Hq91ygUN+vmqSt6XmHn2ffUn87ENzugY5EK3\nRLwUtmtW+PKZ6a/JoX3BRNeN7nGOxcFajJR7kYfUFPs/mI8TLSCmnkfjc8FQ\nTaLPoncMmWtcvfTLj3f/4yDFmEsAEt/FTo8C5adQgsWuMWyrTOUW1Z8daLRa\nIyC3Mp2UnifrVpXHz+HnQomApaE3KjMsfXak1Elf6uTJcvf37ScePM4Z49bf\nGg5PysZ92aE86p3BxSYdSdv7p3fn7DBIvxl0oNy7IS7YausasBSQaZibfK4a\n/u4dGOaKs7gmmUdd3yga2TiXrUoxa3SqWVTV8Po0OG2Q+kqb/a7Y3+z4VOcM\nUFJK3Gm5DHPn5xkYXk6kpM3rAMtSs5E9CN6VginE5YvP1oFQONSgqg6lU95p\ngUFuyMNsOnmlk4u/pxwHgd12ag38S3fKyt33Mj0TzKSE8pz+AJIqOJTga68O\nEvZp\r\n=5UCY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-5e9fb96-1614014614894_1614014678570_0.17975219423992783","host":"s3://npm-registry-packages"}},"1.0.0-canary-c552337-1614014676798":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-c552337-1614014676798","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-c552337-1614014676798","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"819173e3b875762a9e602407d0851f8d37a4440e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-c552337-1614014676798.tgz","fileCount":7,"integrity":"sha512-vnc0mo+Tj4i3OXu9zMIlHltFjsYt7P0pAHxlaOC+v0fogZ9XpTgMesXyRQkUxSobBd9tj2oePV+H2NcGr3Q2Kw==","signatures":[{"sig":"MEYCIQDVn+8rfiBDUdwQNfoJt/wcHBlufrvNT/o7O/9H7jAsoQIhANBnN7BT50KBilf2jAZJ/HKKwi/umsTNE2urBvfB2jbK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+kiCRA9TVsSAnZWagAAowMP/jgxLGjipSIxbeDuWrdq\ngT+g5W8m15OUzx1ED9Gn+sT7CQkixsznt9eZSeoLDEK0LbLVokH+CRsS5eLM\nPAbwranBq16mC9OyEQCo4oKAL5gwyMNpFFn15Of5yZe02j8M49rq1dxp25Hj\nY65UNijcm2i0ZBcfLAsdCaU7uJbnpIMlLhsOUmMSWuCbbiAdvad2kyvCnnBl\ndj12oUIbEOdbg23yEoK5p8nvCOkD7bZVAA4XVA/J87JXbSx36k7DgUjEau40\nTDpHcSuMVGkOd13YgAwitpMb9VTBk+x/wscOLZ06o5/YSZAUUi0Mmb3L3nq6\nM8ZXZxsiWFwTlW0ItLZ3Z6yhfdyUa6zqtv3A36uXAKTfzH5qEYf4QhQT634r\nuvzyKmf+84V7ZrsGk1XGZ6MXGpMyE26PHPIwP32m1qxEoxWFEQWJ8oIXQNMr\noKMWdtU/q20t5Xt7PbhjmFnA7RUUy4YR/iOPBJLaOT+DGgZe6PiJWwRbwDjd\ncsJju16DdMYKm75VcBKdLwYO9pavp5Kp3DlTtAxHCH5CRqvB/GlQNMySqy6o\n7Do1qLD3ftq4gYQmTRFnPgNkUslahTGgMaHbAHvpm3f05uP8hxU2nZsVwZlF\n5L0xLuqQteN5ApGxhPVMaVvjTMSSKgl27Vhnb+TbBEDr/Qj3R4vUpRI7QvsT\nBEWi\r\n=+4GT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-c552337-1614014676798_1614014754006_0.12081893035459612","host":"s3://npm-registry-packages"}},"1.0.0-canary-d890774-1614014874449":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-d890774-1614014874449","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-d890774-1614014874449","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f793b8af3d5d550d7fcd8d2f58b3a7f5d5aece17","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-d890774-1614014874449.tgz","fileCount":7,"integrity":"sha512-W7q6ZteWklBPcZ+K+zpWGzvtF7N3gWws7stQbPaG8WoAiPTwfUk01RBb2Dltg3IvAOUxwGxi08EzptJM+nRByw==","signatures":[{"sig":"MEUCIQDJjnV86Owxj5DYlzWPYlFM/9pPcWZhyWPpNlRwSEATiwIgNBMJNkPw1obLDcjgHku9JKxfUA00WwJToe/2D6CBjGo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+nXCRA9TVsSAnZWagAAuWcP/2TJXGBEUCtOvtnq45ZO\nuzB0oawsmZZBq3gQWBsBUj2ksTiYfG3tL+KmvMLJev2kzL6A3J19LZHdx/l6\nGOlM9pgzUao+RCjyMkDP3R5cDHWb87yvCpLoAVZys0G8xV0xKYuHGp0q56Yc\nhAlOTNoxY8nj0J5p82Bq26bKBUIWzjBZYzdENi3JKsQpKV0LalhPz5EY0YT3\nBj/onPDClL9mBeWTZOFJE66GLK0b57gr1RECTKq9MrBeghPYT3QSle0QM3ZN\nl4X9Phue8B8jbYKYIecy7yH9lZ1++2IbXfggLbXiI4SWcJS02ErrWbmIh96r\n9W+NdlEvt4ITrVnX7aZstBfIvbvxLorzX+GgbQLxWaJuS1VyTWuHfIaQ6gYU\nxBWbf/hTXNCVZMDk6b4DsQM3HW39KrKVT2diHl7ncF9pdQaDSf7VmdPD3L6q\nr5om1pkBp5LcrKpS+UrLrvbHVTtmI+5LDEKq087whIGstwWZj+CFDZRRnVdv\nOl1Os4rT8jlWMNVL78TaivgxzcI9YF0iv0yjs7CxIUCRAbR7u18c8/fhO9zW\n3wv5xGBtO3YgfXnHuJ41svHbZzCURvdcAJrJz4Lr3nIlAjNSlNus5tAiH31B\nkJUqm44Dyjjzd0itCfkSILgPEWOCJb6Sac9dV5VCeAyoUxDQ/X8OeocRDS0K\nMn1h\r\n=disX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-d890774-1614014874449_1614014934631_0.5382175352329122","host":"s3://npm-registry-packages"}},"1.0.0-canary-f3705fe-1614014925909":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-f3705fe-1614014925909","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-f3705fe-1614014925909","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bab0ffb7fa37ab90b03d2e54c8bdd4ba7eb87b21","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-f3705fe-1614014925909.tgz","fileCount":7,"integrity":"sha512-81s8z82wsQoM5iLpR8kqJYG7REzlXRS2+uOPEEn7/mXFgAgG9fPdV9q9GhnGB6G4oT7WC1evZV5Rc/2ZYusBoQ==","signatures":[{"sig":"MEYCIQC/hlKIyV7JXcjHhtHTsHX7ae6Wp75zJ1pS/bQesONThAIhALIk3ixc5TtdhC/psM2SUCD9mCoKu0xTj6ryW9I1nTmZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+oVCRA9TVsSAnZWagAAdugQAJ3XtDuom88MkUCJLP3T\nxvgp+f8z36byTgFFpJjXY8LKFd22D1ox0YHMzgNK2msQhlTGCFMichvIfLjB\n79OktniznjYjygIrmmaYDNGYct+WZksZncfVu+3u6h9eS+fDIXJXwEAJMssU\nYu/8bN13ugkTPe9myveWF8/I9ZdUgXBsDSQYz1J9Ll3RDaD1nfn1rAPKJBOX\noBMdpjMTRXAqFKVxWtwc1UBjWkN5/6i57UGIhpNBNC9vGeO3s9st9F2vIzXC\nBKzmBkZTgDXzi5O7Ksha8U9BtmVd1ji6+1dj4gHmHtWscj9GEHsaPFqhQ3VM\nzJcAuo7RbsyjoyRsvULT1dZsfdERpnFBaqG1z3eys38cSomOL8NYYPitOrox\nPhtNplt4Pq0Rt0IvnW0OCVHub5U5OoCgjkSDMMpk09kVZvRiTXVSznVXVvkT\n8n7Inbwu6lc+fc/nAl4bQpjtO0dLbBp9LjP+6iTxvaB3YIa1MRnrusJ31c7m\nmhCnHYOwfI96nG6vxc96ffNf+HFaJypo4aMEAF4t6B38GdPeq/7nWLp1/epi\nyHlGoYtiWbul6jDBhcoteEWSft/w1jeB24vrlQkous+yRLRQmIs03eeeatjK\ntv0MRO9kFlSSlUyVECgOkzO5130d6gCNVlnR/Ltcazhag68KAftbVJRwisfg\nFJjs\r\n=a/IT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-f3705fe-1614014925909_1614014996398_0.9804808762929433","host":"s3://npm-registry-packages"}},"1.0.0-canary-fe721a8-1614015002988":{"name":"@iadvize-oss/store-react","version":"1.0.0-canary-fe721a8-1614015002988","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.0.0-canary-fe721a8-1614015002988","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"01312f0b91a10b701bebb88fdcaa9b11460bc7ce","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.0.0-canary-fe721a8-1614015002988.tgz","fileCount":7,"integrity":"sha512-CX/B5QiS37Q5N5maRIIokwA/LWJmv2YmE6K8ZTBAPfMC8dhI1prEvGvWhvBdpXL3JRlnvj+6dIG2VbWuCPDXLw==","signatures":[{"sig":"MEYCIQDRcShRTJnM7Rnjdudcj7O9fCHTG7SR7Ofn09a8Fw6UAwIhAO/YKMVGmXFMvckfIE+qlcMrLNivV7M4WZxk5FFsoB6m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+qCCRA9TVsSAnZWagAAvOcQAJdTnU/02uXcwn6qudBr\nRz2v+zmoeczqtJTNF8f/pwviW4A4jYkD138YavzhG8WoUwB4qljBi/jtCnvb\nrxa7gHH+UGMDUN9pm8dTP9RGdWrS+yktpzkF5CaIZ4oWR+YhHtGgWgFDBjwg\nTnLDdyrE4+tbiXOxM9i3PKTInej7DU4lqP040KKtCB6RP6WR+OPR5W7NvbiU\nhQyZZ47u5P9+xArp2bhhdDDSILOcExbCNFvYs2zhWbPE4twwSjwF8tMTvi/M\nCMD7IfQheutH9rrSttzG8Jx08CXKVgjuz9FKRctAoE20vqpEMPn0ycikUGAp\nf1eCG6AqShv+QM/O3wvSL2jG/SZ23Biqxn3NPFtFiKhj/cTX5mDdWX9hyHap\n2cBYDaWTV02L3Quc87OJj3D0T/KSjN9HVcNlnqOuf9UcRk7U7SJCf60pTzAq\nTE2LJtfJOh8tGgGP6WA3HWXAY1DAUAxSb/PwX8DRG4OFX1C0nq97BlKpVpwk\nfk8EX6OcF6VDOXs7zzI5mWv9VxP2yT/zYdNbLvWHwo6l5En8r2ePo5k0/SQV\nHmZAxozsLRb4vRUGRSHVg/sOQelYXo0O+oIX3CjTn+02b/FGeL939ugNzQwW\n+8g3VmHiuv/ScV/wn6Nbbfv7p2SsKAAb32TEkBYl7lWdGI25pdExiDyzSzhD\nLOep\r\n=h+T9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.0.0-canary-fe721a8-1614015002988_1614015106167_0.2969394693632057","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@iadvize-oss/store-react","version":"1.1.0","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d9953b7600bce50e8ee67360549e778352295755","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0.tgz","fileCount":7,"integrity":"sha512-XWxsEMkpTdF7Tu5BG9Gxn+4UkfFbDOnxCZS6FnlsqtZUwzOBUEXfI324Dp9WX4XhbhuTHJJ1H/1N0Ls7PE61tA==","signatures":[{"sig":"MEYCIQDFwMWU3jYFz0U+L9KM3ddvIdAZEaret8FR4Gj1VT3xyQIhAM/axVvllglPI1ewV+gD1ZWiRn804zG8iIjrDUi5bWWq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+ugCRA9TVsSAnZWagAAT98P/j/EjpWutsX0uy0QBUZY\nrB6v/Z0DHbSKe0YG7fDN1XxkIMwKkWFbsrKpICr7xriBJrxQu27b/gVsK3vs\nS+9e5wxNFArNwhGUcEgm444qggG0pAXpR5WnPP33y345xWBpjjZT8iiAYczc\nLeUT4YC33bRrzjQXZR7u9Mc5HZTvsv4AzcDl5qX54waN61z3gweyKKi4fyMh\nTbNsHYbinRo8E4LRvRU9vYYrQepn+SWBP05Jq+v+UubyNo5G5lJ3Jakfe2ZD\nPhSYB4dG9QHpzy7sruuFyhCgIZL5668IFmumqtavUvmf0mQdhd6cfOuCfLnD\n+TsUOC4pFGjKngZOZtcHbGo+QawIwdhrLB4mTghbUD3J/9WnvZMQYoXeNeDt\nzWLX5SmGxBrT51stCVfypfywL1xrCoDEOR9lHjywqriM96H+CeYXeI4vjo1t\n8IZor4g4D1O9HXzbgbl7OhViISqcXBUsKjUOKNcxqvUXyCs71cezcELWUoWa\nwhW5iShFuQe+EccBTHNkxaPbBBhZdm7K2GdYvJQN/YsyLtp5gUnRYlsUjJPD\niv5YReHr5ngaIekdrZb2uT/XgZei6kynBeaCu4Dr7I2QtNKUi6nJTDiuKB5F\nElSuOHjHwkRL8EVH+tK9vdMVJgi77MFQegJC/HFQjGqkZkXbEAh7y+o7J0P+\nGBNr\r\n=ZnKV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0_1614015391573_0.9919436373430501","host":"s3://npm-registry-packages"}},"1.1.0-canary-98a6906-1614015740106":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-98a6906-1614015740106","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-98a6906-1614015740106","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ce4089aff69535d081fa17ac36248ac288f9d2e8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-98a6906-1614015740106.tgz","fileCount":7,"integrity":"sha512-wnthYd4pWBhXYzRvrxBTlaNyLFKkrRctqiF+jjzRrPl8tBeQQnMZrSw1WkgbnzHpRc2JE8ZTf2ckck8bYecZig==","signatures":[{"sig":"MEUCIQC8kvdLngeaWxaxabtEgc+cdAjL3GAfG7dyzRYbfFaNewIgM40qQx7/HXqG9HmbFaO+bwAcpjB6ktIWDrCogjffOi4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM+03CRA9TVsSAnZWagAANf0P/0UxsvTP9jLb5ykb/3s/\nqytyxHfous0w10Y1vfUK7uIici3gorPzQynXA/MO4y9mOyPeODfPHQKHgvDY\n4+sOVpzkMx74dIJ+KMwyHqsFc1gHKZd1Dw+n7SkM8UefP9aDQmtOE9ApvYvI\nTBKzI5dMw/vgIJEevDQdOz1yu6lyTUG5S/Kby3Xx1WS8fhLMxaySdfG+cXlc\n3zRf4jQBLeN1XkG6KOeIpjo+oGjPoHClRDL2pZmu1pS+r94bN4aBf/HenT62\n34Tj0KZ9SaWlcse90DWJHJDzps0fUZTAYMSZYCihxHSllz6Cm3h4fphZeDTz\ntEk4ovbhqrGpdxkjSFHmwy3mbq3g7PRCLqZQsa3YxYA28xDhKj4GdBdGBylC\ny5mZPiEo5HZmwcNL8r772K+4fFiD+oWLPDLTtfyh5xssia/YK3bgoeukTyOK\nLU0lb/mh3EXMaddyhRz1ITQ4WgaFdFKJAjrZLmFd6yB8QypU0dmaQfNXZcO4\nbxcUFtbhphwF9Seh6cLacxVkpZujitE8umR92Jw0pVBw7TdZLmhiFaNGXOhV\nIMX0ZEoVSUbc7YrQ7eEz/tVdn+6WerZIL9VAdDyHfibZsMgTVbI24cxN35GR\nNVtQrgFtM8CmcSVCr0yRa+uKu8M7MSToLmfCOzS0tIxjykRqKdK8JcrIc+AJ\n4IWP\r\n=g9Ch\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-98a6906-1614015740106_1614015799474_0.15875762550275296","host":"s3://npm-registry-packages"}},"1.1.0-canary-c6cfcd6-1614035936644":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c6cfcd6-1614035936644","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c6cfcd6-1614035936644","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5cdc57c34d829ebcedb81feca280bcbfcd0864bb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c6cfcd6-1614035936644.tgz","fileCount":7,"integrity":"sha512-zv8Gl4KFRz1VwC8/7UPvwwYk6FIJFmiAWRu42T4469dJaaxMXOJgj555z2FVpJMLGr7kWCrexhlXefZ3UNpkQA==","signatures":[{"sig":"MEUCIHfYzobvDqwFzC7HHWXW4JrflE/kwLGtBBOZGY94Cqt3AiEArWhlgzmTHAE41AGekXiP7lD67Z+8yEQweGrTSSb8RjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNDwTCRA9TVsSAnZWagAAIBIQAI3TrjnCMHuRdZ/pWjQE\nlutuylJAITyXAqnvD3piqkFWYqsn06/whV28u36ZnzL4Srk2zwbBHWJAey2B\nilvNnr+/MOA0M4AWlhawRawjrQ8kfPUSkvyo2O5TCkYvQaXvAsXNiJvLFh8Z\nxMWcXdpYRoprjdZsx/73Ngs9ghzNoZROdZSO+ZITQV/hURbZ3gsYcRx4Yi9g\nlLpxRGoOA4u6Pl9wfsb1GIYDIiXqbWQ3JZiBXUkB/xyEoCxh7COElUel7IBU\n08xNIF8Qg7AQU9sWcWiDf1x8qKQDUQPxttMIOPSCoDsMZPaoPrRs7pPeMUOU\nxIEyRe0Cwwa/AsrIbb12fpYveFgBJ7de0DJ773mT0o2KK+z6n4jCNjTJTNbp\nNtnEDMrgno51cJCd6UxMhQex3iPrrX+ERIOCgcNdnbo4Jw5rvBXP4OI4vn0V\n10aXAjhvK/dQFEIYdyLPAeLjvgtzQRsCgDmXCrjwO+yhK80fhr/cK41NZE/S\ns9Fzg/1D/cBE0ar3TeR+1rOYcDNz2ZqwQSW6T40fPQYw8h8vWN946gA+IY2X\n6UNkPP6hp/WtI4Kkx+GJ9vBBcrPDo9CJTMvvrg0Voaf64MyAzaLWTCP63yMd\nz0KiwEdTJ1OL0RlAM7yP8nRq174Fhibj0qeTlf/EGiuSmkLMT6qRnA1+z28x\nXrf9\r\n=iUcx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.0.3","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c6cfcd6-1614035936644_1614035986316_0.51128244860924","host":"s3://npm-registry-packages"}},"1.1.0-canary-0af420f-1614036928606":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0af420f-1614036928606","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0af420f-1614036928606","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f4982807678f7f0b6812477107f7b98d819f3ae6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0af420f-1614036928606.tgz","fileCount":7,"integrity":"sha512-v0HMsMkzb0v/lw5f3mhc6v64xjd1cDLxCdmvSV04UHJKWuRPNVyrxmrR+SsPIOOKaExVlg2Jhnm2WM8ZEzN4JQ==","signatures":[{"sig":"MEQCID1Kxrf1Y9Ib7SMVWxZ8SdAaVEb+9w0JoOn1llZzS6RWAiAWgDvVBEndzNSzYbUcxK8vEAUlU7U4wm6RdHgMbT7Q7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgND/yCRA9TVsSAnZWagAA13wP/jcFdbshwPzMSuryO5iJ\n4FaiYyYKsOlwuwXlkEysKkYtwv6Ks8cE0oW0mozcXo3gqMA18J9GwfDwpRep\nyILDaOsoYFVz2QnZt2VXwxk15us10vs2YaWVYaKcCxpqkPJwlKpreaiXKZta\nsdyvOlPJO5aXvPuP/i8QKQE6gwDA83zsRitEVPq5MjXYzc/faXGVf8jKWPqr\nt+Et6qXU0nONDfd+796gT1f03n8tl7VT9vY5mILZrvv7k6rL4mYR2ED4EPyK\nnmA83DI/hG3gOZ2km46tf5bhvoVqtsz418Gi5+ui/Lj7o5p4fG72OzrME6Z7\ndyzS+Wr0SxeQMRsWjThP5bYPZ+bQK5rFpU0hlx0GeZZ0wnMFvU76jgpv9xDx\nwJQcp034cKX78LqTau+iHUdFFgN7V3cR7BIMNmGczRsC+RE78iXn/brSAfh0\ntX7K8NQuu+vGNJ66T/48TzIIXzppI889VFt7RX/W01Hpam/Pk7yf4dekm+HJ\nzQul5V1edSFGos0DUxxhDxkFKiNQBD3nIpfvNPwZi6t0g+xqc02OKartURpS\nEtzj7Y9nJTVPNZh0fLzyGwTrlDxFid/Ef8Vz8wo5vWua9xW8uysPctIz3bWj\nc4FEKBYNRUI/xWa+Jc5wAxHIgl9sYP0G+nagOT9x8Rn2cJ6p8nFy7c0XTvXs\n8bXt\r\n=Kpa3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0af420f-1614036928606_1614036977497_0.16834663292113206","host":"s3://npm-registry-packages"}},"1.1.0-canary-0af420f-1614036924607":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0af420f-1614036924607","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0af420f-1614036924607","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"897af257a71b5dd56f6c4352a5e1a12c1ea336d9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0af420f-1614036924607.tgz","fileCount":7,"integrity":"sha512-F11TatmZ67YRcx9gWRvrE0W0lucqA0xxcPwSvAb30Yl3BFFJ978wd0L4+ICT0hntxJRdMGjoostAHK+UstipBg==","signatures":[{"sig":"MEQCIATUykZ4DOFfp2N82Q78jpMhEf3cL8fEiKSLTjri5r6OAiAVXKPI7j12KDa56eZ8mV68UrTn8m1Uv2aan34wQ0d2hg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNEAPCRA9TVsSAnZWagAAnHoP/00C+PKUEjKqsr8Nc5Gp\nsXBSNBFU6q95RfCBX7Tj9eAsd1g+lM+1FgJKj1JJd8pJE878I89v1NFaFvvm\n5Bto3pV9lrX/pjA18Z7Zd4dV9IbPAn3c55CMQ8aqcAbgiXXc5jx0yp0AvL+G\nKhMcIVRdMcOTejwLi/sN+XSsDI/lmkItf9Wu2bfjuGkv66XJZXAcfTPqpdJT\nm5/rGuv3ZitVtHGuRvdHdP7lu2nthl++r0+0NX3jmUW04UOktfxFc8O4eW/u\noTOZAh/i5fY1WCrj/+LZfixhUSkMmyfYTu6TGlqt8xNc3fBM3Q9J6u3C9G6+\nVuFD2SFEsqhT+3xm3IdJR4z+uSUpbM48N7oLRyEQx3iP3L8vorTsEwCvoKdu\nx3ldIvaL8LFejqldT82f4qkmXRx71NjepnBbciabLrn7+cTZoXL5u4lFlCZO\ndnh2W/uK1G/vjY9H6jxJRvn8h70/G9uBhqeWUFjsE5vQpfzv+UKQfqnvjpOX\nCjGOgAi1gfBbY3P9YvXXpIUaASYUB/kMBFEwpDbVnRYJNqzzAcFouroBUjYX\nlwjKUv+ZsMJL+Q10kWFbLaFDl7JSBdtOm+zFO6Tx5u3QqbjQK8jbhyRqo5EQ\n7BWs29f9FNyk3knUtGpvTzYOyUGZ31nTjAEVEGYaZ+2Pp4iJo2Qxxh1EAZhM\nCgtw\r\n=5oxo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0af420f-1614036924607_1614037006992_0.7735282398743273","host":"s3://npm-registry-packages"}},"1.1.0-canary-0b6d23f-1614045907774":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0b6d23f-1614045907774","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0b6d23f-1614045907774","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3b5be34f472c05b8725db37739315919111dbd12","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0b6d23f-1614045907774.tgz","fileCount":7,"integrity":"sha512-GgCYDEhku16yXfzKNWHxrRBGMIC65cXiisLeGBeo3XFG9oynf0IsGVgwE2IhQkn7fXT/LDokIAC/XjfnTUcFxA==","signatures":[{"sig":"MEYCIQD3xfbhS8RqqSKpRLaraVrTk67dCR6ccCcvmmVK08C0ZgIhAMf5EsKLC5uJmjEWelMf9AAj6hfoyKHHwhm3Hm0X+U4K","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNGMICRA9TVsSAnZWagAAQOgP/A3Ty20XIxN3DE3tbafr\ncOayLonvjrEJyZP+67/T95M1hH4e2EcxoHfAkUW+suICP4pKeGe9o81dNgCT\nXZ5ADGK9lVD0ihYLb+dJEqam5iCgqaRY+8+dE6Zuj0K2FS1XBrzoNgIsTW2s\n70oNKSTD63gLuvKM16KX3DRuqjS4wyk1pXxnI+h4byy20FvroMKF8ki4oFiY\nDzAo2SFUD4WwY0riI1UwsBfiT/sRxYWMm+gkv2VafR4EBFEMB+ZV7CdCPXdP\nx/vJvL5sYLOpSlnSTRRZLfKgH2UwF9+FrCPPp3F1tVB0CFoFRG0+olwMNud0\n49GedVvUwyw6d6OIu5JZ0zdTWTZUrO2FCO1LBKkLdBwu/8x5OQxkLZN0IO3k\n9Zqx4rerM72fiPsKGAilPbzCXCWOpgPcFollrGtiO+2u1+2hZ7sJNiSEHoP4\nx9vzF3/QEzeZ9ACT2L+M6ZzB8ujzN5u1SQ6B++pFb91LIf6IM9QIzQqIdYw+\nCoIp1NZjQkgIypBwpW5fFp5geuoxh16K2QPzSz0Bh7hinBHk+/pFoqmcUcfB\nAU5JPmerdDmmfyQdPbaMYTkgmmyUc1r8LU4y6X9kwsE5SXsIhEcGPNKEDOcU\nQKdWqudHoaAdalxxPfVUmdox10UrsaicnJIdfXSPN9LVrU7eVLnhD2Y+UyPh\np3eH\r\n=nsql\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.0.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0b6d23f-1614045907774_1614045959858_0.5441633544183622","host":"s3://npm-registry-packages"}},"1.1.0-canary-2f183bd-1614070283089":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-2f183bd-1614070283089","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-2f183bd-1614070283089","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"431f90169ed41ad96d42a93ad4e99919baabce88","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-2f183bd-1614070283089.tgz","fileCount":7,"integrity":"sha512-BWvz/Uw5pfsLvrE/PC/sJOxseG8BqQl1U4wP+xsS65uN8QSNgi7wlgw6exNQKA5kIM0jgKEjy5nL6aKpjSM4Hg==","signatures":[{"sig":"MEYCIQD93+x/x5od4CAfE53DjzNt8UlvET84mJFFo4fKjGevDQIhAIv+bpnJgV9ExaulU0p1OpCPtY3aw234XdHoHdWZvvvB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNMJDCRA9TVsSAnZWagAAudwP/02Yr6NydsCvcrHQGMAx\n1+CH11kDyN66Y/yWMAvte0wd4NGt8ojXDlyJHM5sZZf0dD2ZdL4QKdGIdFvO\n7RzrMxHkN1WPDet4zIzneFu8R2HQuoRXbfKHW1hMpU9u7DeJmAOWh8F0HY9B\nFea4R/WvytZstWStGbiwZoaOkYtIh0qnhriVYdoeAexZbKy3CyOpdT58jgL4\naz52XVMssyWoNS97CQV4dPlWc8WwHqNxQZelROu77uuV1QtmvDcqrWgOr+s8\nVS/IMtY3LKIFKrSCdPg0C22KUd0nqECKDZ1OdYDjhYWjFG7QRE60+s2kJE1y\njvUsvbq9mx9hs8Ht3QXpLsjTrVR27QH08YFnsiDVIXKJFvzDvSw0hZZv5NJA\nGIt2XwMmusYiVyRkpNoB1xveJ+KbEh+G37Hm/tY17GU2atWs7k/cMipc8slE\nXAYGyqwJzIbYz+bJI7QgpYGf28nKrENOmE57XXVUnITuF2F3tonneV81FVBo\ndm7FPZMkOET14ECvtkWi2ZZGJa00Y9fn7bXhzfgLGhTejTAYaxc7ra/6dljM\n0bhjAwvpMScAyxPEVVrthz8adk1QkvEoV0W6b1cG/ziGiRlWf8wkdYKOOC41\n3/b6t1L+wiPf6xLYnqzzdudY9X+Yx7/SHYzmRKowVi/vS0tMb5IMk+CGGqNp\n8xjL\r\n=ICFc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.27","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-2f183bd-1614070283089_1614070338325_0.19066235641979423","host":"s3://npm-registry-packages"}},"1.1.0-canary-018f668-1614071013109":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-018f668-1614071013109","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-018f668-1614071013109","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"60fbfef0b4bdeb3711f93f20c5381b02db92b2d3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-018f668-1614071013109.tgz","fileCount":7,"integrity":"sha512-HAQmkG7OMdPdJ6Al1ZOy4s3pPjjoi+Y+M23XVPzrOqhPcoOhIEl/DRuw2nohcNceZhuY7NRh7hasYAanGjxJdQ==","signatures":[{"sig":"MEUCID/KVXkt8zHSHEyjGe0FIsR13ihWwqQ1KN9gEbyhVrEaAiEA0ZySyK7wqMOna79NhG6swqjuBp36B9+bAIw4D/yQgqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNMUYCRA9TVsSAnZWagAACiQQAIE9GQODznZZgzjgJvzn\ngV3YEU1dgzjL2UW02V58KlVBOFG1lZSZPdabdjCy4DdfjY+gSYaZCRHDfZXU\nvZPdBtP3qz216IPif8q6ry4O5kfJgltvdhaWAKDhuZn99OCG2j4l36yeR8PI\nKFIhMmqdsjRYryAz6zB8BjuOZhHM1Ijm0mL+HyIjnOe8Kc5+djRMaV+uZQxe\ndfR70b/s6fqIuqk+O8OA71dAXtP4IdLfQHtprWnSSXf3tEX6YSTGEM5UeMtt\nj5NNufidEqfQTM4Gxl1pSRiB95FxdPzCt3tPaExC/qieLEJM9TPFkOhl0YZU\no8eQgIab7/b83ipDsUKzYwg9fl0omOxu5q0iTHD7huXecw0xpqDN/XPMHu/c\n0zsdveSJShXO9OubwDYVi3i7Fzzrcn23LjlmlrW1qBTU15BlhkqwAz/eBRjI\nGcbaYbY9WxEJ7DQ9JkMITEjtKXUJLfddeoNK6W18NoLO1UX8xFjTuO+J79FB\nkVfDHdPBeVny5eVIevzUcxcJUOCZO/tMcnP+ebymhom5VadXeM+KZ3nVh3Rx\n05dV3GWqzREQ/obgccprECfIWgZeBeP7S9EdTt36tXesrY3KVREAheqbPe/h\nhFSUXFiJmT5+IeZxY9M/ZwavpUuyQ0RWds9RDGWnzeREp1lj//Fj5jDOdPRf\nu4MZ\r\n=Dmc8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-018f668-1614071013109_1614071064304_0.6103197823183779","host":"s3://npm-registry-packages"}},"1.1.0-canary-3b21d78-1614074936725":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3b21d78-1614074936725","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3b21d78-1614074936725","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ebb0fb7d04415d1a440a0a01424d07522c3c94aa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3b21d78-1614074936725.tgz","fileCount":7,"integrity":"sha512-yjX6N0zxbg6I5ShDFOs3y8FHHG4bmwOFaMlwmS54thqxjU/nBwSz8++6NeRNIGkN0CVHTDtzTeu5zpgWPib4gg==","signatures":[{"sig":"MEUCIQCc+K32Xa8qyvH0s08te700SaL6Ui7scdxuKQwxtoNeGAIgB0tvyHxS422crOb20AYWbGRTpBxIpXkqcSBxzJpL3Hk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNNRvCRA9TVsSAnZWagAAAokP/1cLMZjt7oRqMSlFcaOI\n9IgGrERUo5XAx4cxcviOnl6Wv1yghrEH6zR5Z37QU62VgpBg0OHPXh2x2UV/\np8/eGL9pjO+k9spM0CHpnqQL5GXzWCSCc7LJCRh1Wyl5pSYp+uPGe+ALVrmY\napvJuT9DVnbOElBvR1C9tybUf/82jITPhrnw2zsInbGtEMZOJ4r5Ewd9fVSH\nJKsyKh7TM6mOwDRQypgn5rIOSTKznPzmwGpgloRaXD9ZkvCaICCzgsuIDlB7\nuhZkihjtoCF4GtY1ItDWrGALVteh4zmBGCVsRLoy4CjHC9xbqSmdSuSx0OQQ\nBjjSCJifXg21GbcPKsMbRfu4ou5/lM/QyT8NlBf2CB0XqK292K+NZo6Sj6PQ\n/A+6euWrZhBPGDEIecOpPVk/PoJciHdTM/+E8gRares9RNCEWsPtfRhmk7rM\nSTl4qSrDVfF5bm9AY8Sx2WtEY/Ad11h8pq8ngKFO3mYMbL9DWKOytjzJyo76\nZuyLyJW4lnASUhHp1Pw18MPFjtbPD06G0a2pDgx+qAyrjm+0LKRGf6qWxBER\nIV8F+I+pV4BtIyUDL5godlLHOjtArAj67Lk/hOi6X7jD0ja57/xwx5fZL9Ou\nNnWEULjY2NQSMV7aDA/iXRNe0XquulRknG/gPzBHYVh1GyhTqitIBLJjw2kI\nxYlc\r\n=M+dV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.1","ts-jest":"^26.5.1","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3b21d78-1614074936725_1614074990511_0.9981443735616207","host":"s3://npm-registry-packages"}},"1.1.0-canary-3b21d78-1614074940615":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3b21d78-1614074940615","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3b21d78-1614074940615","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ba62772393bfd3fa48bebd195110e190042d2e9e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3b21d78-1614074940615.tgz","fileCount":7,"integrity":"sha512-7FGeexnbPWD+dI9lWb8LKcgZfn73m6gOjsVdxDZDCYaYADU3alEAGRmhKus0aNjNfLkMuLOKj6KKgLm2ahC8UA==","signatures":[{"sig":"MEYCIQDDqUekTnoC70BHMEs9Jp3Wvr4qyUsqnMZUkB77y5d8GQIhAMY+4o8u7IMdsZHwedEJDS5fv5tYS/K4c8hsFoK+rSs8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNNR7CRA9TVsSAnZWagAALQQP/2mPcSyOFt4Y64Z6GWwA\n+l6MIX4l+Iwrg7aIVFvfXIOuns6OsePu8lte/YnjwHoyW9bxqGRZfs6AwXs9\nKYZ20iwSRHorsnVPAN46hsYQXfAfZQcJYkaRzbNjD6LfhDQz/tgEzeezCnoJ\nQec5lLxPAqde8oPz6yez1YymgoJ2hxi2xtpOE05O/nTKNhJQXLb7oKlKyDkm\n0KeyaPOyb376uyC4VjveMgyPy35FGWWKaxyKQRJF31OBRyU1JxsQ27sGkmwf\nbVQ/AgGctvSlIzALp53m0Qf8wh3Amd6i05+he57g55ZcfZHTE5qQ91qS+jI6\nuhIF9dOIsx18uUTvIKvvCDt2t74LsG7Umw1cEJiUY4gOKD7PZ0JJ1uJOwHvr\nzG6/lx47pBjoEthi0hc2RfeG9nbFlc+MVbGDRCc3tVHbWW9ZnZP4kZCZNL2s\nspeR9EF/SHRigpA3rwiFbPNN5B60T1c+6isJU8319CkyKU9T2NUCUqJANswW\nlBuiMPJvhB9qfpYopksua5JC8hLcoo4hNJDv2+FgOqqtwUg6jV7oEjvVg5H0\n+0J/sVRSUODnDvaJdCRbR1ONFOmA3fZr4dUV9ahEIFSU6SDLZm6+qs0Oqnsa\nUwovqqstBfjfC0mAK8nmKnGrjvw8JmP2tkCT5TudXmNxBSQV5RR8eiXd2kpq\nNBRd\r\n=UVo0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.1","ts-jest":"^26.5.1","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3b21d78-1614074940615_1614075003460_0.6727344142824219","host":"s3://npm-registry-packages"}},"1.1.0-canary-b17bacc-1614116862946":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b17bacc-1614116862946","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b17bacc-1614116862946","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"aea8078bce46ab45502c1e2964bdc9722bf1f0bd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b17bacc-1614116862946.tgz","fileCount":7,"integrity":"sha512-Mj8Vh4Ax7rHX7KGTNDDAnzhA9A7rsnuHP8dVFlDJ6ORQUJLalf8VxgfNsRwgtx2Eim+Q0dNGZPbySDEItEUPxg==","signatures":[{"sig":"MEUCIBsyLiSdAe5ssx+nF9ZeL81J3P1697u0Ui23AKCw8ZKYAiEAlS4jBj5olk11aP5FQJNJSzh0F8SbVEMaMW0PE4fQ6wM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNXg9CRA9TVsSAnZWagAAYe4P/RxLUZRcW5IfS4ny9cD/\nmRgRy77oSb9TXDurFCiet117om15bgnB3nWcwmUhmkLY4BxXR8GGKQb7hQT0\nvfWpRZ7Z7RexW1G+Tzh65wkiehMd0I3BQqbabBj4lAlt6/IKSjmm2M5pDrRJ\nKCv1aqj80E8to5uXHdHPnbMXbXRjnefIDsvfpnOQ9zR3+Jdt2wN7PCpzCdbX\nBVvpXyjql+RMwKwNmlKw4ATG0rH1DMWSdMN3w04T53TOysiSH9QYsAHt4+sj\njeOVKlr5+FYChA83Z44aff0XTN5J6nUI1d0z0bbjgEBpY3rIeMQCnQWXL4mT\nAbEF3RgtcPuXxXwHkPYcar7KHl5S3y3GH7ZrLb9nHLsjK5frc9syP1slnbIs\nR//Ie/+mCCmGS5OV5EhckAvfrSbkmO5O+WPV742h4V3p6yW6Z4jMcHdk0rDD\nh7HZ7W8f4Tl2G/ZOJA/TNm7PjJ7GIkZspsEZK5H71k4XX1MT95vb7zud8SJa\nRzJkOWZ9U3yCrT4naZU82D0TYjAgvUGzAFssnR5gStZe7Is/QSqYMdKBqaJR\nz4l0kKDOpsQ7uMlZ7q3+NS0NTsc4XXQjWQkVfoRPn/djZp7AWRjv4NuU5U32\np8GmF2BM31WiHkyl/WCYZdjfJEWuoObEY5GeEh2ub9TGCkzWRj4Im5T1xSPe\nqk7G\r\n=OJzy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b17bacc-1614116862946_1614116925215_0.6252248668926772","host":"s3://npm-registry-packages"}},"1.1.0-canary-3c381cd-1614118874440":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3c381cd-1614118874440","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3c381cd-1614118874440","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"33b812f5a284b713e5cd5292c87ce9409eb9988a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3c381cd-1614118874440.tgz","fileCount":7,"integrity":"sha512-qVvJ5DJ4Ddt1jVB8CLhCsR2fwoRktdpMqbc4sdhRuhNr2+VCIafut8tWvS/YMpwfZ00UOXwgp2UI5f9/Vt7ddw==","signatures":[{"sig":"MEYCIQDbdGJgnKaPuW1CtNnmcElT0THk4bZJHAq/1kA79GWuXQIhAOt1+goTsb9l5/5R3h+Ihs4awHCuT/Hvf5Xa0u63X9Zq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNYAMCRA9TVsSAnZWagAAXxkP/3URBGdqoIc3tXQSjWfY\nuysmq1GL9AZ7giK283lT8mtSGKT37OhJKRVLvUyClRJzF45iNOGjotvnw1kS\nZWmxLLs8RLxORdzWpj6Srh8G+3dsjWkCJH+x7c8QJyHNXxCeooYYxXq44Wg/\n1kDVMe4juqNmaPOmsAYqencBcFW5a4A9YgEvHw2vF0Z0eLbmlYnqEfIfaMHv\nZR5CDj3kawF+20w/nXXYJ1GRnFq7EAHtG/Q0fFbRf8wulNGxlPfW4WvYzn3g\nlKkBIkVwK0JwfFWAMtfdr5WlZjFs16EYFo5IhnAF4JP2umSuF8NJieO6TJAb\ntu4VJPTXogRob81PxUzs4UcE8Pk4TBqkNtfi9EUeoj3nerQfJlD0pxY0hsXw\nrCO8uvMVc0suA+zX2uTZHCKZW0TUJzjkH4PvkXK653SbFUn6SSlFZgYGeoPt\nMmnDc0aq+vdobzlOCY+RQZJIzo1ngO5gyNMXBZ7wrVY2jFg0Q1kmOR3H1Pco\n+LosM7E6gbnOLiwvtkV7Fd3bg59tx7HDECmIVu2x6RJdLsfRsW41hIdMoKDj\npqT6lXW4e7B3mmMzh2iezIeiNHdKY88Jb4JomrP8bYfeOZIKJYKHq7QQLX7Q\nA1rP4nxka/nM4rO10pwQxkUEx9PZZXQXKK/T4y5YGY070yWeXiX5zfrlb7Id\n7K+c\r\n=xYTr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3c381cd-1614118874440_1614118923920_0.36334612586679826","host":"s3://npm-registry-packages"}},"1.1.0-canary-3c381cd-1614118876070":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3c381cd-1614118876070","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3c381cd-1614118876070","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a186fcde010eaf150348882c963fdc8c73211e43","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3c381cd-1614118876070.tgz","fileCount":7,"integrity":"sha512-bi8JvHrkfwrTUaV2Dm/fG/txEHfmlMZCKm+b0NlpxQJ+Kj+RTEOlaeCyEqY82K2bd2D1xBLDv9hp2mFk65xAqw==","signatures":[{"sig":"MEUCIQDHuPxeTjCFoD18lGgw7pPL+vMS4+f6YUYD2oaBH7yVigIgLimPSI1opXUj1bQYIowTHkWCFJk6HC+TO+xuxbGFj/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNYBSCRA9TVsSAnZWagAACHUQAKRyi7M6ymUhC8P5y4z8\nVlUlLdHaYjDuG7XoK7RZjnAdrLU9eA4pxBMBSMChlY7TzdV7JmObtPDWDmK4\np2kQX41ryNSmRfKvI7B0gKxqpARWkPue4XvZpsXaw7Z91AUU6unGXN4rjk2h\nJkv5WMPZcVlMa+E29rJ6LZ4kF6Q8wXna7Fi3ZzfFQ2OMec4CiwhsCtzv+32B\nJTUPNiLa74n6VKNyOvi4x3bnuXJE5gbyWPJfu1wjMD49l7gRlG7gJ6dZpxoM\ntVS0EerUUBvrEwlRnER2cSOkOC2jPLXDG8bNlHvalCiEEDmEQnxXGHvdEcGf\nXbWQ5Np6CuFC7aNQ8CR5kM2pUx64PFJOhdC00gYiU3dwn/TQsdAwUwWuNu8t\nwHGCglAfPaCYVuJL9dN8Hq8OgVZlPyhFuPR4UIbHefpesQUummMP8YlXcP4R\nUdT2X6qr8UaiPVTPk9LJvLoHxfvxcPo5aNVuDx88GarzkyVYxdCKauneCs8m\n89ulaLlbr4TSyiL0a3wA7mRe1fWolyQqEZmBgjtdYF1bG1Ec+BIhWUEo+Nzi\nJFFvLSrA7yirgF24ovt2sG0s8ZH7Nh0CX3k+9hXY6RqTPXFc+FyVvqXg4V2l\nmuMCtbNdp1td6BAjiAHiAS2NNRMduIOjnGlPiTIqCr0FO5uDRvPkBKhJKwEb\n6MTg\r\n=OppH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3c381cd-1614118876070_1614118994314_0.5304128167576099","host":"s3://npm-registry-packages"}},"1.1.0-canary-9a689a0-1614122203954":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9a689a0-1614122203954","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9a689a0-1614122203954","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dda2aaa1eb4ac367554525507c776fe22fb77191","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9a689a0-1614122203954.tgz","fileCount":7,"integrity":"sha512-w3dzeeXzTBeXTzV7SuSbkoteXx4FLPpg0MpQ3I+31Tp4qbltxs4ckHlkJ2kN3FwXxOpVq73OtVAZX3EeSCz7AA==","signatures":[{"sig":"MEUCIQDLdwpe6RLH9JCEryumSBzQemJQRNh4a8cQgsd45AeQtQIgTvB62S2t+TMTSq9IpiisxwbVkoS9AVtjHGcn27d66GU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNY0TCRA9TVsSAnZWagAAf4sP/26CdhWwe3fCjIqyWbES\nDwRBlL8NZgvgQJ52yigQha8KPvgJnN8rqU92r7iYa8uUzsx9PcTR+f1m6unC\npdA4E/BbuqRaXKUsz/s2JzUZu0gHefIvX+i16o3UNzVIl30HoqbIzj6CqucL\no3iiZovihF3QrR+OEN/D3sM5Z7f4+7du4zwsmW0suf7tFfg2tHZkXe4z2Fji\nI4X0NUYOyLMBAMrvuLf59R/aWuEI19YbaqXPxqlhsSk0pwPf94+XNv801x78\n+k7ah7ZFvgXjrAX9zi+CVLSrB7YqD6D9C+BOv5YfuDxQAFhOAWgO21tzPkgf\ngDhP3se0JhGnSvryLAFqgTKAIzObJIbg+O9JjO/V6/U0ZHmgnmLKsZlXsL0Q\nDdfj0HhrcmfhKVFAMr67fjOGaN4jQjJDkf5/3A3HjSymXdsCP7YTIphMVaUu\nEIZvUZ9BUV6BzfwPqDHnhdD34Hvp6mPEw/AFdEhz6sNgBN+BwH/FvU6/ufTJ\nFcMSABWOC6ckj0jvYu21eeaHPl5E2dYjEu6Z/Kaee84ojiXLf7jOdtPM1edz\nYZ6RAcVtNYXTHSedb9dHqtZJBqFxoDHvf8JAN0F23vlm14EDWRkuV8NsbyEG\noqN7y0LIZmk8SkwRWZQYzd0I0nzl0mRujMCM944xr8baQTRwHUdSo4KW2Hj/\nSntY\r\n=DH3Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9a689a0-1614122203954_1614122259010_0.9230678833472845","host":"s3://npm-registry-packages"}},"1.1.0-canary-d789012-1614122379913":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d789012-1614122379913","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d789012-1614122379913","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4d8b69e08a54dfd15e2a01b476891392d90f765d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d789012-1614122379913.tgz","fileCount":7,"integrity":"sha512-CtS2qYpY3GcYS+T4KS1MswVYkoS17KNehpmpq06JpjvD2QoRk+wnbDTqnCYSUsVaVmj52Vt7sPI713Vel8tMKQ==","signatures":[{"sig":"MEYCIQCZUi+xpeEYjC4fs7eX8h8gMoBQGnmNCO2hzNc5nVDnpAIhAOU/sk/3d3tRsNhs5nnj86TRSY1wt8WbM2Zqq5Vt6kxE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNY3CCRA9TVsSAnZWagAAN0QP/3Hqc9xrEMztj65HzZlU\nyc+h3Vnw5Y+/K9L8eZQ9K7lhC0vxr9ETyfY6oN3TQH3HT1SYeKswWvnCvTb6\nv0NoebU5LjKwDXAcLk+ucQuzcWTLxeDPGRimnnUW6/9fZIr/zMyVIGtyZY74\nD4c0F4Gd9KlYV8LnEBuC5BX4m/GeRbcXXer+Pk8FNWgz/XoR/1wkU2S1E9tb\nTXgwuMKh0bJiOmg2G6nItwwmakqVpL2UqU0yZBG8eV3p1gToE1xNiuja2Cnj\nUwgBYesiLkvqhrA5FzTxrh8cI0yDpprHK2FhOmELML1pnaiu6E0ki9jby/9q\nPZnMcQpENiGvJXnOV2MrHJmxQZtXplNvAWm1THBCOfxHzYgLIlc2YKBynEBz\nL2+qyTdh7tneEQNsgkVsQ1Yp/ltSRmpehPQj4+wM5vuB6UFHcPvwQ9m9brqV\n65Wos4VqvkEZoRJ4b9yWANz5U++nMhNGlJGL0iraXvwduzTf22gr78Y+vlPM\nTDtpEIfeL0dJbSUJu6pXJ/UoorVyIn1Ei6niO2Nac9zx/NaBfE8z9XaXXXP1\noBkSESQM5FAsUEuReATGcspMmRzWRvwKquDM52YC/iqT21zv3LXh5K90TAXz\nVRdNyzvu9ilQJXRb0EDSvSHDmn1zoOJpHVcoVWZuZmAnv9fxP1hqqcKx4FRW\nbVne\r\n=Jl6T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.0","ts-jest":"^26.5.1","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d789012-1614122379913_1614122434346_0.07290579963999089","host":"s3://npm-registry-packages"}},"1.1.0-canary-96b23eb-1614182698292":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-96b23eb-1614182698292","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-96b23eb-1614182698292","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7efb3cf30925c36320fb4fe20181ff30cb900660","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-96b23eb-1614182698292.tgz","fileCount":7,"integrity":"sha512-Ku6Ax+PIHS+iTHBVkRxei6Z8USrQ9dJmsSN7uIaPCggehdkqIU2TxQy3wvhmjWloyP0t2XnMkXZGa301udkY1Q==","signatures":[{"sig":"MEYCIQDcN2wGj5KzldHbyUhCrQKjTgF7Gr8rYzGcuIHH3bdN/gIhAMxE1FDPdaVb+bG+zUSSIJvJ2x7XhxXlzLopvsjolPN6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNnmACRA9TVsSAnZWagAASBMQAJkTu8G5PXusNmYnVOfL\n3BqH7El7pgunqY/jCAkiNSHYtjNmvcG2CXzSDKVQ9BDltAdusgPMM5Rrs7qb\nzswogZFeK6OoQX7ZaO1ZbFUee3wmMz7dpVbZxhvdxDlPYRJa2nuGYXn2hpmq\nyoimQzHghWKz5l74P5vaJmnaXgmry3IK+D+q0e6pDfdobMMfgB6olUPjpBt5\nU5EPgvZ00ytf1yUsbB6aGkjv7BU7tOvHhfHtu2ioeZp92ZclN8hazscFeDAT\nwsuptsaOT8ykSj/UiooMXTHYqXdBMCbIWbtLdVtAreH+KurJ9CsjEJ1XHdAN\nhYtvW04qM2XxSKZ0VopEQzL9EPmrvYirjZVaQXigOOhKq9i/cA3Cn6Le37FC\nk8PtE0AR4p4Syv9c2MEKVDNQ7JxTL1XffItVuw4bPTTQZtGSBhGh522KC/Pc\ncjmfaTlC1mqFJMH/3hZ0eI7XviXywG1dljXlY95lTac/p23rHEL3Y/Ax0R/G\nSd6xHKl0plK0oDA0hPD5SdB1bXPlDZ0rZ5NrfLNkgcORo4zlV3dZ7lyttCDl\nPkHsdJOgGYNLFRck5KxpGgQ8YFjSqPumuOnbFXOpR7pchEPVaoUzwns7x5NQ\nvWb4h9NsIAGQxtLyRl7gsxXVG4oTU565s3sSF/SRkUWVDOJj8QQoFAGRk5L7\n3Gzr\r\n=aUBu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.1","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.1.5","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-96b23eb-1614182698292_1614182783975_0.4738365531134374","host":"s3://npm-registry-packages"}},"1.1.0-canary-5c23158-1614257077015":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5c23158-1614257077015","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5c23158-1614257077015","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7b1e5a6d2c2c1a3ffac5fa8ce4fb2e787d507a91","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5c23158-1614257077015.tgz","fileCount":7,"integrity":"sha512-EIEFhDmAp/a90zaJE7Bbcmr57LwoUhBnBWNnsvJFZwwyELFF3SCk5pyfTpXdvdCXNpB5Fu/cAOsN73nFGGnfDw==","signatures":[{"sig":"MEUCICUR8cxYYt/A08xXtDKcc7bnoHDewjzCSPMZtPiN3kl3AiEAg9O4MlP/DLh9Cy4kUDdnj27h4iTZduKo6p0TEVyeEaw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN5vqCRA9TVsSAnZWagAAcrgP/1QFF9ttLEs0gxVPGrH6\nSwDvOJfF4/XS0aNWIesSUf2FgX0xMlNpbn6iGDMg8LrvMvrN68L5Pn/MlEQW\nq3YkQypxuweULb1jwZT/cMRZSv2FFqHFwJgz8ofIkGTuv/redQVL2OihE2XA\nd2wfSsG47JUWayAUHI5uEbb+F+klk0JDbCUo2NbQrSRILifqZOS3BXZQ0NLO\nOF3o2hDpq4ESG0fmO6DaTJ8e8IvT42b06Tmhf9YT1oqhFSGgWkJp5clkASR5\n0/h7AW2eLHJyG5lXiJxqtA1BmifzgaXYOlJVfUjc6S8PG8yEWj5NDm7YEA+B\n8kzHgMZyK46y3nU3EyPOtgYBRFtdF1iw8YvvoS3b91DMAigxEvydA+GxOeol\nvS26GFFlDwOQjosKSNmEwGYQql+1buCGawdUH5KeY+r1kOk9Mtlnocn/Ttxy\nntGwDXST/FKcBmZ8Ks0KnLE85/ZGBFumZwvwcXEiNCNlNGBBG92kz8IyqK1T\nq8NG66kIw8rgk/xomGPLSw0ocjrV2gzP2Hh5D0zA8RO6kbk0TgHBBWwf/kpv\nejZZRKXGy1yJKwvcHjjulANSrq7DhRwIeoPeRIFGAmu7UKwZpY4mpTCPsgmn\n6vsvwQrSse+5fbLLvq+EOtwYkP8lr0VefsXZgA1VmnjhaoquLE0R09rU3fPv\nkYWL\r\n=4TRt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.1","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5c23158-1614257077015_1614257129996_0.14936064696492357","host":"s3://npm-registry-packages"}},"1.1.0-canary-bdf22bf-1614257830159":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-bdf22bf-1614257830159","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-bdf22bf-1614257830159","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"68613de797402569bbe098e4c64b65e532a73fd8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-bdf22bf-1614257830159.tgz","fileCount":7,"integrity":"sha512-SRi9Xm/D9tr3HLjxRNxNoirWCKcFFR/vZq21UernNaDLpfjuj31kvVKj5c8+NToAFriNk3O470+bPZwzUtxYjw==","signatures":[{"sig":"MEUCIF4u5S549BSvW6VTtdzz3OEHGj/mzmOEO/Qgsys5Ax4PAiEA2tqLhY4WRZRwlfw6U3+XR1mYDEY9yk12YKArFrLW/pc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN57SCRA9TVsSAnZWagAAid8P+QEn5SC1bdOLfHssq4ZR\nPK/034NP0wHj3COMC55DLGxXlwmRp2sjg2mvvMvFctD/i13HlX2DzOkuOYxG\nOlZtBuOPkBQ8q5Q9Tj5VFR7T2OnpBeQeadMfl1R3C+9Xy60wqDTyDxdO3zIY\n75aEmca0Z+m9E2fjd/gldxtDuAFjHw1tjvMCBH8bcYAZvEM585os7JRJR4lC\nXQxJtdJJZvPE/WIIkfUnmug225pUjpStvo0ZXWOuy3rzz4/x+rdmcUJF9Kq1\nO1IeGYjlHu1xxhLbCO5o+Fcypupim7sSXenBm5H61+DRkyT/SCiJFD7xhDyw\nmmSbxw9sGJZ844lQAN7he0ChJGzuMNgAgrZoF1/RCFv6Vw5mwZnUVTdglpRF\nxE+deYR4Cs2uBCPiXw9zQ9eNJ9Y2gHDOQjuawfx4TEE9WTanMj9KLLP7EgQ1\n3/eh9UmQPcD0zvzk1qOihvBoiPtbRNT0KEn8ZrtlBg3zRa36y+nAYvssJD1J\n/1Tky+sxWL3yq8AkSgR2nUHRvR8rVP/G6TjRzhFAjoleKBq8CDIgRRky4Drr\nE/zugjOV0cK5/U0XXXQM2+Ed6D/JQ/I3f/HvT1jA0XBxk7Il2qrDaT6Gk/y7\nmUpuNl+3FHdCLNK/PCTT2nuhz2cLTjG1BbZMThuz8S/1fAF2qvk0fUTn2u48\nC1r+\r\n=tcDq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.1","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-bdf22bf-1614257830159_1614257874475_0.3060381981995868","host":"s3://npm-registry-packages"}},"1.1.0-canary-6092749-1614261232496":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6092749-1614261232496","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6092749-1614261232496","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"59a507df1629abe665baa4c2c3d02f24d37cd54b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6092749-1614261232496.tgz","fileCount":7,"integrity":"sha512-XizzkUUNeLF0LKQk1Wu6caj1wizg8uDBF2EmjIYJTDHoXjMUs6kGBJmXShEnHM859NiCRWUesCVVp6ZBILETeA==","signatures":[{"sig":"MEYCIQCxjKn7up6fpctQpSbjdQA1pYpu4iR0/W/rFpjHmMc5WgIhAKJ21X9tmxLleo5DAOKGxp7u4wEvz2r2GsWR1iZQByLe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN6xGCRA9TVsSAnZWagAARKUP/iJd1oB+/i4mFpDfNp1W\n+YpvWTVOUpCW+gWtGqUrtm/XbYBRfSNyc3oJ7lLSzLZi+74A6K2UVwsjvXGS\nWOE2nZYp+PuC2XCBQ2e5ruckln63ISbbpNjgCy1Pqn2NEIlFkp3WY22jpzzj\nqur9QbDHJ7/7wwn++iadbSyb5qIp9Lz+iN3srMVWsgFUnfdmnlK2BN2nXdbb\nQFANS1am6y6073wXB2CKFydSwJxnf88SeoTRdjqvFnBa6DHmRxr7tiPgITHm\n1E2U7BsTV4LwLO/FZknkGwGYIVMEx4LLWAjkX2fYVR4fghb6j1YR8Wx7EDaX\ntpKhYuwvRAlmLEtKhySlvSJ+sI43MAYVkZd/CPa3Us1nisOkjq00z6r7dZum\npksjVlfWLnkyxIiXykq3wHNo/ecT7IfHWCOQW9hLDhXuM9G81B+AGmCwuEmG\nd77f8xlBZcrgUR6f+3tpJ28KhREcVDHvZ1H7FCLxwyZIj7AtwzN251Ty56ZE\ntzqSFSqEFR+YE3JpCAgRqbKGTK4ZZ2F1zzWPWE+AOsZMQWTRLaCTsucIbx32\nIc7gFbUUSMeBH0ZtIq5B+H/rjlXucv1pU0v+9hh3ewAOM5Npx+WzmJM509tG\nTOfdcUDP0/zXRPvxx9xSVbYvqq3Xb+pbNsVYXsM3vp/vFT+Kjc3hnyQnXQr0\n5AkM\r\n=POu1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.39.1","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.1","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.0.3","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6092749-1614261232496_1614261318214_0.9625112753178884","host":"s3://npm-registry-packages"}},"1.1.0-canary-920ebbc-1614350804481":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-920ebbc-1614350804481","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-920ebbc-1614350804481","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c71a969934ffe391f9e4a85ec6baa0462b9b0da6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-920ebbc-1614350804481.tgz","fileCount":7,"integrity":"sha512-WCoAa+/oPIcpMFubo9uz/as+cgQXaBWYgosUGCpSejOB2ilG0aX7WEfPR4N24DTBfC0j06rc7ygcfbrF3TIasQ==","signatures":[{"sig":"MEYCIQCrJSSqZVQwKqRwki5JuxipfmEH0RZe2s784snJ5x47MAIhALGknHzVyNYNObwfR7st/VLvGm2p1Ex4GSpsokkIEqyx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOQotCRA9TVsSAnZWagAAFW0P/0jycFXWm4oKTCxpFFvu\noEdj3NCiE0t+vWbLcIWkZvf648sIRfx2KaO1IfBxz51ZN4EJh+xePvsCbIdh\nVU4nk0DpGkUd2/Fqso4B2wj8fYf1apnvOyUBwJm1q9UAdONqA8jfmHCtOP3w\n1J7HjdkJ/mBYPqMi/3WH05/QRKpb+A1M4vUZIAcLj8BlAKExMttUc2m2OreR\nwgKwrMVvFVpIGSgkubw/5sNidXVPKHKGcb/4wuNsrYGzz6kgWVBsiWL51+Za\n0zkIahp/U9z0x23IOCltEFYCMNOzroaSxoOD0cxm5oxYCLcbTnbGPE445lkA\nCSETC+aKaKhoPEAhK5/wxF+xKpUWKzv8A/AZhUkcJdvBlf/OtZAZktA8eo00\noOFy901iaIjf6NLriTUfqq6H1HIijHUTPAxB8+DS3b5nZuEczkafTBpsfBwJ\nz4CGc6BLGKzZnq4FwFPmqV+zu4hL58FT5sIu9BQ9IgYn+K7/SOCvjV84b0PZ\nnsGlzcPZuZYgGVV73jb1ZtXP4EeEbHNWmoSk6YcGA/cdaeVsr7xvdyPx+Alj\nC+n0omvFqSWZ6I4XQ9/o9Js0RcDRL3g7lM3KySoVAXaPUxabgaMaRtkkHOC/\niL4Udahkij09BJXlZ2uSULKCKIxj2qciaVZ4zmhKFAHEliih9nzLvm2OOOpW\nhMvW\r\n=Z0aL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-920ebbc-1614350804481_1614350892532_0.30032602301084155","host":"s3://npm-registry-packages"}},"1.1.0-canary-7758fbb-1614356293086":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-7758fbb-1614356293086","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-7758fbb-1614356293086","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"546cfc71b938dd8640d4a2f544935717581c1434","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-7758fbb-1614356293086.tgz","fileCount":7,"integrity":"sha512-YX2IXe4/sGh7eC8ucZFkZ4PEcku9fqo054hf0mGk+rQ2nFG5IYvvFhLF9KXqP8DJek1axYPps8npxj7EPz2JlA==","signatures":[{"sig":"MEYCIQCx1K9VAZV6k2UvjgKCuF/Erkr8GebwlmCLzCiWRFgRngIhAJNSgXrgJonG+6k/6UIQ2oAwuyYQfg3WDYmYyaLQmik/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOR97CRA9TVsSAnZWagAA6VkP/177kNz6qbvqWv66SO4a\nqQ4rkguoPZFHVtBBdjVhQCPRYFnKjvctOts0mYaRNMZ3+jdGyjD5/niSKQBT\nq58V+Wk+X2CTLG5OuoG+eYebmAF0vKBlmPmaxCAfh9kxAzumFcGCIv1lIm9j\njf1y2VYlYKg9edlPSct1cNns8opwuhl9VO9xhCGiv0L9b7ufrpJON4yss34A\nrAXVj5VWNqjOvZAIXCk1TcxT6T9HPbhv114VGm2+7YQ6nb4negJbR0uJpEjk\nqc5eaOkG/MB0fhjsZmjXYNpvcuSwSS309JzX/BUBWJw/tWFManFLZ7xV2Ny3\nTczx5wi5jQ0A2dbtKGjC7mVsxwIj1XN235nk992pACrcPGxo3KQJ8zyRvBc/\nJ406uuAJXKl2sTIMx0Wg5yJ9D0VGoPkesiJ1bHF+FxTLUHzMhW2l1f7eBfq+\nO040hG+J/AjmWIzOjzb93S4oF+Y7CVkqMbAZCFJvfkAuTbw3uKjNmFksK+57\nmp1FWUDBQU6NLyxhYMEFg7rL/okD1Yi3GMJDi7Q82DlN+k+MWAs4hXN4//4E\n2GRhXTsF80zOv+hqRAC2HNzsunYtmmCCBbwWz0mWRysgk84cvjUUvIoydkXF\nh2ZIxgiu3VH5GNj+Dx4qNlZwAZOeKGC9/2q9fZ4dU0+T8YYQ1SbOlf/1z+yi\niudZ\r\n=QwgR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-7758fbb-1614356293086_1614356346845_0.08459831488756486","host":"s3://npm-registry-packages"}},"1.1.0-canary-c93691e-1614463857896":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c93691e-1614463857896","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c93691e-1614463857896","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d1fac5c931f96e58a4c1cbb38dcf46f5e385c0e1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c93691e-1614463857896.tgz","fileCount":7,"integrity":"sha512-4NtfXJ2wPkflSJHf2Y7HCor2g4/Jcis6WPwnQJe6ep4PTPnYbe3El9ygNx6b0vBScXL0A/xHWyfjsUIDMzH9+w==","signatures":[{"sig":"MEYCIQDksd89ERb95s1/AIKDgqSs1eKw4uwH2U9hPt/22D7DLQIhAIkxIG/MemiLz+bdWfZ6HhrKHRsqANabFE6tFk/SHcrr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOsOmCRA9TVsSAnZWagAALBkP/1MKDjoJzo4a9TjUS8Cp\nhc3PKhL79c0wJtVvpbApaT/x/VoCDVw21xXcX7hMyntjPbbkiuQ7CIKGNW6V\nQdN/yClObkkLDuZFizcsfagxS7pchalMw3HV8yFYz3nJ3tsqUlVv0wq+tAy6\nFyorcdZfXGzEPDC2zhvVVAQOQJQrYCsxgqQjDZKdfY8jVWLJw991NtnzDpHj\nxb/CS3FFFCry1ZVliGf0uFoUiZXC9MluB8xp3nw7Q/XZgfryxwh/Q8ifqyPI\nLksfbnYrJ49fHNQ/hIQ/2/DDLHcIfZwZV1tqxNYsGAqgUeN/OCFV5PKnzrhr\nk0offq0Rt7gCtuc+WQYCTgSYsjWnCNJop2HG4VMuyFq/80UXvQsxEwJUMTBs\nPcpMeOvdIQVWjiBOZUgXqsOqUEyZ5oJcnoYjD+FhBPKt6WpPr0QOgpwmiMa8\nIIk6O6YjnQbk/cz1P9F2W6qs6GYCHJnsNZU67+0OX4eUct1jj2x+Hjnpxi+q\nl0G6ZW2c6KYEV91EDl34zATI6Vzy4jLUrCkMi0yd4c1Nh3dRoP7L4TVz8/Bk\nsWF0kCIsO2SXhgNOKshoDh97uwQjsjptIalpjTOl6MxDRAhbhYgSqc/ZYjXj\nNatUtsh6kslH9ZKr3bvTmVM3DrMQJUnwNmmqIWGJdSXEVXKyn2ZnYykuwP9W\n/qu+\r\n=sn7N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c93691e-1614463857896_1614463909743_0.49043465555176","host":"s3://npm-registry-packages"}},"1.1.0-canary-9f9b5ea-1614554876843":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9f9b5ea-1614554876843","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9f9b5ea-1614554876843","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5d9bdff36378eef43868da36d152516773a765e4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9f9b5ea-1614554876843.tgz","fileCount":7,"integrity":"sha512-sAybMyy3BVteafipUk5em3CBoanUsJaVEQuPeRFiOODVHqFyX09UmQv8rk+x8N+GnIjlDLCmpt+R/tZ8EUnu+g==","signatures":[{"sig":"MEYCIQD3iae7FQG1uVTA3hm9HgGXN+x2+bWRuBRokBDwxHOhTQIhALzKUrV5fISga5jcWOTAbQwYYJ1oLa4UjvBiOmcRDFo+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPCcuCRA9TVsSAnZWagAA6d4P/0cmiBPPQptT8LrLmIRm\nEZNpXxXcZ1Tk5BqZ7JatFJVz6gjVNLnv0fY7RhyW2C5iD8US+64qg5t8dXr8\nqYh1WkruFzlqiQMvr6/6BQIx76RpDG4gJG/Pn3T8jy0OS7sra1ISpw3r2Dsc\npdlSwqWQNPLEAKuSPzH4QOWR3nFIFGAQX0mX1fvmzx6UBslj3rTtnOYqBpKw\n2dXrx+ELHqDRlbAPo7Qe43iqTrL66z3XFDiQq2BXcM29wT8e1D9UEuOTeKu0\nmYKxPHfMwTls8gfA4esu5BkaVID8vnl7uH5bBVOdGka6AxqUglqLHWdKDEAx\nvwdTo2WTB11wXSSKKbF566iPqbIvg8MbAuWHirw/xUfeUeb0ZnheANZ/R/Af\nJuLcXqro/8VatN5UnIjMN0swPe+VXzSAtoXJYVpqOBUFpeNiu+o7/7BRY2uq\nOan2yemkZBVxchfg3WJF+u8uenJJa90rMcM4EJ0UxJYT8aUjFzeXLWoTdr8H\nHRpv3Bq+D3h6jy4yzzjibjh6ZZKwZkoP3KwNGerES71AmXTYi1cUy8UOiR0Y\nFXSxgNcmxedTXyDiQIAXjpV9Gqj+b26Xv+wXJ66dCzXp10fD5rJyO5OObgNm\nn3P2B4/WuM3lCfnAavjGY+mWw/LBYSdcsSUgE1utw49PxBGgn9q1APpDm27i\nUt5Y\r\n=vx15\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.20.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9f9b5ea-1614554876843_1614554926225_0.10940329803979543","host":"s3://npm-registry-packages"}},"1.1.0-canary-a01048c-1614554889137":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-a01048c-1614554889137","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-a01048c-1614554889137","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2c491ad67712472ccfbab099a9fbfc6a2189ff8c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-a01048c-1614554889137.tgz","fileCount":7,"integrity":"sha512-zMfjEgg6h2Iq7YsNMdp29vUaOaPp/UdVzAzIDU0TS5kscmgjkZ2av4AmGhDQKp5cgQdfyE8JRMxxdA3WHLEJ4g==","signatures":[{"sig":"MEUCIQCFa3p/Sd9zZUL/KEJLPMAfumZzWdGAhsxoCOAIDN4oYQIgd2d0jHVVUEk/rNK/kJrFoNI5MspBTke108jkjq7VYAc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPCc7CRA9TVsSAnZWagAAhXAP/1PUePOLT+mYQTpv8OXf\nfY5ixQif2M78ZPeZlL7JFhpPaPfRu+8Lm31SFoL/ck/1m+G5Sda+5JI9V7iJ\nuaEAmuIBr4Ni2hTKYoQ+ZLqJ1b6V+tVeZmrY9D4QrmWGx5yzW5Par1VpyI1T\neOBUBRK5PClXdCOOgdYjM4Ct6lhO8twv8ZsT6uL3FfEb6S7LS4rZFfbsK0Mc\nCo285MJKZ0g95bTYAolscujhdM+9J4mu/IFczJnnK9iEh9r2mVbIloKN6dKi\njderPU3BgSsHFWPhViYIJrcTPhjz8gRO4iJPiJ9nsFhViKEndnI5GoS4VO+4\nXgdXNIdKq75cb5/J5yKrAsmvb53gLZgfrL0o7yu0HhEU3NaGULxA+kmk4Jx7\nZlJFoucWKBEKMGl+zQnIdLOojyfUmAbe6DLrwasJEi06wbI/ZgnNHB2RKC5W\nipJM1p9SsAajrq6QIiqdl5srCEPM0lNKRe2sPu0j3mXn5mk9gqktjmDRpNHg\nD7jTYMyjZPwSZ8k4TzZ8JHQfkkAJUwwL+VMY9tiNPtgN7PcqryS99nEUcxQI\nJFysyDay2CF/B7vB7f/rlk4AQhMmGBXTMx2GV+AfPbCiuXkkknD2JrCPZqHy\nV1KB+7MtrT0OknW+MfE88IhZZQ61UFA5UbHucZn/4zwRKR3jUdSl30/xkA9O\niIdr\r\n=QAev\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^3.7.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-a01048c-1614554889137_1614554938527_0.7562318653782432","host":"s3://npm-registry-packages"}},"1.1.0-canary-60663c1-1614628206720":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-60663c1-1614628206720","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-60663c1-1614628206720","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"644927c21fa636ffc6bddb82529dfe6d488c4d83","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-60663c1-1614628206720.tgz","fileCount":7,"integrity":"sha512-UOSJ47xYYwaTqxvmZmZgswT+HVh1qK6X9HHHLThH1oFumFhMbJZk+ZYwgOZiy2crz8/VlX49KwlzDo8V/nI02g==","signatures":[{"sig":"MEYCIQDDOXbpOBsN1g2UlvgmV9S4vr/vRXMuJbxUpm31Q1wbMwIhAJjdiqpGx9s8upIwulUZeX6lZbA3pEfR7FKamc9xnJ18","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPUWjCRA9TVsSAnZWagAAU1QQAJppljfhL6iuXwA8tnJ0\n34osXrfyGbDKCKwftexmpfkONbfb2aezAq8TuPNHp2dGHN1F3BVN7T0XKJJj\nDSjLJ8zfRBpIMzvVv5kLFHNdp5SKXwyXXRVSlze55/MlkKeTuqyJy6oVXoZL\nxpl1C66QyAZhqRybFtv+IfN4sEZhRixYc8CTh5N2bxr3SUiNyeyfPk4I6IL5\ngPJg90bmURWV/KcXn01MG8Qul4pxkdJhfSH+1mO9FRRigVgwpHVSmyiSS5CP\n+LpIhcLpoU8y4evl2M+oW8Tj86LFe3O1I7jLq/NW6LwlX8Cs4GS3+VySSQ34\nyu4KNsJYc4OpFGsM+3ojJ00mWgauDQ+zFR269kgAfZtsjoJA+/bhvTKGWnDD\nLL1LZKF9ydAxolzrY4pZs00dD5OwHvqFr6egba8q7Vx7ML7YKKoSMtdOruDp\nSPjm19VFLj59xdzuAhrRpRpvNWJTstkmpCEe8l9AVdh8kOJuqXppvkDVjaPl\nddCIg5fRX/RjAwR9S1aFjAv8akWIoIjlGrrm8xElH8yk5c/F0kpfbJ2c1gh7\nTwivhq+sQViVc3bwXh+WJfrbtrqeCjhoRRN6B7NShTOXru2n6mu9DIiPG48m\nXR1fcTFpjDs8D5tWM1PGVRHhNFPFmQnWOHNi7sBXktf4i6cyAn5u2RLVgY5H\nNs6d\r\n=efit\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-60663c1-1614628206720_1614628258213_0.9528590489766238","host":"s3://npm-registry-packages"}},"1.1.0-canary-60663c1-1614628206977":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-60663c1-1614628206977","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-60663c1-1614628206977","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e992a6cc5e72581dec3f615bcc9cd740d802bcfc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-60663c1-1614628206977.tgz","fileCount":7,"integrity":"sha512-ljDhTTz+//a0s58RoO2XAsHpIVFWqHwkJ8h4Bb+5UChCg4RiaqezOS/1eWeMYyuBOzalr21GgL97HVpGJvVSrg==","signatures":[{"sig":"MEUCIHTtn11DzvT5LLPn2g0d3E1zbfUmC7V18Nl8/v5sz8w2AiEAiVSpirwLljx6Q4JTrIKJ/lJVO9ZZYJ7K9ivJhI4IVKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPUWoCRA9TVsSAnZWagAAXrQP/iU9Rsb3LOlzqBuecHE7\nqurJjqfudg8XJJxD5gvCTp4VEKhjdoX0Qm0uvXhF64p1Aw4ydKAKNz66PvgP\nxNBXNHsJm4N302fFEK+yLo8d0fDCdK2V1PI1F42hxZVsFjTRJkhDojditrLh\nFORltAIlJXJFbYoW4c18Y/orjJpaLLs4s9pakdmWNPK+zBIlmH8RKht9QQbZ\nOT7nMT4V0PlfbSfrFUW/XZvWa4J6YWPoFYnxaJOPHFxWhP14eWfr457lOpMt\ntrNRd2uMhv5C8hj3pmFSoAf9Z62IjfXbZPwqoEy6vutiHvbV0tkkLWkTz4hE\nqfdJsVPDVBlRYis1vTn03km/bn76rlctC1qmnjEHJNmuh7wM7OuS4WrduYBf\nHfgGy0d3/UKMWbrvxspoDvd5+HgJOLWHNvc3naF1478lXeHmB0cf3bk00mHd\nLzrmB2szyr2moXbKvE5G4mMCxCjB7M32m7IaT4bdWY8+stc3hzoFjFG6XP2m\nr2iH8nVZLTZl3jWnA+Wr0+EvfK64ub9UEhiZ8iuVXYDQCPrVzsNz4TIH9pnG\nCLpICzN6dPkpbgz8OAucHooKwiCQ7fOYda4sEQkb/PosRgdOM/2CmU/alGG7\nlAqD7G48I+PDI/vUHPzt79UnINHyUJdCyxA+qcrltbb+vsuJU4AYQzrW1men\n24IX\r\n=zjoP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-60663c1-1614628206977_1614628263662_0.2510910006293343","host":"s3://npm-registry-packages"}},"1.1.0-canary-9b7f1c8-1614813349429":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9b7f1c8-1614813349429","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9b7f1c8-1614813349429","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2869ddc2ea27b62ec2b4a7543b8cbaed1c2e2606","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9b7f1c8-1614813349429.tgz","fileCount":7,"integrity":"sha512-s2q8mkF0LXm0FhRHrjYc7aGFlCQkY+HTCwDsh+mmh+z9zKxhKFCoRo1xFvMfYTXq2LwOHOLqpPE7mUkuRVSM4w==","signatures":[{"sig":"MEUCIDZP2vqckUGaFtvdYV3orDUGjRvm17/fB1qhMB2clcAmAiEA9V7/uOZxuiDjcOzGvBQGOg7XnlNI6u+FGbdkQw+y3RA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQBjVCRA9TVsSAnZWagAAsNEP/2oEI0iyoBIikd0imASI\nkdwbjSarQxBfrDkmdBgb5moF2FWOkXdh1kRPil6jsfgMsDI+LIFmLv9PKtE0\nYPpCEZnWZB16AZp/AdN72ncpl4ZB/UfeOaEO2zREhye7GxUyYvL0WO7revAN\n/pXnUmtD/dpaGkDPvUH2SaRtRWHGcueRNMwb/7WQk2bB0ik4ZrAYo/gIUeOx\nzIHwDPOvHnXeULuze1kFhG3rGBATGnL2oDIgFPwiRxOWLz8ljKH5Su7pcHhF\n1ht8iPIodnW8o+GP/snsI1/i+Og5uC2ryl4Z6FMt63qCIx+rb68pcykxyt+c\nUs7PzcmZUeVlyxH6bH/7kWQEonXkUOdOUlX68AYuvl3sMig4fVZXWVBOk2qS\n0a6gThE5dHx5rvFxOdoa7MTfuwqXA40SwneSqtSl4oYoQVAkWof4UzOO0BEH\nDdCL0OrjwK3lPA3FYCboMA8vqXHXIJOLWqy93MaRCurWam1kPHNgkPLDCHm3\nQ72j1YdR7o3zpsXBV9Dhpud49sBiNr7sG3XfiuPJv/PLLGHQYncRLtdsKgIW\nP5O71HFbrthE+ySh5Z8vijk14Qi9CPTd/pobpBiKXnGNQS3JTppnpMF+P3X/\nVjKOfFz2v0uN2ZVwWd7Cwd+oEHT0vAxuWO1nUqx5gjgEZytuu2MzHeSvAHSt\njf2p\r\n=Lw2I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9b7f1c8-1614813349429_1614813397157_0.11311416523248563","host":"s3://npm-registry-packages"}},"1.1.0-canary-416e712-1614835116050":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-416e712-1614835116050","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-416e712-1614835116050","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"393a1c8367205c9d8de2b5330250b6568d0b1354","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-416e712-1614835116050.tgz","fileCount":7,"integrity":"sha512-9PgT9WeuZVYhM84VkjND1Iq8f8+H+/jjbwgY3tPkUmZizisyeelXgVGUyQJ6PlhbzHQOuvMAyJ/mSHpxOBw3Qg==","signatures":[{"sig":"MEYCIQCFSk96gbqogBW1edpdAAy1RkubggQYlMhT+r9Yhx95BAIhAMQl4j38pO86rCix8RYhs8y//VW8QgIjkQzLiLbEQTw/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQG3hCRA9TVsSAnZWagAAd/EP/jMHiTfKmwQlYhagpUDD\nGKagjuLFoLZgUus1cQWog/O8CWPk7i0QrRi2TtrDO3mDYwMMzYXjNXz5nbvE\nGdW+6BWTvqu81mQRvmmfPaziOZcY1rw+rF5THzp46OW1hwPO3byHcBHf4pqj\nm1Z+PVE3F5FLrjeMzaah20Q4r7fyJ9wNE3zmnFl32SegFPhD+NO5yzk6aSbf\nMaAvFNIaIZOfjB3vOf06b6vCO38gbcRWkY8ryRZ3xFy3YaO4o2CzBxXPuSkT\nbgRyKjbr9Lr45gPRkp1H4Fh5mDokLdJWk3//BIfAjQhM0kMFADzlby/Wx/zc\nJFyIXZDehU3mIWPfUCnrPEXpIORcRnNBUCcChkALun24p3ElgDOLHSkPV16F\nkaVtDeLGRMo7kwPXsXqbEJGpmb3Y2LIik88L9mjAIK+aWafYxjgE4fRfio44\nls+XryWY/GZKlY1VUQljFOBmd0O/DQGZiTGnD01Kau+wuQWodejljjhqeixB\n+ABda+R9xCECNUlivpDr6fDb1VqMUHvYFmWUm7UnJG1lKuIQrITdvG0K8oHQ\noxiphsJ862zexjLM54VDbKwjXx1AvxL+d1UljY7eGKHVcNeC+f5zx5omcEgg\nq8vWXdW1vUopfIBTTV1PfBo79ZvdmV/M2AwPgMoGXfpynMvsULYlC+YZB6/B\nhBQc\r\n=u5C3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.29","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-416e712-1614835116050_1614835168869_0.7219245415469877","host":"s3://npm-registry-packages"}},"1.1.0-canary-21cc770-1614847064638":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-21cc770-1614847064638","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-21cc770-1614847064638","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b4cada19122f167163818a8d0a9eaeae13c46071","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-21cc770-1614847064638.tgz","fileCount":7,"integrity":"sha512-GRY2xWMLzm0quFhvk2eDBFUQU3fuUY6b/cngEY0ljjk3wYNRynhD0VoPmjtVY6sKqpAbVybYbZpu9QoF4WG0Ag==","signatures":[{"sig":"MEQCICuoUYod/rmUO1LienCSooRilgbLXZkNPZeCDJV80VqJAiB6c6kstQv7cWYQkt9ROZQ9KqIaN4ypv9hmn7o8Q4qzpA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQJyMCRA9TVsSAnZWagAA7o8P/3MsnCaYuH45FtaM7ArB\nzrqM3e6xp4v8ckA4wFSxHZBTDvDwz3gJtOyGTZKddUmx9gRBae6anLr8fEQU\ns3MPv83FfxWi/CUtLlH4YH3nIuohT+7wlvQ7XDw8MC+732bjK/qGY6sFYtsf\nsXo74HLA/0DYqMM/3SF/70q2pQjR85Do+J1Ay+d/hUGLtZ3ZrQzw4SwX6VN1\n9H9oZg7mNUsqbMHl1fJbzzG7gjBpNpPfjW8LEyAvKwd9kPOhrCJ1owaMRQxU\ngBWCjsHR0/hOIw/Nt5Y7UmtccgwDXr+ln5IazHC64zjNfOg9nrP/nbRpvD6t\nUE+S5OqynptLUGmQMFAB9BnVPeO27wUs5+P0nA+tAz5/u+gc/YTQ5wFV+IFd\nl/BFWACsbtZc8mT8v1QUZ4vVOI23pOWBcp+ksj9zo4zDmFHFr/f4StAz9M/1\nfy4gH/wqhy8ouHOb0adMlEkIDPzVsejlFZz0GMSTrsZJuvQIlCcxVS8upwvG\n6L7aK6m8X9lLNBOO+1iiCwZOgMaeZ7mu8//+qhEMv/DvT2xBM22hXnXcJOYz\nt7goqDE2EX2Lzz9XC+GZe0B1Pl29H3W42nG6xQVon4495lrRksMVXWtveEPg\nW1U1e0DO1bbXwNdLZHoZaDSF8AngC9K0lTOpBrOmlEC5G23Zz4Nl6BW85Fq6\nM5nP\r\n=I4/n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.3","typedoc":"^0.20.28","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-21cc770-1614847064638_1614847116315_0.09861758249316255","host":"s3://npm-registry-packages"}},"1.1.0-canary-f4553bc-1614849582842":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f4553bc-1614849582842","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f4553bc-1614849582842","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"85d925247f2f6abaf4866b5d1da9dcc8ad6fc131","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f4553bc-1614849582842.tgz","fileCount":7,"integrity":"sha512-82NLqlRbFWtjlMiIDm7LDUeAChyXMCRVX/hK9bYaXWkJUp2TcktRlwNHH+VS5voPGrWu+/8ccaBnXIc94sWk8w==","signatures":[{"sig":"MEQCIHx75y2utFlX4gdRGHI+g+IKInykdxc7QTHdcuGmBuFQAiABZDMNiPJwdq/kmg9Ke4rshI6Mtept77z4TQgCgDK0Tw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQKZvCRA9TVsSAnZWagAAXbkP/0qeF+Um8yphm5pheC8D\nFwpEnFGcafUNBDq91v5SCAwHbah6jO5ectMRbV1bIXRqVkbkixjV0j27abM5\nNnBe73mB1VYOOACp25A/uHHDIKhY4atxIiWsYVwIQUsAMw6JAmtNsUGYkRfo\ns8kbUfqyKmVd3xjQ2Y6Q3b4lu3qlV2JCQZk9r+61Biql0zmIW5GjNT4M7Z++\nafJfpQdxTAkqGxhvc2c5ibaKisWsMDmmsfllfPkQMdj02lw2HlbwvwfdGBty\nzUhihzxUv8w24AiD1bOY5FvJjQD0Rg8O0OfQMZcgUSL0BUHmrHteoMEeZqTN\nK9sIs4GHYiNbr7UbFrtJ2VdJofD6WRjbLmfOORizDY+XzqZDfX5AULbuY8YU\n525pThx5mLzc6g0PMG8bjF4oO+uddeM+diAT6TyOjutHi3iSYI8vbnP3au2s\nt0vnzM3Hd1cwg1bJHqS7GOyE8lgiTAkQcFjhBJ9Wc4BxmyTPDAYZQTVvzyJ2\n7+syrvtkMvHmkJ+P8B58523Shf4vTH8DAKAH2NpEeNVhfr8sIUIYUbFFmHwY\ngT38h9uhgAKCNWawzj2bfjKJUiVuOlHyLoprzqQHube8s1Ginyx0kZFMPYHC\nrM+mMFYp1QBCeyvwgUtY+1bP65rO4C+YMWRshahgNJYcSTUw74JDwF65ETHr\naXBT\r\n=RUYr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.2","typedoc":"^0.20.29","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f4553bc-1614849582842_1614849647325_0.3337239234386531","host":"s3://npm-registry-packages"}},"1.1.0-canary-e8f7c22-1614851454877":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-e8f7c22-1614851454877","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-e8f7c22-1614851454877","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"83ac0e88ee0f006759ab6dd892dff7e0a780cf3b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-e8f7c22-1614851454877.tgz","fileCount":7,"integrity":"sha512-bQoqqwJCyywC1Qdq0EIJcTrwo+S8JDwaGQn6ED587gWK5FkHuIvbShFvXr8XK1UvWn8Wr3ZE0MW7p0qVk+l/vQ==","signatures":[{"sig":"MEYCIQCi+d473GttoSkKCWc/S2s53QFO70p0oU8BnInnxRM5WAIhALuhFf7CcFRyn27fSzDWH7IrJxala3GgpQIHHfJSyUrB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQK29CRA9TVsSAnZWagAAP+YQAJbj0gfO6m+9E7XdIYXj\nGMCS+ohy8FqwTlIZAIS/mFNZD5hQQBkI9ruxujhWCS8rhOpUvXaiya1Crtsv\nOGavvz5gnVN5RGIhUkO9Ehe1J0Krd1g1qsnTbtndHo13E5h+w1ENZqFImV3c\nl1JWsqLfVRBEfKb1aJ6HrrnuVn7nqULY6gcVm1lJPjVmTCavN1vVqEU4/eUC\nOFGMAhLqZpNSH/c+RN8wV9u4HrfmqOKXd8yLymZP4D0gfyf+++IP45mi1CXJ\nllB5H8NJSzAJZT011nC7QWBf2A1YB25zsiBqyBHLWXIt2KbHWQhcmuw4DlkB\nhFY7KZwHbi50Zsx9VeRE7eapAVawEPYwG5w4p0tbsUZbX/zIEKKrm4P5hSLd\ntpw165NZy1NMsx7lIObDHDzRJbhCjyH2LiFH+BtadamNzYEvaMdxe89N6GZ6\nusy3xkd2UMpCRid3b/LkqaVtXRKV4OOFAtBMjk/CkNuudnMHlTnWCyMAYdTf\ngzT7jf3cYnJazNaQvPbjHFmXTyBXLLtalhQqUPedEYrfulGfrqk/dvWEm70d\nU/whnX/qK75kxIpI7bAHzdkr0s10QI+gwoP63A0vrHrBxWdlAtoDLTBip41H\n4Xv4Bc4chBnWhyEmp3248fYZ2ffgZVZtfwDbpmWiLDVeBaSKXp+3q/kwDCeg\nxfsY\r\n=n54S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.15.5","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.3","typedoc":"^0.20.29","typescript":"^4.2.2","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-e8f7c22-1614851454877_1614851517258_0.9269660361304384","host":"s3://npm-registry-packages"}},"1.1.0-canary-42bbed5-1614897523709":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-42bbed5-1614897523709","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-42bbed5-1614897523709","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"27a0dbc66f57da54c266589fa4835e3d509e33c5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-42bbed5-1614897523709.tgz","fileCount":7,"integrity":"sha512-Wq9JUWSiBy3u2e0sxMO7kc5AWlC475qDIsRYDcP+ULUiYsYuEvCEAtaSA3Jv3fDOPq4ooJPurXKNsduSwRb2cQ==","signatures":[{"sig":"MEUCIQChc+fnWCsmuWizBvrE/MIZw4wIgWe5Fj7swT5gUSRIywIgBGT+ynzsUet7cqfoi8xGl6l87iVXGJJy5nZMaumWlPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQWGkCRA9TVsSAnZWagAAqwoP/jO5qQbB+m95VZc0bAWb\nGjMtaR6jf0FXz8tksDn/yIugS3fcDGvzyKFu6JflAGOeMy7E2oI9J5b1DCzf\naDKfCTvKDkAgrXOGPRvJC2xU+IkOFEKFucfaXVPEFXB04XqzW3xnHvXdU+d3\nXZGI9c1qO0DFjO7+QSRV9wMEeKJhbrgaTBnZh80rWNBYKgFVwjKo9sZOii0Q\n2F5MgH1rx9Wo0qSC0VLlIqX4lPWQR60v7dhNOYeGy2vz0wzqyPM9yPhHNNPn\np9GimHPw5zDl/pLhA9YcUhuedXMapMZpLoHLLrspDT6qp2YYnrE77768KDYf\nd9oXfZ6e4fcPLX0GSny/QZ0NEa+PdDUEBoHDn4gH1Jrw2bngHImtlU9u7ubH\nla5cnRXYDt7bVU//BvIRZi5Rp8o63hNIQRwbu7QhME9r7Jb1HeMOr6Dcczxa\nGM9vwIfVQuNxPFE9lkN1LNFBJ/lauV1CBeT7o1CNcYKlAGapW5F7seZGv9Rl\n7Sl3P4LpTsJep2M6QP5rnBRK4wh8RSZnt/IVt3HQZ7mO1e/SZZkMw1GQUqVM\neQxKX6BG1wUiyzPrtBJRQKtrqG9tgL9ZoVCuVtxu1dqtM7f6pUksvfX7AWNK\nnKd0wAa7xpLTqZHi/NwP0jJACHtXg10JlqCm1lPy9Dolz3C/L0PY4W5dQQIO\n7jCF\r\n=Bymt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.3","typedoc":"^0.20.29","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-42bbed5-1614897523709_1614897572293_0.17043619021707768","host":"s3://npm-registry-packages"}},"1.1.0-canary-8a83dbb-1614955155462":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-8a83dbb-1614955155462","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-8a83dbb-1614955155462","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"13626f974f30670013e24aa93ef5e3a9bbb2cc49","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-8a83dbb-1614955155462.tgz","fileCount":7,"integrity":"sha512-V9HpQbfXGAsX5KO/CJf6c+kCLQOC4rT0ZHDHsdtnC4tjcGBTzfK+usxCCZN3LIf+RJLxu8YhT0m9OnHBDEH42w==","signatures":[{"sig":"MEUCIQCjp+UrciPo3luNJmp/AWpM7cr7IqWr4ZJvoGlpUtk12QIgRyg5E4Z7SIN8qNrnYL5yBu/KR1EFNHdQOLZaECmRRMU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQkLDCRA9TVsSAnZWagAAIZsP/2x2+MN8ELFiCV6n+SPA\n4NwmjOI/p77aMIGOWWwcoB33zlXpQLUZneiw3SUzCyKzBtO6seB2QzgSJrAQ\nls966+CM5213nEQZKmPmI36u/WenNnHrAWK9LbbfHwlnzSGEabQnSc4fzWV5\n4XN5btqS2+p0V9UDweIfw4G4AZP4iPYn/4JfOkg4i2b4u1PRbB1DjDEpjZjO\nf2Xv214iP/vjAEmej9WRSDrTiS/YTZbYx7zM7Bi5SSoSdJyoYx4EaQScyUL3\n6JNAUS1wIrfY+fOYGNfTKxepLlH0Wcfo8U3rzM9HQP55o/ZcGMJQzvUH2DPm\npp8q0UqhYTJonNF+ogb4If7MUpEMVmIHdh+IjYEQlnBYYc+kMwC+1U5UZi+1\nppW/3dRqnzaorgpYb5dUaeioCySsiBDoYFUk0PPNjZrTdjDE68S+4qr1XLyy\nJhscI++EaJxJJD63NQLTBVZ+OgHo3sKzqSXZH4RUkUz3Qsp9jvuM59ZUqtWN\nUSM36JesqQCs4Emk49nQEQJNFt+T44Dt0bCmaZyX00MQGZ1wsXZqSptCbjTn\nLsKy0kqpkBDNjThgZbq0bOuBrBjawJ4vko61bhfyLtmltTwwb3IvkJtg3kki\nDL5JCKN6VTERaCMDy3m+K/xXS8OUgX+sIP03m7vDGcSk86WGgA438DIFRwP2\nWng4\r\n=pfGi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.3","typedoc":"^0.20.29","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-8a83dbb-1614955155462_1614955202267_0.7222238821227631","host":"s3://npm-registry-packages"}},"1.1.0-canary-b5fb06b-1615048062850":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b5fb06b-1615048062850","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b5fb06b-1615048062850","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1ed7163c0a18c3303682a64dd0fedfc8168f49cd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b5fb06b-1615048062850.tgz","fileCount":7,"integrity":"sha512-U3HgtAoqTkv4gCAYNSzb2B0whd6Sx6C6UenUZBFrACn3yiMWzslgFGU3SJZ7SZaYrIsXNyfLD6oiJ5e1TUhs9w==","signatures":[{"sig":"MEUCIGkkeRuu+HgksT917oB0QwJUVs3SI9IaYDNBXvJKf54VAiEApyc2SKPgmBVG1jr3Th9AIVGUooBk3aeuEiKZLfv8ooA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQ62uCRA9TVsSAnZWagAAOT0P/jm/rtHfQZ07JR72xGJb\n2O/l+WK/DheE127gSyGiCmgN6xYaquuooc18QwDEEqPEkynue38NMkghw7Si\nrB3XZwFhB0mN6t5iWVchW5cBgngwzmgbdTc+D8RbVyv/ZYKtt3/QX74T0Wjb\nF+oIx6BQJgH4Hxu4mEVVZs4gyyyK2IaWELNcE2UTUxRZKLvcTTRRssgJJHEA\nFajJKC1KMinHIFWMtljg7fwVDO/S28KFPQMkGVfEDWdSTdUcsLgiU7m7Q8wB\nSjtZtpWBjWOrAtzEi1PdAvGRSbhkfS/TY6lPCXmerF0IikzcRW2gaPv1oM0c\n0rpwlZTzyRiOClqiwqLeftm2vdyFsWj7/CMW3qLNeamYaOGKAmVZIjCY3Kse\nmN7hjs6+ZhuEfUTnxHzINmNYsKUDPovgb1T0eJFhxjGAOZLU4LdDErKZ6/gz\n95tVhh+B4ffTcfCxI33a37cyLIXCY6k2qiod8dKsZ/toPlZbR445Aawd/JgQ\nbMDwZ8f0e3HEAFAkO8rxgdtP5spO04em+Eyx31zTWAAQht5ivW1NZ4II3XVo\ncTsnSvo5DJcitNYYgOKVx3g4edSQ6CG8hZIvIBt4zl20V+r9ZBZ/kpGd2fN6\ncRD/gxD39pHQh3YUjU8nR0RCw2IIw3/uZ0WLJjfgQ0bml5lm4F4VZoHQoLsJ\np/Ca\r\n=h+WH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b5fb06b-1615048062850_1615048109830_0.6521813672451511","host":"s3://npm-registry-packages"}},"1.1.0-canary-b5fb06b-1615048062652":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b5fb06b-1615048062652","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b5fb06b-1615048062652","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f592c73e2b27f5d3cd6ad45a84aae75376b2246f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b5fb06b-1615048062652.tgz","fileCount":7,"integrity":"sha512-TaDOSWYouXbPB9SyQOdt55TX7j5zC2FgDgFRwm8SQvaNQlvUrTSKplb+foEuwjjUxiK9olQOEt6mQ4xj/ukQRg==","signatures":[{"sig":"MEQCIBsiSPIvuuGLP0qcg5ieogPGmNG1Lnrj7HmCgSrKzSSaAiA277JUsKASpDZd/cyAxrNqHpX68vuWhGYlFOT6mzTFZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQ625CRA9TVsSAnZWagAA5TUP/RL/1Ec9Dmq31lDY1kr6\nboRSlZF2I5PcMn8wbBClCmEeJPUGTPYjqRMBk8+kDYILhQA8oKP74KKu5Uwo\nq99g1/KH7OrL5Wa/42nrWwj/+lLs8Y8Zrpp0wD1LD+SGGbkGHv858gM7+G68\nCnCHR7QXFeNRF82N6aLy4jYQuOA8YJ5yAu22ucZQvMjim62HcdRsvzZXj/CQ\nC0iU3FIocsFXMKbL4BlU2a6nBvIWyXni7YwL+6nyKuMx8AWuH8L13ePbMQOi\ny7qtsBip4iMAg/e3YUvqAJK9T8BKdoLnQ0bWa+WEaCH7C8/M0PzrGmCnmOhB\nAq+oS+XeqHxXRYw6FD63bB2JoAp+zRwHeCJh9tNvxanC9lnzx75OafW6AEdH\nclvcKn3VCKFPX9E781gwWRzYAYSZnLdvJl1tEnO6YWEWVzO5l2lAunMOQLKw\nfD/Uj2PRRGiki/bPPKyoihhwy6VEuk7cetVQT81kEpeNyKvOwAcu90UZIORK\nJnikkIhgpABbZhE1s6FoPmnfcGgJRFsnjjYfzUs1QKE1BqxEzrZ6VgSB2gUV\nJ6lQrQYWOwEebNcSOc1xMV0kqIIooml2v32EOWf2xUnWJDTpI+mqmAxWsDxh\nDvq2Gdpx+I8+mqvZvr8dpkGc7k0vrIfrMYiyDusUWQAc653Nd0n4e2FHAFsx\nXv13\r\n=ItYD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b5fb06b-1615048062652_1615048120819_0.7056996880334614","host":"s3://npm-registry-packages"}},"1.1.0-canary-c878001-1615245573585":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c878001-1615245573585","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c878001-1615245573585","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1ccfd440b2f0d3e8dc69b1e82a71b3afab68fb69","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c878001-1615245573585.tgz","fileCount":7,"integrity":"sha512-5VQAiNVBIKkNXsaM0wLWaJblt7Waq70fCsXUCooK10o6UE5FouMGr6aMS21B/g7B848dp01e9+zyrV6ny9B4lQ==","signatures":[{"sig":"MEYCIQD+Rzch7SK+g3B7DTqJ2RDwYfMFMVTIX4pn3AeILEh/6gIhANj4rr1WNvOptkoE7+9zbRflDWWrah3QW6RCbnSNoBNN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRrE7CRA9TVsSAnZWagAAmlkQAJoHR7L0fIZn2Uy6t9Km\na4LtvGbksDA3Vd4P87YsBw0zLoduCi+ZZMAxTQ2pI3eCa6ygy/k1z73MAZja\nigLhgjtqmqeQbhLn35VAj+8XpZQgOR/ODouirHeUQbmmNDzafr49Dv3MZy37\n6srW1YKKUSrMaEeEicmLoqDhii2YAZvBNzlIOVN7+oqoDzbW36lCWcLMxAGV\njoLqW4pljU81ll/aiWy7Ap4rjV0S4sGMPiElfYxlJa1DpYlVK4YIlSRfkVuP\n0j39ypGjRTsZ9oThg9IMN1/fywMDkBPbJMmwCsDgHk+WJ5z8X5PdkKhWp7SJ\nDQ/e0ocfhoJsY+fKa/+zdy6yR3srh+Ce1zU7bFFXhO+epO2BRdcCPYAtNzDi\nExGHmZL/AwUtJkGAgI+W3qx4GXu/BLUK/Yzpo4LlVbYI002tUEkL+lMouF81\nsqGtq67kS3abqJq7GWnm75hlWqs90Erf9LRxKUUAMP9DKpZgzBj891X7jnzO\nKm4HWltoJDkpNac6uPx7hROKUu7nc3JDufiO/3UaQV+a1f6n9hoMJMUmQiJA\nwpB8vffpu9w30Axo8hQGByOfDhk8GViW/PS6KMEKI06Q7iVdlCkTkWNQlpi0\nWC1CQgQFi8kRlIvsWuVRviSnJ8qaDR0mrbRm1RWw130aMoBJguUElumq6bHA\nG2g5\r\n=l6X8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.40.0","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c878001-1615245573585_1615245626933_0.41647059415709364","host":"s3://npm-registry-packages"}},"1.1.0-canary-b73973e-1615279750099":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b73973e-1615279750099","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b73973e-1615279750099","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6662c8206364b2af188c58549cb11937a19a8fdb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b73973e-1615279750099.tgz","fileCount":7,"integrity":"sha512-4ZT5M3lDJq44rLEj3mHCyqtiou7XXyph1bh0gzoGYXiACKoUSkY14amBF37OqBsLl0QilGHOWA/Tn0yz159VeQ==","signatures":[{"sig":"MEQCIDc3EeW4G/Y/fgvf3HZ+7ch8ansWbp7Ghq4oORnOn6y/AiAlnysnkFY9+ilnhHWo3vqXzkZK/1eqe5YMyxxuHeEWQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRza8CRA9TVsSAnZWagAAo4EP/0LF/H5KuOMgzH4kYZQ5\noXCxF3Vpd50936yfbFGCVMyHAHE2C06dPpXl6uavwWFxDPn0OnQHYgr7mzsr\nShtnf31Id38iN6IHpWSXe9psBYQolDEcXDA4XYbcBakficImvGNmNC3Kzw7d\n6GGn5pd+FcLHCzDCwi81DfuHPY3hcSi11NC+gymLXoQ+NLgZVObUzXwtp3X/\nTN6d19BAH+0cfQjNSuWpQhEifw4OxeefH/3Uae+uyjEzlpMwt25iMOfZ+5yG\nyayTkuDoK+q6lXDIwmTocn04wD2ATmDS4qQx2+nCCdB/Pk6xl5p5NHASXERY\nuOtAOWu/+MDLG3QKRSnJ8foRASuK6YGumAJXVrai7/bqzC1uDgoXcJA0+ncL\nPADHijYQm/Zd5THub5Ddco13UnvMOj+8QlZI/eROjBfqsL1gLpAgk+Zj5D9S\nFvElK6sIPLSqM6opNccB/1Vwbpb1CGlzAp0smcbZCFqNwRRYErTObjxgm2hu\nX53qx39ttCL+3BA7E51YW6Mdej5RQDjwaTfP3ZRKf28PLAcuSJpOFfNixoOf\nds298GoTyEldjtQNZqxPJP/GGTDEzxpWLiWFucT6CviMFSqAYnieRQcSrN/j\nza0tXSHev++fQaI+shTsDtOUo4H3I2P1mBFDFVCKNjNBi6540SwRIQIkGiFb\ne9q7\r\n=O4Fl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.0","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b73973e-1615279750099_1615279804195_0.9683549582106994","host":"s3://npm-registry-packages"}},"1.1.0-canary-3fc277e-1615300490879":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3fc277e-1615300490879","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3fc277e-1615300490879","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b0c3692b90ff1cd3cfd7fd9c952005f4bfda3dd5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3fc277e-1615300490879.tgz","fileCount":7,"integrity":"sha512-stL8GXumlJmnOPNySqdGDyoQrjHWLTLktPwIM4y2q9RxwN5RofjVVKwv6ICUGTyqkpmka8QQEAheyXjUzb+sSA==","signatures":[{"sig":"MEUCIHCvIFTnurrTf13KWaLxTNcJCqsizGlUtLB2qufV1B3AAiEA5ehxSRE+wOPijJ3600AVAR6JTnHaWPvljVMSSr37g0I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR4fGCRA9TVsSAnZWagAAQsMP/3b2f++d4WUmVNkJM8yO\nhCFGmMQ3PPkspfp3w5m49Gi5OaD5lYMXRrh50N8uvC44RYDsPuLVBB4dtuaB\nX/27X7lSvd3cWEbXiD8fehikHa8tsbVJxs2bYwyRobISlYZiuMzOPjkG5o3t\nG2O/kqvkZirwDMqkg5v5EnKKY49I1ucTjKSiLALRxbTovHNTh0lhts+pq7ya\n7CebQjGLC+qa7Dkd6GJ7eJ/DzExRPr4mZgQP4dpWnX1QuR6yUXLInqvHJ4zX\nYVvFgBA+GEJmwkaHDQjFXAlgUQLH74zhCg4NOhZ8EYCUXCZ7dM27ZhLo2jmC\ndU8xB+UK5apn720AHv0WwOcNdNef6XW7JU/yVv5xROlSiupJk59MKgvKoV60\nJwyEUkqfIxACGI+KRwXNZy3yWpltxRnyulQ3Ftj/zKHPP1/238PoSgwlW6Gf\ndAflripZpmch4XR96cuxPbJZyrP1WuYoHLj5ppt7aj7/H0XIwKl46ypTsoFK\njrF9aNPoJQffuURGQwC1kSH8FIKlWst91qi+tVSg7ieoGo+fHLLk5aPt8iVm\nRrN2QR0JriDhHyZaVTBKM+bkfyufhOsfJbgzV+RlXjDbK7mIbe4Qz/3v/uP7\nGzL/fS0AwQnfAKROUWOROMJnNdoONTsUZ6lHl0geo/zfjn1cMd46KjHwHJnY\njeDL\r\n=E1vG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.0","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3fc277e-1615300490879_1615300550365_0.1818828318543424","host":"s3://npm-registry-packages"}},"1.1.0-canary-0ae88e6-1615440304312":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0ae88e6-1615440304312","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0ae88e6-1615440304312","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"35bf882d2995dd79ff35702a3f36665d59c73d67","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0ae88e6-1615440304312.tgz","fileCount":7,"integrity":"sha512-2h2KsmRrDVA1lMnaO/66uLyTCwXzgFUg7CEO/TMwOrZ3Y8RDPY/aQjr40wZF9rab6mzqc+13ZlDvdSBNN1/fgw==","signatures":[{"sig":"MEUCIQDg2/Lc7rxmKao7LICKeh2pg98B5BAm8niivHNLmY8RWQIgBjYMO7Dj8tYdaviXibKmhWg3meSSlp+jxnodsAFgQ6o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSankCRA9TVsSAnZWagAACFQQAI+84oy18XF38lffUa51\n3pks7I0EL9/rwl+BL2CE7RtVfnm0JQFw4qmaDejnqaXXVNbBuhNWZt6w1+H8\ngRGSJ9Sis9sZdemE/JgHt7aklhEElB6qj+ZPbx+0gTlgxThCRq9P+mii3Bro\nTBiAFCYD88Y3nZnSdKeA8JYsLjDEkW4zsf7XZK7ydax8D3OCfc7p6+3fqPFM\ncs/9uEWbvcWPo7Si3m/uNE1hEspzcHNJV1zTkhlVCuMku57/f46yHpPfGz2w\n9zSU+X9VcE4pHd4NH6I91xQkUdjpY3ugglYJ0IiuxpntLD1M7H5GYHRkH77l\nWXPfDd0xoHpJe6VCbU8+NcPdN5VsJ8DpPIS6WlWfojP/tQ/i4NEnf98fOmg/\nAoyyPU62M97KbkeYXmVFH5V3JFJDRn18SE/hLuKaQbt9NZbMeyqnc74VWBs8\ncTnMRXQYaDQ2PGFV7zYuXS+eE+vVlXlZMRO1IIEmlk6nfYS83QNnOSRzIc9v\nhFDWQKclgOy66fqT+E0n99BAUuzxI0TrdbRH1/2m3oAp5gq+47UP0mv1Xrdi\nR4K403NUw64cBwDT3IvMUfaDkx8QJdWv0MjmQebYIMjndF9VLPyiRIAjrtQy\nOnYj70DCz0ehaH7e9ZVnX99c8ZbPXVQ+0Juelw9LH03gCItLtctfUkSGhBGu\nLncm\r\n=AWZ6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.1","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0ae88e6-1615440304312_1615440356372_0.695318923216488","host":"s3://npm-registry-packages"}},"1.1.0-canary-ffce347-1615560021004":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-ffce347-1615560021004","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-ffce347-1615560021004","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fd591561d2de2a8c94e052908a6846d4b3bba668","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-ffce347-1615560021004.tgz","fileCount":7,"integrity":"sha512-OlycMqPnSsD8u9QAMNeKOBX5fPDw6RaQc9J/XnMS7wjEe8/PtsAk1IhZ3RA+83hvlg0+pHQsHGGuhm9FvnVhXQ==","signatures":[{"sig":"MEUCIQDNseX7ESS2fyHLaLOFLNGXf6Gh12nMtavJnrBmKD9N5gIgQXXkChU7XYSsj4i7F/dGAEc9COMGBy4BmxJKErD2nhM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS32TCRA9TVsSAnZWagAAa68P/i/MC5BQ/2J9YzNXzGDl\n/oY8XpSIwZLRMuIQZfxw2IgG9tVA1HSZJA1ilE3UY1ZlJ1rSSU0lrEgGwGY6\n6/okIKM04CXCP/FwCQG1eLO4tKmZsoO+/7ZdE9TF0IwSDz/MLrKSOUxJ292a\ntjJvGZ3hNBJPtgWnJfg0F404aj5ygta3jGVoFjC7quIQnFWn1WPYpGFSTPi5\nmfeWkoEsUHZEkmb8uJpFHg0sVXZnm4rTTjlwEIvELgM/2gevFEHfrD4niKRs\nfN6AvLmgeTreLM+NDpuyumSDt3qPbRw43l11HkLinE4hhqyxSuYJY8iSs6t3\nR6kj4b35it7TB+L9bkcgrphzOOUNTP2Z/EnaHu3Yy/8Pu1HG6RRpiNse35WZ\nLYS/ugODXjlMhhlg4EdgwwpHE5WPijh8HiRS+kIQnezDG+xGfaOIr5KfVdYE\nobLJy9NEe8vv7M4fqChorkZNyBoA1eweVhAChgefiBqLaeTRGT9HDVxk5LHq\nzxQOzK2/GbJX1asEZRjNBYts23396rlueDa4s6rDglGn0LhUgmJdIdqbiiJs\nO1g+FoT9kZa5svtZnoRZtJVCDsBadc69oezzumeLQxXYIT5gNp2xRgjz538t\nfR7dS6QCUQkduBDLINYV3oVPVEVrru3rQTipwF60YRM0XNcVBh+HL9Otogcs\neF9H\r\n=IvqB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.2","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-ffce347-1615560021004_1615560082990_0.8664192211810984","host":"s3://npm-registry-packages"}},"1.1.0-canary-ffce347-1615560022117":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-ffce347-1615560022117","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-ffce347-1615560022117","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dde9751eab3deac0c329bae4c3c55366da8d96ea","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-ffce347-1615560022117.tgz","fileCount":7,"integrity":"sha512-i76001rpMrgcMEAQAOyzQQwmelFvkiWzWbfz7DSFPJZcWjUY8PWrH7sStl7PWu+rrUsUdTDc185T146ippmCog==","signatures":[{"sig":"MEUCIHTZj6mPkcxnb2ZLgpUbvVn2WLp2boV1RWUrg8YezIP+AiEA6172gkkS55nXDK+oThhT1xJ5gUDIllKXQUZyM5rRExQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS32ZCRA9TVsSAnZWagAAXPEP/iqFNiPWpfzIj6HyOkiK\n6pK9cgHXF7Hz5hD6fIfvqS74FyuQDsGNqLWRTcoGH9pCOaA+kfTKDUtL6je+\nIPFW7DQSd1QcHSgkxUE5xtBjbxWs7PbD/Ep4iKzkqSqzuxVHadm291AmO5xm\nHmy7J9/3x3amNnW/xtD0g/EJPZvqpEx7lf2g/sbxEpUsw8gHMpntWBBL8k2H\n4L+4LTv15YHjaOBJycZFVLGRsmLQ5g5r1H+P83nQEsgEpQhmqp9Bx80rZJf1\nJyXzDKUez5rZqXhZB+/EptFgxs+KZvB0UxqTFZKfccjt7u6R47285ntzUakU\nTzSBilcJgB6eJbDjiaVtrj2Nn79rCedFS5+VAvhHU0gSqsBRSmQyYb7ruIsk\nh6GqHPsLiANwEPBBnMB+2Cj4AsFYqkY/6b7CGtCD8sR1nwNvdLKctccYLOTz\nboa7Lz/6Qekg8962AXNJCzlnDT6Hoxi2lMQGNxIYSkb3msdjNcP/1tdOWIJe\nbiVRFnowFxZsZHlI6CPkBmJqmO4FCSTFu2JRQttgffJ4lFz2i6/rZtEe0mgg\nYsxlpfFjkIF6sUL4g8NlGBy0+H1M2E6SSJDO9BtiCUQMxD8f6Nerh+OWks6S\nITgy3zmsksZNGg1gsvisFxBZhH0807D8y3kBQ7RAuOZxZteX05g6dd0V8oot\n9BG9\r\n=CWJ8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.2","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-ffce347-1615560022117_1615560089199_0.635185351228805","host":"s3://npm-registry-packages"}},"1.1.0-canary-d34952a-1615586262722":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d34952a-1615586262722","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d34952a-1615586262722","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5ab5cb31254a959a8547ebcce4d22e1e86583f8c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d34952a-1615586262722.tgz","fileCount":7,"integrity":"sha512-CcKbewtgdA7Axeq0UDdaWj67UjB/IPMsqSEc400ZtC2HlEblDKY4+T7Qqm7cgZkCHsFWfAIWU7xJSVv4LY2AQw==","signatures":[{"sig":"MEUCIBuKJxJ7gjwbjJyNCnRWrphXPzt7BVD/KuO5nqOTxammAiEA/ve6Kx1/62Y6Hc/5BsUUrrWsxoVw3Rgzh7zVSKfkNcw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS+QNCRA9TVsSAnZWagAAmQoP/2M60hFwgwn6z2Ad16xI\nUR6zYRcU5E/Bq+NCOSbiczaT8xyChKVowIhCw0jPAK+uJ9HQnb7lNE3QTKCs\nQKkFnebmeOUPgSxgyVZX+cOlvPOy45F7/NE+rwQ4SLtCqW504Gk7RxUmSzpW\ngj4rHogRQePjpxwJJiONTS/+9M63IKwG7Zj5XdtJP68J9g1iolb+gWKKF24L\nxuGrhIbI1l9e87RggqW5uGt/hwmbMYaEemBdK05j0zKilmhb8lkvHxF7NKkz\nVFIsfMRVs8eVDHADp9bKplz6+/tUaSZKa0O85w2LefgkT7UJXijXs4Ax9V5c\n/cZMeXkjn3rjhhQNY3kvcbKnkbJ+5N9u8Zp1D+dtTv2WiQTWYnEJxIeKvcZ0\nCl64JTR71rYsz3NrSXVrMqH/uatbwgYg1zqvkCdS7haejBOGfbnAGw/YlHME\n4GMkjO9TKUUIBZKq48A4gmVTTXWc963FPqNNU6si6reySl3vHJwCw6QfxmKH\nOmSETgPnhADdB3iuzPGrTpmq0fzTWN+Gj8fWWNYg6xhcMqtpC+GUxtUU6oXH\n5wccYSKV0QY2BDtvLNi4sxnwgfT1FoDWcFlU9X/9cgk3VcYWMyrabGZ/VM2Y\nlHoT+3kCOTIOsZcUpC69YNWXXVDDAAxo4Tm3IAKlWmEcoKIWmrWTpR8dtDyX\nVHoE\r\n=jF1+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.1","ts-jest":"^26.5.3","typedoc":"^0.20.30","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d34952a-1615586262722_1615586316597_0.7723513088044529","host":"s3://npm-registry-packages"}},"1.1.0-canary-7a36b2e-1615693923979":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-7a36b2e-1615693923979","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-7a36b2e-1615693923979","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c02f41f99f27f2ffae5e3151ddaac299bea98782","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-7a36b2e-1615693923979.tgz","fileCount":7,"integrity":"sha512-eWwryHg3KUj+EZsrjrZ+5Z+Euqb36waLuhr5haNJQF3by5IqSpoSMxz1aYr0P2DJmlmSMZLFAVTfsCMAm+B+lQ==","signatures":[{"sig":"MEYCIQCntJR1WXHyAJYjCQGprTeUSzcth7SP6ycn9LdlFlDwYgIhAO/JxjLNNeQA8ml7ec8+e0/5b8opGmOb+ppOcX2wC3Wd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTYicCRA9TVsSAnZWagAApzEP/0I06B5Vy39GAoa6FVCF\nhhI9CevqSB/6Pjznub/y/PlfZUyraGvIYKaudshnAN6lf23LRuW6N9aQSCj7\ntuCdVAILAAHbuyGpb1Ujqc6pYceoaL6Ksfl42p3I4JmlTnKxPidjfC5BirpF\n1BY6IDjwNXpX42BI90kX3O0SwqeHDlAc3a6nMV86jgxJ8lnLE9Xk9hMiQa7x\nuy2xjgMIEWrwYPZEYNGgrmpcRop6E6tqMB9YiXYVcNaBEJ8eUksyfr6ayDBQ\n2W/+NolEHb4M3ovYCaZ+UZIksz+Di0SA6XqEtK0kIuC3qIXneScj0YqdxDJg\nJWToOa9ZPlh9XrpKghEA2cP9WQ7SE+Sir8GN/tFajnyGzP1IX7Fcgb9/BNKw\n/QjsVgkzFYIDwAsg0aR4rtgVTmWNHUFa6/jsN1BUbeF04gehd6dWGJ4HXSSZ\ntebRMngjjV8o0wq2rKiOdZayjbM8DnCBiiopg4FoIg18jJT59tXd8JZ/2MMF\nI9uJwwQ/VqeV4WYqACVhhmabe4UWgZAKAi3Td9TVVDp8pfFMQQ4zQj6BwbG/\nlbB+01TDOlX8eE+bs/upftg1ale1tGNw0q0R0VN+mhDlTjOv+fzBNlJz1Udy\nk+jgHXsEiFuwIRE1G34ejdF0d+9jN/TZnDBhRu3ZAAFjMoLFLO5bUHWVAO8C\nV9t4\r\n=oseC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.1","ts-jest":"^26.5.3","typedoc":"^0.20.31","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-7a36b2e-1615693923979_1615693980364_0.14090347775293965","host":"s3://npm-registry-packages"}},"1.1.0-canary-7a36b2e-1615693926558":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-7a36b2e-1615693926558","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-7a36b2e-1615693926558","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"31aa227e147b41002c49c6edfe2f7abce44f4292","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-7a36b2e-1615693926558.tgz","fileCount":7,"integrity":"sha512-SYMfsaii2Ux3WjxkUkgLYQ7WNqKsCD2eUyr5ZerLxuIyeHFiduBZ0enYZ7T7auHJE7sT9MBb2DNSmyOL1GkQXQ==","signatures":[{"sig":"MEQCIDI8BGLMR0aO+IUNutNiTHKEu6rPUobS3m3fqwteqhYaAiAtGdt4ulc05jMKPv4sdtDBaEeEzi2gZAvRoEhdZYJm3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTYjfCRA9TVsSAnZWagAAvDgP/jUHa48hCWGfsok64BXG\nBpKipQwScByzF8SMkDwYXC3EsAZm7Htd8pCpzX7+GLJUVgt6W3vTMa6VjNzP\nhH9KZN1u94VQ+CQYQ8ZPxSPjUD030CRgkSOWXz7mKv+5IiawJgb0V3io7ZJc\nde6ApSH0ud8Hleq505neYfRvfTd0K4NpoRI33E8goKigG6tSg2HMaJiW/vTe\nlGyAlCiCJPkkACfh1OCMsUvLM1IBx9n2Vue3r0abQmH7zz6Cvru4HqEtNDbF\nUSPAlyOnPZYBNzMTnCDCKqUwAR4pOmL6ctUoC6QEmcyUnXv1iDi3IoOMzIPq\nstBM+Vq1o9cq3OfsKWgD6MA1lLvHSwrd9H2cR/9q19AXCIeMIjB1lEao5/XZ\naYpj6T06d5TDy33xRjLuOwCli6/nIf6wYfPw7bPJ6fqm0j8HIwgz7SEIlv5q\nT/3pF3a8upsRRnxx4gAUL8dMX1vb45GWee9TVj1oY1LeBkf+7EuTsq2ZE7Ex\nQFw3+HCAr57kvquoMbkfQQt55VaIhPOyV1tQeQ1EJusE+LsdN5cy1eQzkV4K\nkNhNTdo+0WbJ3AwEp37s+HlAXLdV4Bq7mmgHl3/SXdBhc07USdHR91bLkbDo\nMIz2m9iPE9jt1m8T781cBaOwZ0bm71Otcg4UHfbOOUXF7VnKos4KxgCxJ9BF\nOMgB\r\n=ui9C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.1","ts-jest":"^26.5.3","typedoc":"^0.20.31","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-7a36b2e-1615693926558_1615694047054_0.9075736993887784","host":"s3://npm-registry-packages"}},"1.1.0-canary-f17a854-1615752336676":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f17a854-1615752336676","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f17a854-1615752336676","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"59e6c1c993f2d2658fee4f80f1866a2f6a031bac","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f17a854-1615752336676.tgz","fileCount":7,"integrity":"sha512-q824TzKWFo2hChYwFWaT54rvOs5gS6GVdiLuqW9y606bOaoyx4TNC9LYI+nVqA4kANUigA6JmWi34r0Yd2ebpw==","signatures":[{"sig":"MEQCIC7Mhxl0HrkPbDjy4K8d/iGJHc9+l8KoxVMqgGrmt1O3AiB90MGng1HfxlzL7sBgEMUlM7ZxmrZnPVvwJKgvER2pvg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTmzCCRA9TVsSAnZWagAA1LoQAJPLhzPLHQXsKZmvr3NE\nS2Nj7F+xvNKk48uxtrzKj1jOExPxU5EIqZHEcx/4onRllox55XjlvDIu/axd\nI/0blo8tDes0/L+/0DdNgh6z9svyad2CqMLeRDm/pmZu10LcQUFDSa1ot5Gp\njzE7nuO7wYyyPMMoZ49rkans/XPd/wn1y77C+S9clAB8TGlNTh+LRNytYEEU\nKGqk8OQYziMve+tqsGYlqxZetcqTL3viFRI9lkmYArkdvb6/ZnpHHc6Yboz7\nmxnlQyn18BP6BXD4ZAfiJB9c8fXXHJ3kI8+EAAz+arcLDCiKUYP6LU6CR2H+\nTnncbwUFSx5Cz/TtAxckH1xS4wWltj7eOe/EaO90Yv3iHmh8qngq16ru8mx3\nHuXKgN1/8zuljMjaOy53MD/t99NKo2mBQmxbQ0uwdH1SIm1TT4FNj/nygOu+\n5ua5LccMsUzU+gSG6bMtU4XCKdeu0HOJoiXugfBBzcU0dCNVI1xPgIys6/AQ\nHGVV610oIushuAKYNjF+wurbkC80ojDUcRncOSBKqwrhcp+03BRYbuj8//Hr\nh1LFUZDPCtqGlKeFAX+sksQorxKhPlYR5dqGRwSDFg4JVUI/G3Ar9cdM5gl7\nB8PFt8UJaOP84NDXriyAZGnRNFMr7o/6oJv90Ae3dlRM8ybgyy6ykKsZgwYJ\nXMD1\r\n=nhO9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.1","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f17a854-1615752336676_1615752385795_0.28958481543021564","host":"s3://npm-registry-packages"}},"1.1.0-canary-f17a854-1615752335519":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f17a854-1615752335519","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f17a854-1615752335519","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"205a2b1f2d80c29fd6efbaa0c8c8da1bf301077e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f17a854-1615752335519.tgz","fileCount":7,"integrity":"sha512-l41YWdy9bp2VfKPrD8VNJxl0IknLUMYK+bB7g+nPhgrz4ty/VEOlOt7uTbU+IQrAuK9H1p7VujuEq0cTecn3fg==","signatures":[{"sig":"MEQCIH7gZoq/A9UfFIDxIhCN7XTkpZ4aHHErVq+5xCN6fm99AiAPAGZtHznszblzYMz238LIZAfFF+46z5cjQXCbkWvkXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTmzOCRA9TVsSAnZWagAAMHEP/AxvXXTW/PUtr8tPDgk5\nWnRFffkgXtuX8Mfu/s2n5GyueCojl8NWlN/Gg3QvMn1e6hihIkAKhvFUl7I6\nEcqI8wbq7IaLO7OGPPQ/Rb4YjxWqhhN6unvEeUMeRPHfOBlHijRtNI9TDjxM\nItX7QJGC97zKN5Jes67dmKSAbjwD4uL39F61D6WSUPoF7vOIvRUZ3cgPjZ/K\ng619jaXYo0SZddTQLvv4jmhD1/rXBHVV5yTcL/fuUYtVSLP9H6SSCXtqwpk9\nf0ErBHWvVzO3vMjG1Dr6IlSvhmBCHiCz2Qd8t9A5oIbtaT0U/9y+JyJ3IZv3\nlkHmcK0hfIEwR9CUtxKM1G2tb+La6xA8JCgcen2Gw91nM942EiiNeELVqh36\nI9S7zCfGost2G3eUl7TfgnCwakmYcesHSamDkq3bbD2xexasWxiZ/9kSDh+J\nDhM6xUqrI8HM+lH8dz55DZ2h6/59Tn1WQ9Ai3AGa40bqPhcLWuBgha7PlXYL\nwESGjq7nVpvgvW6A/iWS5oXnUUEoeBbKq+3xY6LPTWaoBria+D+rs6U03R85\nbSIPeU6vOquClEXGFI94MVlbl5+mK1v4rHWk+jLTgYxF7E0Rj9PvO20Nx3ZR\naRCyMN8qm6ZRWV1xGhFCZVahiX6H54UUn5EmUBCuDgqT8BpgO8UfC1ByVVJh\ncdvN\r\n=ArJ8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.1","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f17a854-1615752335519_1615752398240_0.22405445717498762","host":"s3://npm-registry-packages"}},"1.1.0-canary-3c7141d-1615798716909":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3c7141d-1615798716909","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3c7141d-1615798716909","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"525ad89cbd00727c31680377d2e89301213ac223","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3c7141d-1615798716909.tgz","fileCount":7,"integrity":"sha512-zRHO9AC9Lw3z+937IVl2gDiuQmRSDdDdSmtYklXyl4AbwrOZrBvpuBr0BQ2uvwz6D01ec/5Zs5JoDOL+DLIbOw==","signatures":[{"sig":"MEQCIAm/MkKdOf3or7BClfvnZQPG6eNHo+8xCydJQ7ii+3wHAiBQHF4YjrIp0ApyZvqJ25J7szpI0VRl13rOJcWh5N1wug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTyIGCRA9TVsSAnZWagAAzQcP/jsTx1LuKD5F7yReDmUE\n0fg6DDF6JFs4/nBIcaIthkXJj19MbZboJKizTnZtPkuDb/V+1vJq/ps32Pvv\nCqToi2QMBsYFTr3w0NyxYvxF6sX1Ns3Si0MFwKTuqpMvLZh6yqIJDIn0zJvN\nkbnGlALv+40N/FLxl1antZGRBHGYX7ja1ps/53guE4Js97Zn1HPKzBVfnXN1\nz+Ax7TWiA1Jz+0NYOuEVHncjT3eIPyz+DhOJCmHqcROksGNRyZSdtmI26hQQ\nEiOEHhzz6MayaMYsNj6KehFlcf3NHijPpXMQ6Pib96c5gPGfEovbIDoJEksY\nlAw0LDrnf+a11ypmw7CLCGQQm0cbbP/okXQP3PFvxK3yZV7nFvuXJoLChdxs\na4eojfb04kQ4NMbfHYBwkr2uuzp+ooRUAkR5iYJLR77lwF1sDlIeoag6LmPT\npYn/+wBRaE4YKDFH5ENWLu2QxmGaxHMwRWiU+sUoYkrsAatd/XyN6Y4Zx2ER\ndx/fofnnNwOTG5R9CfI2AOcImj/5CMjyYtMNVGgcwp+gFBCEx0ubc9Vlr/j9\nU4ZCAlTybLglRLZbAEieJqusux0ry7srordhlwsdR1BYbD5RXc4js5Av1GzI\nHq81B2ZfoaIoibO4RimnAk0xXb7bE5JWb/RS2PfoHjPfKave64sdL1kYlU+P\nOhgD\r\n=1YXs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.1","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3c7141d-1615798716909_1615798789796_0.6939894193435248","host":"s3://npm-registry-packages"}},"1.1.0-canary-25a3713-1615798861773":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-25a3713-1615798861773","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-25a3713-1615798861773","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6b45408a23d124a3db3bacfc0768c027cc935320","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-25a3713-1615798861773.tgz","fileCount":7,"integrity":"sha512-YCO1MS/9yzYFQcf13M895q4vBXUJiwqtOpXaJ1fxpovufOzhx8+iuDVdKVhnmbcTwPnIEom3krDdNWTd9sfWPQ==","signatures":[{"sig":"MEUCIDeQqJvm+Vc199eu0RKwzM1IIVsqMePqQ9dk6QWDzF25AiEA0vlW0POSHItKFglWO67UccnqnyipLwGpRp9P8ZLHO08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTyKPCRA9TVsSAnZWagAAi8gP/17wd54cYW3vDHEPEF+H\npItun5JPVCaYkuNo8b71gtFE4dKzMt3osQpmyeP1BdELH6ukcfzwypuC9i+g\n4eUwEc24F2jg4domTH6FAOY5sNZs92K+buYh5Rmfbz8w25HQEt3acQBwLqQA\nott2GjxFLBzFmkp+5uCObED6I/gWBWIcrTsLtrSlw/BDoCacvcLbB9YyFO/9\nMbCjDc8q+mM7cgf7THe1+TAv7Anva+lPmcJ8GeD4/vkPCl1FYiHL+JSGW/JE\nDBff2jTXOouhddkKTp0yh8tYN3sw4oP8r7OEq5+tGTu+hOEH17mfw56D8EAJ\nbjTX+w9BNpK5Q8hWGxKeJhV5b7foFPDPMDP1yqpmM4wWPjWex365z+RTpWon\nK1aVnC7VxLr7WZDmHZAYftF7Ybd5XURJuUJ78v4XiGh3jbW0HlbEg71Y0CMC\niG/k0liDvNc8CJrb9telZNIRY2O4WB9F9vgL1K2FuKvpYr992EecW+seD5KC\nAYn5BJOROUmoYrN89uhMdtDXIjIY7x2fV2IWY7TAtmAWb5TxnYkaJKcHorbI\n40f85YJvrLph/5VSSDFIv4cFQeTWHZbbqj3/kUAo6FdoPI4WmKu7NF5sY+fj\nqQBfTbd9xWe+VU5MQoU0uScSJz1G5Ke2vrSuYqQU5WKYL+TyCEOpc5+yiqcz\nVCi2\r\n=PREz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.21.0","rollup":"^2.41.2","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-25a3713-1615798861773_1615798927111_0.4297873751694212","host":"s3://npm-registry-packages"}},"1.1.0-canary-6d8c760-1615799406776":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6d8c760-1615799406776","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6d8c760-1615799406776","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"192c0633e973c017cb1efce756da2d7f72cc7ce2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6d8c760-1615799406776.tgz","fileCount":7,"integrity":"sha512-ChGC5fbcMec1YVV0d4px8I+RRTkziMXUGlnfE12UOtjydo1Q5BMX7LzkaKX3Osx+ZIFspc7X6VoZ+s3xTLf/Sw==","signatures":[{"sig":"MEUCIQCHrF1IJReCjqvbHybDFCO7qE66UUv+qJ/hOS/rcMmJVQIgHZQYnWhf2scVvfvagoSYP6tsB7TAAM14dvxfR9iQ6Mw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTySsCRA9TVsSAnZWagAAgFkP/RWvo/vfdtlf2445NVwJ\nGBZ+r/f2B5Rqs5cUY9LI7+oYff0PQSifv0ppUevqcXrAXCSfOAGA9tcqqbew\nhAU0/LWN8Eri+QYxcGrbtixKhlC2qDyYN1/ecn5HGrdM0ot79mXRW+drCaMb\nX2ucLTxk53WvCwgB600GqEX2hoEosvJkPquafQL5YdgSY/B8oyXExYo/t6PX\ntZIHX1kWQ/lVMpiGMLet8k8svqlFJs7wjeQbrynX43cuBBf5iZWqPJbiaZm7\n5uSxqP9BCl0ArFdzcT7lA25FUIMzYPlsSdtgpaKFdCmxrFgYXk/z1+Sgm05y\n9lQmHKPGWzYknIPfyV+mZ5AWb0MnaUczakHN6BfWNS8/jAUFSbel2vRkEu8q\nzfBPSvJ3qTiEp2gA1wwRACyoecmDGILdmZCwc18h9RzKFBm3WejXMWz76mWh\nBD7WX5hZ7amX/AoI70IDcYX3GhIU1bqhNikfkUyeapKUpVFGogcYoKEQ6Kr5\n3O7kxUaKspvC7qX7tkuMrdhAIpLu9UQLih2XFU3gVKYwdwcOAJVMZCNnsfMK\nUxkZbSUkW2u4ycRIDaeclF5XnVCjGSvqlN93/F5AdMV20XespH+FFjzRIQm6\nvpMovEHwvD6Z8I8rgeu2isFasOs2oDKXP0c16hihMm91dcmXmqpz4aWPXfmD\np5AE\r\n=ObY0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.2","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6d8c760-1615799406776_1615799468065_0.9182460653140863","host":"s3://npm-registry-packages"}},"1.1.0-canary-e031434-1615883675717":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-e031434-1615883675717","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-e031434-1615883675717","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"924f7f0f952fc5a381a736e8ced001cbbc40fd29","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-e031434-1615883675717.tgz","fileCount":7,"integrity":"sha512-Hkl8YwQJVJdhxMFAt+iLGRZqPwtdfP8eE1WeT89kxqXkSfaD81u0rpwdYeg03azaOj7nkeMwmrd8RdYPMmyfEQ==","signatures":[{"sig":"MEUCICx82BKti7KCM47oPoY2FFPRNlzJOYT9TkehRofMFwufAiEA+KPdeLdOJnmU/tL8kGTtC5GIxHxnbkXZI5vTl3fJGT0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUG3MCRA9TVsSAnZWagAASSgP/19DOb4arb//XqtUXgFV\nGbUO1XmvZYmJ4aXUXchTQF40bctcZBZocnOePeDM8k/65GvFEm2xwcDAuBZ1\nx+KW77NNxzOoeq+HlLb4oP4vFWHrvsCiA159UFHImMlsPi7eBwzLXv7Qw9c2\nhYqkr9P7OPNUYX8RKfYsQ8+Rx6XIUZzjMzo/kDnWJ3I15hsa9lv09uNX+tGp\na94sa53lpyb7+wehglwzYzvTywbJvWoSjtW0lJpUKaOxj3tfQricY4WK2ZiF\nziu7/bLx6FBbcIoCj3qxmuYU3t1ZppoRbvZ1Ktzcts5Gp4cRyQm8Za6Mp1nq\n2PCDAZe3F3Kyt8CLiSum/meVzi7DE+iQCva/yGuT9vUMh5j6JtimreC3O+IW\nIAdEMtWzDxpYtBp6khktgG09V5zev33bUyotkuZ20jZ7S6C5yYT/dJ3SGDgY\nXsdN1iRnguhntvHzxHi66gXtXrLnlCePrgq9eDm6okMW8O925ovGMBs8FFyA\n7ZUFhG2yukp3MXTEVzEAO8Wdr8tTRkk6EM24o76VOwyq1aveklKe4zTpmCfl\nAOROj4JUH/As9BS0vZZi8LEgv4l3FqVyuekLmHucKGc2QKiZ91gxAR868oNs\nqIjnM9Eaw0OpCOtSwGagYO+f2jR6sKIe8oEhPDcXLvNB9ixhKqfU/oIgKqQF\nAFEE\r\n=E8Hz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.3","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-e031434-1615883675717_1615883723592_0.2873150003757756","host":"s3://npm-registry-packages"}},"1.1.0-canary-5dd6f72-1615887635370":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5dd6f72-1615887635370","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5dd6f72-1615887635370","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c0d71cccd67e383e6d76e6d5a0856217372f482c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5dd6f72-1615887635370.tgz","fileCount":7,"integrity":"sha512-YEnSOe8DYWD0BVqHFrEg4/l/YUOCXVImJ9BGcDNi9vxvpVWdTlfqkbjIMOUMRHXvpolf1cOeu4qRS337pHgfTw==","signatures":[{"sig":"MEQCIAxAo2pcRzg6gvr5Hc6cFHiCeOllhaPCVwCo09P35tc6AiBk2FtcafZSr40ZtuZCNXTqMkjTRz0fzI8Rvm6ZBiD/yA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUH1FCRA9TVsSAnZWagAA8cwP/jXq2MISVQAY5vzctfBG\nzhHxHFyczMup/ZaQo7F6i6lgygD48XQEHrW/838wTrCl9AS1qmNmzXzaFyEs\nPT+jBTGgLTUkASqnTMHpk9ZaOcZk/yaEXA204gMYbQCyqHnEwC1XYGSGtCGx\nulwMVTLo4xq2SCw1GR2y84mLoJ69qmpr4qoIDg/QWUA3Rf27HSaNR3PeD/nh\nof13lvT/LTrpcxTN92Q0mGRMmPzQcGQcDDLRPy5zL2fZ2m5cvtmIXDupuxVx\nT9wp9uXnxfkCsQ459zgI/al1iFQWmaOR02IQIVu678KyaexgSYF5LLrK9oPm\nVKxuBWzK4XLQyR1bMKK9Io5u9aREeU6xX8wuY0HH/0cXFD53aGNIY6garu6Q\nHmkhlDT9VNTJlNsJsp57lq+QpUr9GBbnziUg/mxlUzl9loF5iGf1Q4tfvaEc\nf8J7wGMKBZ8cq8VBvLY+eZwJUDqj0oXHtVg63dEc2jiCfIeDKmjWZfNYGizx\n6YGfiCQ54xJsh563ZGU/Cu2WvwFBzvCNUxWqwgoDD5JiAytLS9StB6Ev1c0Q\ntR37NgeqZolkDtB6oN50OMT4GMTy8nlERlu576m3ux6HpUQ+JRiVqlLHpuST\n/U3nv1eznVVZA0omsIFmPMsoZ05ZfW38CX/HaXVSwUJ/hDgYvdEwbctBOpnI\nmwJm\r\n=Ez6i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.3","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5dd6f72-1615887635370_1615887684832_0.34538871712301633","host":"s3://npm-registry-packages"}},"1.1.0-canary-da200de-1615905113712":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-da200de-1615905113712","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-da200de-1615905113712","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fc575a1c0b0f7f507e959f4651b2d6ac2de44adc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-da200de-1615905113712.tgz","fileCount":7,"integrity":"sha512-Myu8sy/6Huu7ATgpRnsNSoXa6271WOk2mkJb8OpGfHVc2fOex/aEtt0OBcmXmlA3sQ1DektoVeKKB13UOKKUxw==","signatures":[{"sig":"MEUCIQCSdFRekvov0AwZCrgfkarq5MDif9cZtc1JuHS+bvhGIgIgNvlRl92ALLe5gDPPbpYCXC2CqLERCwYXYIilA8wkcbQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUMGbCRA9TVsSAnZWagAARAAP/RHn2GmDIRFOuMNojUtC\nX3j2oIqJkgSmlsWKpYRokihQtIP5jyM8mp9b2lU1ycIhPRCprY91j74nlvQb\nRf6h6p8I1Rlg5MMsTpWqD7G5luv9uzLVWuo+OLeqSwMTDHY/e7jgL5Q6p+wB\nym1IeFNEzerT4Ph/5u659YMLNHSOqkPqWLncYYW83W5vo4JSw9gGNJ/YECWZ\nwsF8XHAXk2wnIgJ/Nxa5RGgMVz1RUITvCcSWuNQuUvvg3CWkue0hfTzAQdvK\nNb6xcc9CW/6WhTqapDuUNQao+g2hGyRFSbah1hzw3TOPAnxFruB8aA64f1Qx\nvrt0LwTEXbcvd5mTBbHby0rWS6TvlvNFScFo/Dr7g4gjAboi7b19OeGLXqoP\nhfMDdIh+vWpZ3k8v3j8McywhOEXc5fv82NwGhejYv4+0G8YJ5DDcH3FwFaQZ\nEJHkm5eOyl9y0KChG9/j1pagvGzJa9TIoVY80BOlT+Vb5SWBZyTCDX3vUqi2\n3ToMIHKJnHtdX7ntZB+wgzrPASZRnk6R/nXtOkOQujhg+GYVMZQiaZGj42Yr\nec/OzWb0Rqz5baPqz8RIBfLUowQzdUlWwePjq4Fzatqq3fcJTngLJj+yvAkB\ntKoWeDXr77409k5I8fEFqlOLAkmnLnXh9niSN47v0HqWX7qgfK78YIyBxPSc\nhQgK\r\n=DFGs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-da200de-1615905113712_1615905178554_0.7849815146921926","host":"s3://npm-registry-packages"}},"1.1.0-canary-5f7567e-1615907906665":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5f7567e-1615907906665","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5f7567e-1615907906665","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b62ab2f4aae6eded4070a0fa4a883f83ae11225a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5f7567e-1615907906665.tgz","fileCount":7,"integrity":"sha512-5/iVRUUOh7yCq+R4WTjOzdwuVb9vez6dZ0Vmss+RBc8GvGEBsDiU/K1d2Oi5UXmfhWNSorPI0/ITwroHj0U0gg==","signatures":[{"sig":"MEUCIQCqFZr8vHYzAtGe6Zznk/VCYc+2KJ7/n4BStzsYFQWvhgIgZ6gAZcXRaG5oBPGg8J6rLDiSYzUM4VKIiO8Zk/rFgTw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUMyICRA9TVsSAnZWagAAq0YP/0qhoeTYiSc0jkQZU+8G\nsDQcriE2HC+YwNvVvpzpAYgbJejBq+UiBL/+wSxAmstgMfdgowCOXKIbWO2e\nyEElA1mwcqg2Z57YuqNBP4SHzR/rsPTF6nXsB0ZJXv4t4EIPHez6UYiYCMhN\nlEeN1+NUUtF60yveeyotPFdUnAtqsJfZCSil5dUCmRH2zVS2lzMGE69vKmfQ\nlNWnnVsI7TNuN8p2+PfvuW28o+/gdcZryovLKHtezzvQ2BZELCVJyhbjKVqT\n5LvweKUzDyqTSZfYRDDDcYe2X2RAQBjOAGu/NtJuRQmdr2zbTiUs9zHJT6RZ\nM4Qo/az7bvlob6e3vtiLxGKYsjf8CJfRr6nn+4JZ/0xqzJqhkJcZ6wV6qR6U\nbnKGV4cVx/3U5NJ3NMjQslHW7m7wC5dZrZjRTXNlbXp9dyLmNwuuCvhZxIGG\ntAJ88mXy/MMdQ4ESlHi0uUR6W8jYSfokGzltU0DFKV/g0h3WTEacqEla7LgB\nNs5VYDS/CJF1NhBoQ9GL/ds3pa1L9AIFZmdTwMu4qnL3s08/bh8MEgkN72mH\ncz0q2v3tmWkrgQDIAqdV+Dnwz1mSUA7RjwPefsgyuYP+aNQ3gEiDWLz5DT8S\nqj5AqGBRTn8QhGs99QQvzRo7l+lDRtQ7HXnvnJF4JR9RAkbD43toCLatmh9f\n4nPx\r\n=G+UJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5f7567e-1615907906665_1615907975536_0.8178917052887476","host":"s3://npm-registry-packages"}},"1.1.0-canary-1839fd6-1615988003103":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1839fd6-1615988003103","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1839fd6-1615988003103","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8ca109e1f93b811cbfa55c9fda8b540285d0d53b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1839fd6-1615988003103.tgz","fileCount":7,"integrity":"sha512-1CDCkIG/BhRg8bOsgVNBZ3txm7A9+6bUR+PsiLfhAwkzokSF3oQHaNUdIFA1RDrb2Agh8nknwWPm8ITFgi8jEQ==","signatures":[{"sig":"MEUCICn5onej0N7/7AsAOMPvUdWfwuRVpDozTRf7dCtj/D0QAiEAv2gpq3FZJIn1VAvmyIDHoFz7XnE5WBO3Shx9QShxBQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUgVkCRA9TVsSAnZWagAAsA4P/jTE/L6g6i0PWmw3gWtp\nUwva02988XeLgkKetX57YdDPVHWeV/67mE0VeOMpqczdodluIyi6bo4U+Z5T\nzSU1bt0Y6H425vXCcpU+vGX9+D4vXs1PBexzo/6G2mAUV9Te+ABwrvhyB7MX\nqec4PhGPRfqc16FEhYFyYM5j/L/PcH7y6UqZnkqPTnbgTa3uMQFQLdLNzb1R\n+RI4ZluRYisxpGSrfk/TtlvX73WnMFWQ2JjbgBskl0E4hvuObX5GohmRUCEC\nYWMyTcu//Nqcd6aPMC75LLfdNMEtnn9nJMQpRrIMnsXAQFyfmXH4lpXAiByY\nMsO3aaBjrvDEyImtK2boF56rxj4W8qB6vpwwctA5JdbNg3iGtAXomz1LKas6\nfWYwSUYaZ/ttQddiQRADLTpij211EXqWQtYq8mTvRjq/wwUwViFAxVaiM7W/\nqXJjqLNqifICz9yDlohkFl0/jImBz5WfJeGcg2QOY49u3kzk/cY0Nn9GQTzL\nfJxF/Vy0oCk/ShY50zmg/qDlv/qjuhnjuYwQ2yhgfeDuVJ2NVtf5y4Q7ImBH\n9VTelRhQK3xibBz7Z+ifSonq26K6DBIvXbYceHotOBdULE8p7zjcHoWU0NFE\nXoOrEA8QkwEYY/ma8/2K9zMg7jxWbtamkOklhcHz0Bo2sxjsfdPYf36UaERH\nVBkF\r\n=AL7h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1839fd6-1615988003103_1615988068212_0.69459415312603","host":"s3://npm-registry-packages"}},"1.1.0-canary-9a3c7f1-1615996985811":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9a3c7f1-1615996985811","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9a3c7f1-1615996985811","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0ff4a0e7a1fe80a17c6643aa7166f84a6f527179","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9a3c7f1-1615996985811.tgz","fileCount":7,"integrity":"sha512-zJ0KWvv8rY5JHGcmqDdWOW3my1ZN0Cm7Uf66CGdPAejhhoiPTfCJ/evccjIpgMGR3z2iDyDKxcXRx+ku0NDJ5g==","signatures":[{"sig":"MEQCIAf5T/a+5daR5ueZpqQ81e1aSIzpeqgQWy7PUBknSg2FAiB6ptX2IwT5yr7E3fKajy3zWvEmNtEE2MbEqarqsNdQ7w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUihzCRA9TVsSAnZWagAAQvYP/24aeSk6OvvnLXHqvZxN\n9G6jegd3blZlV2WLuMaCS51nsp/+r/P3T++SSXYiCgDsGBn2Xb4w+3FTeD+B\n3pEKWHMFN2rd2C7LUnURlq/j6UpLiEc6r05/0HOlE1VknyAsF2i4nsCbq5jh\nh9MjNLOSul1ROyn4dydoAOHhzSa+7ogDdX1oaeIVBA1T0aCXlbPl6ZP0jH8e\nUX6xiOboS2zpuScfYlvTblcCPJCTaxibpwPAsK8NtFxl82y1MBZ1iLdFRTGP\nbSc4TqNRs1qSGB28nVnjbNYhhtvgSi5Hedy7TXw1uQgt+8Pun41vc+duZg5V\nPKvMePUH49ylh9LDprBWgjMjkOvwvid+4LjZpA6ipU4m9ebLHBkkuE7Vgy06\n3deDnkBupmLD5V1on22Z9sfNaq+9dZQ9WWcDGTCQwWE6lqXtpUTdhw91wJXa\nEbAVmXN3iCk7VY4y0L7WtIF4suAdu5/dkbc4qXfO4plaT7kugeM13si4CwFs\n2RW6BZ0l3CZbsoRg0enD94ZoP6+nx1AcrMxcFjYhwVQEmVASds7niwnUfbcQ\nqBFNg61Dem08boVO5PZZUUPvRNPeDih23zBw9lO7LPXn3H1gXvStPL2kS8Xk\nPwnUixu49n7EMUaMY7L0KLYExDuuFqTpNRuYC8+sr4RhffXKV3F2oSzqiP9L\nqsSR\r\n=4pNn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9a3c7f1-1615996985811_1615997042637_0.6235787367383483","host":"s3://npm-registry-packages"}},"1.1.0-canary-859549d-1616045401236":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-859549d-1616045401236","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-859549d-1616045401236","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b3055af6b8d91c178312693bc829bb949eb90ade","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-859549d-1616045401236.tgz","fileCount":7,"integrity":"sha512-+v2iuFfTmI5S+RQEAR0IQgZfuwsnc2+1VL3SWViP0S3La2UhN20W4c1yhI9Ml6JrqJYp62thOtYtiCsbOz61Yw==","signatures":[{"sig":"MEUCIQD7JVnbknBSuOJjGmO+z8w6gdchp9atVw9E0aWVSMz8lgIgZKiQJ/3NLpx0jzr8/E0Ip8mnx6/iRj40PbhZXhyKz2s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUuWNCRA9TVsSAnZWagAAUQ4P/3+cQHxL87UavS/o6yUp\nA0htqyzM0SWMQqCX0EryMxEZ4FXDHMFBbz3X1Q1YtJTMK3UJdRCs/X0dlXi3\nBVroF83F3G5mA/xZhk4yUrwHqa8JH0PkMTzMuxilwqH6Gsdo+vzT8hkDPtAF\nd1nYiHKuBL6Clir6s6SvLnVHX/ewQxf0FeTmHxVFbxT43ACSC5VmB037LPHq\n8ZFDx8qyCXrDzM1ltTvvg4FqGtrOdFfro4tSzTEV1RRsNFveXcBQZwv2nNug\nhH22wUWdj7j89QrR7DmiCqh0TDFyvMc+8g1hfetS5kStIyIW8h5210qYnVfY\nLriSm0kgAK+ev/+LBgcDNUFyvevLwHtPmGJJd8dy7+a+T99hFJAt/flVHZIb\nwoIkC4Hi94kXHaeudhaFTACR158jmNbZHiJXH7R8+h9GpFr+g7Eo705+DWvj\ndbcBiDqyQS9C2VVeBXXGT1ZRMaA3zMP7R6kNJbE7TXbyPT9SSd9Cu+sj1a92\nPm5Zwn41Yy9gYdmAbwNgvrVLnaH5DYwOe4YMOcog3Iq6rgr+vpMw7jbZ8kK7\nxETMRRuEc4IKo4vArH/AaaXYKYXTUto9GnXbFS0r8P9nwYlUzq7qp1jLQsv6\nfNbzK6Q4Bzx5A9orOExvkU5Ey+SmBYPwB3HHtvMoZrT/Iew/isYNq4He94Tl\nOUxL\r\n=oM9/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.5","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-859549d-1616045401236_1616045452879_0.2083501255579776","host":"s3://npm-registry-packages"}},"1.1.0-canary-859549d-1616045403325":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-859549d-1616045403325","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-859549d-1616045403325","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"67a316831e757e0a33c5890746365e71fe30bcbe","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-859549d-1616045403325.tgz","fileCount":7,"integrity":"sha512-IyFe8Aiuy2b9kLJZ/CdYvyjc4vqEr2ZzJkzKTxBiCRFNkeBBlWP/3qLqyIIKz1t/ZsEoedQVXZO4KGQcdnZgaA==","signatures":[{"sig":"MEUCIQCLqaqz08tFV0TC7511KTyAVfY/Gc7KXb1dSIhuOYRxIAIgBYOsXViFo6Y8jOCU2v4iZvtTIc+CBTcrLQ+R/lDMtYU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUuWZCRA9TVsSAnZWagAA1XEP/1Ngb8BLxynwEHd3BRmO\nlKrA9wjSrKnB2tk4b7E8a5RPMzPGoXjQGvMLgLspiPNy6p3Sow4Ul/kh3RFa\nPEZWHf+MmifKBmfbg5sNLPfYgB1HFb1a7Wxn5qJ/bnEjqMUuQo9vyXRnr2Yy\nFNy1oZKLZ6otl2kCPhgI1vIqce+yPc9Qg1C2s9GPxcQlBZaJngD1sRkHpYpv\nWE96uSBv4p5Cgc9Qlkg2oUQr5YxaXGtmGrT3WWGV5yM2hyswRMqwszwVuB5+\nVt+rJBi1FZK8GfyhlINGCad2+Nyeez5lZs8jfVgEEMks5BJl5TI2evS5iZdd\nIq3vmh0GmXa7lysOt2RH9Nq0/pPRBvWay1//FnH4NgsUJ06zXtinYj7RiqHj\nC/rqL482jl5yAT1Aq62RyexMmzav1kp0DLNnBhs2TCW8yINIRlvocfa6dFJQ\nh9rf2tlustT34VJM2Se5UxqjwMiEIZYKIbrEmcP4wN+9pHilg59wziEmM/z7\nHeFQE92zhWz05qttHfuhBRvHu4zjH8OknoETJdxpRdF72zapGVc5lxKBTvHT\nNkTkFGvB55B7+Og9PXY/yAeGQrHdv2mSy7r/oJPaWlUatHW79dCZctrGioro\nWJv3l4J2QADziem1NEsQSsYsWmCBtLocr2Y0Jpe7A3kIahQt2PeQuOZJtVqp\n6c0g\r\n=K/CJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.5","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-859549d-1616045403325_1616045464522_0.8848570497752597","host":"s3://npm-registry-packages"}},"1.1.0-canary-f75f883-1616057079475":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f75f883-1616057079475","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f75f883-1616057079475","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c2438224fb989bd84a65449b1afd0fa94c116e63","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f75f883-1616057079475.tgz","fileCount":7,"integrity":"sha512-nw0noxNmOi6T178MniqMQrOeLRMFmow+cleKX/ZzDWcpLwzwdXszI1zsT4S6WI52jaFzR3BRgty8K/why+BFUA==","signatures":[{"sig":"MEUCIAd8uJ/q/4wTNY0WSRulTnEOJs5dUuPqsVkerHOiIzpCAiEAjRTxaFKXE6k3gxnPTX8RW9eOaQG+cMjCx3g/8jmFrvc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUxMoCRA9TVsSAnZWagAAVYYQAJoxFB7ZvK7WVjDEg+80\nsVYxFWbsmWSnJJJaJb/vJHUz2i9PeFprK6SZBYw1bzPfFx5OiB/56dq1Ws93\nOyrX4VY9Y68U+yAU3J2J7m56RzlCPFQ5nStXCJRmwGlpPagi5n+7v/2CA9zV\n3lQ2r7wiW4HPT1bJ/z40eKPjxyDaCZiJ04wUWJtVfZp44hHzQcRnQToU5M7w\nmSX3xsw1WrrjMBcK1T2Mf9MUXF3YzthSgwy1jclCr0KxQ1Lii3Rsi6E3N40f\n4m9ZMCEDOF0a6vANi2SWvkl+9GVRt4SKjq/pDhjpifr/ZmqaxUM9h/zbhPgp\nT1e7WYSk6iFUImkR4Lkpm9qWMRJT6155vxygW2n8bLdG7lU8OEGub2vwAge4\nJjVtQA+hdR6sfyfIo7whqumc5rSEFDhbNJJ7r/k5wGglfgtvmA/tJ6KPe2n7\nJt+UhE4UOmJXFodHrjXle+wLYN/i6XQ5Npf9gGNxSNXlWJRWe9hd13mCfJyb\nldNPH7RBDUINNf80iQAbjIx04v56O8cNd6KjJtjZo3haghvgdM0IKVKEpLpT\n7hMfpbm95H3C7pZvxt46Ah0HwLXX7HXDhaSdaT+fmb+94C3ufCz1Pt0s02tY\nvEXeXpVFL3lE8i5MDMWY0oqn6s5WHXSx30lsvdwpvlsdKuQG1Az/CquPiteT\nyX1X\r\n=vkK4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.20","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f75f883-1616057079475_1616057127913_0.6162346243991694","host":"s3://npm-registry-packages"}},"1.1.0-canary-9ec51b0-1616057148996":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9ec51b0-1616057148996","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9ec51b0-1616057148996","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dfa85cfb273c1cb09b395228dd4d0c4ea471499c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9ec51b0-1616057148996.tgz","fileCount":7,"integrity":"sha512-TKTdYdKjLfABm7Vki+GHYvwP75ZdjbN8v1mZvPQiRSzDDam1JTYsHtASLRPpZPhztFTlJrr/rl/xumCjP+DT1g==","signatures":[{"sig":"MEUCIQCEOwQ6AQdPsC9PqqNjGC/6E5H1mcFBSPPfXE0JFL7ZngIgMWC19Lp2WdoHpZOTnaP2LHRowppPqnYy6RpAeA2/FM8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUxNyCRA9TVsSAnZWagAAjpYP/AmGauVu+UP3fx0nLsmm\n+PgACwQArUB2JTGD0MQUlYk+1xQp4qu1+FQQ4h4vL5KxjztLtc9w6cxhIJk2\nF9oMHKc0bge98KEVJrhHDYM7T9rK9uKjcN9QuP7PPLHCuGZWA/SEgi0Cw7dv\n3IlLPGITbgR65Lt5KHs4xDI8ALZXge4uzij5kkKYgoKo+E2TayMzZ+6eg9zr\nymHNE9akkevN5o1rYlVCklPpMx664lbL2CM1dv6Ul3UIPO3F2nDRgc/u0TSL\nxGNi66a+gkNFGXz504LeQkBhf1XIZsWmunx4AGNN5gPeMKcZszH0xRFjh5Iy\np/4xL/Wcr0TJhnyEJpYJCOLKBRwacfW0FjJ68p3Tk+AZwHCtKZhXFif4SQ7h\niusRkXRf4hA5XLyYWcGXuHL3dVxeOOkmss445yTDcE2jt0hOKObqYPHhN7x9\ni5m6s0h21qy5JVwMsRsK42JWFXo+H7RhAbTG3A4H8UwyhKrSc7g9/46OIhLK\nOnPwVC8069B50FZ9kXaj+6UIVOpRQA7Qln/e6GC+sbHDFIKtmcMiU/UFXJvz\nz1QC4ycQnERc4/XOVVZ0PfLMT92sYcXL2aTaEWV0lR7JgauQdgUsFaHzAEwK\n5BRerak6CcvRWs4aRGMp7fnwH96/JaK8Y8YGWRPIOQBwizUzmZOaxSR27SEd\nli7E\r\n=LJRU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9ec51b0-1616057148996_1616057201992_0.9945539931378271","host":"s3://npm-registry-packages"}},"1.1.0-canary-f772aa2-1616057265803":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f772aa2-1616057265803","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f772aa2-1616057265803","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f3cb461c382102fd5267106f7c109785b16de682","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f772aa2-1616057265803.tgz","fileCount":7,"integrity":"sha512-kjCEjDkQ/5OXxyRXRwRUPx/hix6vA3wPx8PRgCRF0NCJ6zyFyfC5hhALcFVN50+Y8bgWjuQSM06AOfl2iFkaiA==","signatures":[{"sig":"MEUCIQDSHaN0aXh0tpNx/9ib9R7AnY5v8Kc+IkPDHiRgg94S1QIgEeGKd1Q1980WJ7g5TEAn0xUsw48H7yKEVbQMM1kErjk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUxPqCRA9TVsSAnZWagAAwGoP/2i29F75VbXW8i9kh0lK\nwMAqXVgvFZ7TY5Dcb+Tzt4Ou6JKo5eOUx850/hHLvZ6J1hL6PL7Gm++mWtBe\nb7xZiJGJf59+nyCCaO8ba/BQw5tjtwdF64o9lQUBnRdivdnGbjeKP20sV9ON\n7eBtPPVi0T04EoHneqwdQ5rPqyCF9w1zX/d29QWHuu+rPEjEFo7BhprnXqdi\ny4FKOh+n7G6b0c0l0RhzvwNwTUHOJzY0Tbc4R1kZ6HXiLHxr0n3VpKiSg3k/\n/yjpKvb/x3S1SED2+Jq0E/ANHA1e6VhKQvUraZXQsnVARwcLeLzKOEuQTZGJ\nGnvwdBDo3Eg51+jN2sPOkI6FG1jF1Sg7X0J+yy8oX4eMUfxsjFMlE9trDu5/\np8s712pH4D2L3gD6sK0pgfGBjBdcmmrbrBfbs7KnMvbTBh9xGxbYpK3gbCdQ\nYMrpGcAers5Qk6cVxbo/rs6SrZ9M1sUZzVnBA1hvyWK30lRQXYh9t9Rbn4Rj\n1I5XlvCBHVwH1l+y3PHAeIwJzqrPuGQSKjPzLmwKlinFZxN5pzEuUELNQx8l\n9vv2fYG12gZujkQnOpiUPKUi4/2zL5/tvnPuOQG7+0q51qldYfFT+nzEyeQK\nGgat/+Jji+T6PwhYikj0YdPdbeQDin3TMFLTzWUhpULanDofTbM03CyWnIzn\nmlvK\r\n=sjBa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.3","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f772aa2-1616057265803_1616057322028_0.9010435634964822","host":"s3://npm-registry-packages"}},"1.1.0-canary-2cc937d-1616057331977":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-2cc937d-1616057331977","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-2cc937d-1616057331977","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ba086cc9e2e8aabd1c8da29ef0a256708eb787d4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-2cc937d-1616057331977.tgz","fileCount":7,"integrity":"sha512-zFoZF1VIfyeoNBlgWPExkUDyyjEsz/uQhdkIuojrqeE/PbOrBjcmbgE472l1gOscl9ue4hb00NLathW/MwtCTQ==","signatures":[{"sig":"MEQCIBCwhkfNLBltMbrAA11sHg2TaaJdiuLP/k3hELeCIfFnAiBF2Pb1hibi5g1Z/RClI9RSNw3CyzvP5naVH99Y92jghA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUxQpCRA9TVsSAnZWagAAlI8P/2yz+GZXNHajAXgVYJ6X\n02jNwfmA4n5mRL4DQCZ56QA9PT+le/iL+ShN/z+Tn0JGXrNFN7Pgp9jCm/0F\nhQcZJ76m8i+psGIkGu16bpo/0FXhgsDq/ut7D9vh1OZjnPIOCvQDGrsb13b/\nPUv76RvuuCNKDpcH9gt+GRP01+TP46FeOMe3Zuvfy10vQPDcz/LwNt3Xi/qH\nYyUotGWSZ3g/nNVpe6Wznu2bL7CXRIM/KHAvkuhK8A9kHhJVQqbjgPWoNWrE\nj5STYeMdohqajbNZMad8+BEXvrJUpeRhhgf6kfkBXcWKvhjbh4C6REn3vNEc\nN5jdtNItjp4tmSeqUcd6YCEauG82IBQld/q/AJ0zNEFh7Up222n0cvPL2f1B\nLC01HVaOaFb4rgI0sv9jZzWqngPxPbNo2sghsWWf6xJ9znkRkZBu7TY6uOix\n6Jy63F8o5Qnsq3QNJUaynLMdp9X2kUddPVKfssHSu9j2IZ5QViFm4ZuRy76u\nThE/3Djx8yVLwhMUGAvOvBFYRpvwzNvGxibhje6fZQ8fuDjAS0anXHskep+L\ngH2zhXNARl8t4JNB9Hypse5PtCnAk//CM3HbKoi5u+beSWLADETjNSlynnXh\nyDh2mNjGrr4AdZKKAIXa7ZpmYvxb5OljDFpN8NBDkmt5/d1E/Se2B+VRT9wy\nUwL3\r\n=KPS1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.4","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-2cc937d-1616057331977_1616057385308_0.26203229083879753","host":"s3://npm-registry-packages"}},"1.1.0-canary-f3f4e49-1616063690360":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f3f4e49-1616063690360","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f3f4e49-1616063690360","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9d9bdb5fc23848ed55e7dd66994305b3f8584f90","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f3f4e49-1616063690360.tgz","fileCount":7,"integrity":"sha512-925gTpUYI+RqnAfFeUmRJmV26LPDZ7/DjPWfcT3hw6+s5qrpkdld3xdTBnor77Inftx3G+PTbLDxQMsVysmyBA==","signatures":[{"sig":"MEQCIFAwknUfehDU+DPqyFWEnQ7HlbUh9OvE9h19+xIgKTepAiASHXVZrxJbLaxKJ8U4I8XBLLGGvMJkmo/b+KMdst+iLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUyz7CRA9TVsSAnZWagAA4RQP/RlBqRCsp68BbeVKtzLx\nlFAk6XtmNqeWkPZeG4XOkDWCvqqv1zIKy2VuUUmKTzxGekoy3fuwXkwXyL5N\njuD7/4Q0tINv0XQYcaplrca6MnXNZ1mqWLRW9ZgWvadsB7qiCmskElucahGO\nZ7QFAzPWtnPlvGSCWTrv46DBqLtzk0C6K+ubkT7UuqFt5BIA18XjuuSF4ese\njCRJ47xmq7siSPHYn+cP11JCwUdfERA+RIB+8UIPT0yy9/bJ4UWhbRVl5nlf\n2047IPTzBGUVWg7rF3qWE4Ta5/SW2Fq5H+9OYfAmHq1He0C0EzB84UtSeTxX\nndwqCVTqX+w16wfg7PKXUQQsw1UrxcbUnbfp8wIgTgYLIb8Dl37lNLdMR/u2\nXPELhxlzKvEurNJCtPxZmkJ8M/MrcUvXhGjY4/vZktxRC9rbNJOWwfCkS+0q\nTPmFzY0xnJ9vw58Ri8iYF8AYGNqq5NFG1PUA+kv4Ctngy3DRF38kRtz5DPVa\nS9V5WGHkgExCgcA5OeFu+1w4eWbWXh2Eu9940gL5cSqh5EASc9WUmZsLTwV2\nLdM9Y7sATXAdp2Gj7rTDpcIfneeSfSoc+nQrtI/Tz5bwvqSzPFn16m532xJ4\nQqR0m6D1m4RHS85wk7wN04T/mgPZQqhnAZvDKNVMFjGurcQ1/LtO/wQpMq7p\n0UVk\r\n=MKI4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.5","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f3f4e49-1616063690360_1616063738954_0.81488956736709","host":"s3://npm-registry-packages"}},"1.1.0-canary-4529301-1616109363464":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4529301-1616109363464","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4529301-1616109363464","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"718da748784dbe510e309cea1444c6490fc43ffd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4529301-1616109363464.tgz","fileCount":7,"integrity":"sha512-wZ8joxR/V+Ng6eOTMR/+qMYL4fLLxErnIiSNfJ3dL7zvLqSSgPHxXlXq4WhIBtmc49lYf+Qju/Ubfx8nZxTYKg==","signatures":[{"sig":"MEYCIQDHmbMF9npfzay/9765nmKYtJ9JGN0QMs5WN8cH/LM/XwIhANSUbC0ratMjrn9Q+fcbUJhVFRKNOKwF9Eh2HGsH8Tky","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU99qCRA9TVsSAnZWagAAY/EP/2Z+lpBGSJ3S+tU0zGra\n3R9JWaRXZg8BzwLQ28Qaxc9sKoUjpqZ3z7meG6s7olh79fOSP8ylN9aGH3Ha\nwgSLuY/l9R2VaJn7bdRc21DtrHn4ReFUaWvoP7/XTkmTrykCeVcWONXQ+qku\n3Z77Kbpj8CYsI+mbrA3q7oiXd6OrZVK8z094Nxp1IFpQy6qNJlw6j0o0eDtR\nTWzwWkrw1XvgiJRkm2+Sf2OPrP3Ep8A1Bn58nfrZL6SrFkLAvFj3VwpC5WaB\n21+XOMvEga3b6GGsCvKJxuThRwICjSlTuBCM+zzW+27iUeQmIfWm0OPTVHrM\nt0KoKsoOQcdnnfTzE9eBzHeSAviO251kz2priJ6H240eMaj4kj1ulZpfVKbO\nBL71WfjdtHmhLYI/u74CVc//CBNw0OHrBewki9AXZHpBIXjdQUAjUVPNipYA\nr1PADUZrVEoRdWmXzmwb0cLATyWQ0cm/nB7BmfR0fFXzGIWBKjvZrsuqlag7\nOAfJdpsNEhxRDCkm0hCf738DQPVU4M19JgyMImNvAP80TOHNoYuGiOzSB8Ee\nba2/zSEptUiOyzy0Onr2/SwBiJJUuAZkVlh2DkuYFGN8qvxnAFXNjV4L0ZzV\nRSfrNLkqz7n2Sdt01lttNTnaSd93+NmQubxqtp+uxToIVuqbKiB7NaPreuc7\npfXW\r\n=yaHL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.41.5","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4529301-1616109363464_1616109417566_0.8725706565260856","host":"s3://npm-registry-packages"}},"1.1.0-canary-c374704-1616142305436":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c374704-1616142305436","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c374704-1616142305436","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"02a181976d33410334e097055ca5c5c130f7d485","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c374704-1616142305436.tgz","fileCount":7,"integrity":"sha512-i8dbysQjwWcWAMppEITtBlBkS0b8EjCFxuPt5BwC7JhTYeCb0+Ba8Q1SViclqd9vbhElpTTO9aFrSait7OiOww==","signatures":[{"sig":"MEUCIQC6EDt06NRh3v3sVDvsvMPOFmBDnV5fZLQ8OzqdgIOXxwIgOF+KvkKmTxUwI5fSa0H/nY6uXCUyPJr3R2cSvDslBjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVGATCRA9TVsSAnZWagAAj4gQAKSzdTWv1nPiPFMeBoOl\nbNrljRTq0pR0pDjASGRh6RC5rFddPwdQirNEmJuUfaxSJUu1i1O4Wes/MJhq\njLpr6G8VQC2qVXrf0vdOOShMZVrahdoJifMJrAGseNoYpUut6yxv9avf+wGv\nn5V+f74TZiy/+MgLILUCtxtKSAjzZIyg4xqT5cvMieHmdi9hDC2mO7x2CDv3\nF/ebfHo3mYOEwQdw8fcUY4afK8/YAQWjFlnYKhduZihbTSAak2ksGocVcP39\n6RqbusC3yMk3TBzYePdJbv4NGqIlPIZQnSUjZpid3TbeOCWLmnuO5TMODeU9\n5mXERkm57EWwfKCANvV8jrwNeNvhXouVCJTTiCqAHuymBlD4TAC9GM+gM29b\n9fintc8cI/LBwUpoHG55nsy4s9MHslQZjYB2YzWH/wzwc3m1hUyQH5m97zO2\ni7T9xvJYFIlYTb5Kljf/LigBD6hwqiUE8395vMR+2aHNzij4Li9L2X2ODNfh\nKkoGeTcu06Q90V+3irUfONXA41+yAN/HVuot6J9LL8HUbVSptL4ZB5rCM5kL\nA5+K1ikpRCZAgs3l+R8I7oXnxU805Htt9AAG65fFSfMWs/sQY/8F43edpvyT\n5B2fq3GIFvTEopCpwlPfFhTtceBVInoDgXl9P6vwRU/2/9nYpw3aL0L7ZeAq\nfYs2\r\n=CG6N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.0","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c374704-1616142305436_1616142355065_0.8392526067481585","host":"s3://npm-registry-packages"}},"1.1.0-canary-34663c3-1616151437487":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-34663c3-1616151437487","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-34663c3-1616151437487","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"12bf0cbbbbce8d07671c0765726054d7f07464c7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-34663c3-1616151437487.tgz","fileCount":7,"integrity":"sha512-dEDDZPt/gLz9WN9QWqHweO7Zr1RnFe3Gp1FgVYz96n2UPTH+AauFJfNhp+pR1h9Op3903CmNDac0WIAVrAc36g==","signatures":[{"sig":"MEYCIQCuSWwTZ7PAhlDHYCos4A0U3cFdQ46pYdlbzb2VB8SU2wIhAPdjguj6uSi06eRbd20QLCRfKp3wjQ09WQpE2x/VetWr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVIPCCRA9TVsSAnZWagAAVPoP/0boTHwiseMii8poOlA1\nODmfaQ9uxzMT9o86T6CPaYyogF/Nv0E+p1SVcseCTQrnPAy1XNLi7gCUDoVA\nve1EQeA1qzi33a8m858paRYOJrFTOrQuZFRFI4fxQrmLn1dNxz/VyjwEnVC1\nJwAP6Ts7QWYTIhkF6yu3Ej8D5TC4KkoG1D6YP8DOkijO7DvgknTYxE8GmBbM\nSmTLsdNzLsE1LBckEBiITO+UKtffgMApysGOy1GZMk3J0SshaWs6Um2jQVM3\nj98OZUkvyrrObLCc8TI4v3rOwx765AghInv6GGiHT71acsuUPImgATkJkttS\nyXibEcbleFPy/f9NUD5izVsv1yCZGc2QtoZ1ZHOPD+TC4DQUEQ+pZvBsjL46\n9uwlQU2kPeUDQtGy66PNEPorAdyQp5z/XwgMFS2oS1EIoIswfJUE2anhSKm0\nbzQTVDiywKOe7tlaYPsL1WqmQh3ce4JoKWIQ71XZ0HuAUGlZq2WHDbU+PMqT\n19iwfo7Y8xUMHZMJko0bEdmPu3+bKER8Vph9zkL6RMygjMli/TELqDCHkX0x\nFB/l2mgNMYQ/3v4L791D90Mw0KdlcxU1QVeK8K+1oBvNcGwQDTcMxRtBCKwq\nruFDSqFAggNPiuBkg4YKzhC6s+U9ddL3L+4/5Hip/R7u5iBGTSSpnsGRoChl\njyfl\r\n=qOz7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.0","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-34663c3-1616151437487_1616151490279_0.8026307016407639","host":"s3://npm-registry-packages"}},"1.1.0-canary-5c59ff2-1616220421709":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5c59ff2-1616220421709","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5c59ff2-1616220421709","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6e8c6dd55d48298c3111ae6afb2e9e09bde66023","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5c59ff2-1616220421709.tgz","fileCount":7,"integrity":"sha512-fyZkdbQdrtOcs+Z56nIM+bApTxJWh5h/8yS7evwi1cbVkg0ylOR8h0LSMKQzrSvKj+gKRcKj79MnRpOGGxQGHg==","signatures":[{"sig":"MEYCIQDnx+PxOb4rqqE/xcRyKZvhwp4vLpUlGHGQKHAhsrvv/wIhAJNP0ye2FqcjxacOPL0r7dzwlp+W2zNznooIuZ4Lpd7Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVZFHCRA9TVsSAnZWagAAh9YP/0t0W4UQBBGltdNxhrh/\nczP1seUeg2Ajfx9/vxTyMl1W54nb2u7fxpNJCYUFVEOavGJKE2mB8RTPtruu\nmzbFIg3DlRUqww8iBRNwVGSce+dVANgxvuYe60rwfQkiI03xDgWqoSHB+PB7\nmjD0KXARuDExhYAUSI/vTVqf1PSMyxTRhaQPZSqDjDgqSo1AwF3S6khi3GtQ\neYJkPgYqCTEM4tSk3OBh/SfrGIHXGkLfqMRgJSBEe4SqBRLYa2Hd1ieLg2+N\n8a3lZv7odWkJpxDOt704qU7VFZ0z4IWbszIF0cWASbCssXfMOwjPoXzxEJpw\n1n6SxhD2Wm0GjqYcDCKY/n4v5T034VogIs3V8ItVBWQjOtrkCx4WmdA9HfDS\nZxC++9Qjjimo0o4r9m4CFwNJrqdsGPFvUAyhpMbbUxRTXIkbUgJg9a02CIFu\nRlOKbj16IbdWSxslppsD+1qdcnhwNKv034p3BnY6aOdb/DzgDfF3lW7MOtcS\n6rjIMMsS6h2SnDrQS7eI/zPrQ+pX7k/+g5Ic85A/xV/46Gn/pcKQtps+ZsuH\nBm96HGCRxnhp1Qd9+Lghr94SGKScb6ce4evHbCxTMVAcugsZWwW1r+1zNUVk\nsX/ybUCU/LGDm1cU5Silm8kmH47/yI+ACfnw9opeac6mQu1+OkRQMOOFjRkP\nhBBJ\r\n=9nbQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.1","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5c59ff2-1616220421709_1616220487448_0.6248628019815283","host":"s3://npm-registry-packages"}},"1.1.0-canary-5c59ff2-1616220423752":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5c59ff2-1616220423752","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5c59ff2-1616220423752","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0e7ed1457fa972c1b99d0de59a718dba7d0e3235","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5c59ff2-1616220423752.tgz","fileCount":7,"integrity":"sha512-78a165jQWHGHMhqEeSAzWqWcJ+q+IdOh2EdeYECcjLTnrj0VrsdOpfVmqkmuRUbE6mft/jymCydNXjTjW/eGuQ==","signatures":[{"sig":"MEQCICiQmKFtwJBdrQBNtYfvPm5NYifyvrQ6/h7ZqcMD42I+AiBNGkB4MB/xXQQ6RccDtRz5EZhL6AVCLvE3uYL4V0R4RA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVZGACRA9TVsSAnZWagAAuQwQAIcEV0KbXggfkhiaiGw0\nN9yRIA+UmkfdMG+/RZqrnFOjdawJ6mHLiOoO7pnI645ouro84DmbA5PTIXSC\nKIRjjuWOW7ARRrrNLoMjtgnY3GqGc1j7wRrGWglWInStTsw8jcqXWagIkMkX\nG5S/AmS/Kur0wc5t/+FyW0Kej8Bv+pg7OKqRzPTux+H8GdpUGCR/tSKLR5jp\n8+2ylSYNVnJXMaMZFF4aHf3yYsEnmzD8k5hf9zO4e2fv/PKrX4C5vwJTjT+t\n+I+aYdWSlAoa3eJtcQVogqiWH5ChzcMjob4Lgnv2dOVyj5+s6WVPdo1BagNM\naFaEBgch0qTebk1qq4ZxeU232OWgZEoCc+neducNpMHRyFHl6yPCQf2QJGfJ\nBx7OQWf1wbA48GOTRWjK6d+nmjEOX4SZcf5UqKqZBXoQenm8j/UR3b+THJZn\nmGJEnUBOg2nwFFPeHVOTkolCYbi7ZR39XTgCIxMyc6A7/UvdsdosURlswLky\n0TauvSYpgllGPyYEjm5KeaX9ZTl/RiBeXkbDgEHwVZdcJHCCldtqwuznG2j7\nXE37eXUnbhqGiB5nF/t9P2JIRJxM/vid3v7q5Tvh5y44wlrdvu9w4K1LCaFX\nU90XsYkr26NfWOeLRwNsE4k3JVBKJhMX9YZRg7uUv7lAf69aVav8KO5PQa31\n+XDp\r\n=MsR6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.1","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5c59ff2-1616220423752_1616220543478_0.10801018314261013","host":"s3://npm-registry-packages"}},"1.1.0-canary-c431d44-1616369058581":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c431d44-1616369058581","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c431d44-1616369058581","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"be56e85b66f7f12ef9b73107aa8c881ef71a3fc5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c431d44-1616369058581.tgz","fileCount":7,"integrity":"sha512-SL9+k2++NHLq7ZVOG7GdWWHds2cLljgIMSLUptxr50qubBybZyqebvZ3O7pE3dxa8LGS/qMF8F3s82mH4r+3+g==","signatures":[{"sig":"MEUCIBw2rzuY2DtwKh7D98Bs5OXQtCzFbjTzMwWzK+49vA3jAiEAp/7wNDTMyM9Cjb6Jng5G6io74h0bPuDOHrsDM4XOk/E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV9XVCRA9TVsSAnZWagAA7X0P/3fQpL/zAD6sodEUDnc7\neC6YdAvhf+vNOYImtfb8lPPdXzjlYcHi1q8UHYU9XUL/C5mUgCmiq8zHELzo\nd4bKgZ3dPJVyhbbI9MBLk9VDz7wzX8kcdbilddLp/WlzZyjgJoTm83R0MHL6\nReO9eFLbGW2lmS4VspW5mdF1sDb7ZJFnWwVoPXoWfQfH9XGvPKI/hc+iLhYQ\n0jdPP2g5CiiTdpDXdce7N4CcSnoQRUT+AylRrQOoBRAG1f7o1jB3Bs6Ou/+9\n01H3G/XPPJGrbq1iDNb9VEPQ+E0C/3I7CmMQphFBJWrOveCBR8MGUFUFIwvv\noJN4Gb8gkQ03oanSe7aieBSdSla89Vak8mqPAhprXrvaH50qG3Kjgl0xvI5y\nu4YCzON7AdJnKWGo5kUXM4GkjQbXwGCb2lwjHzjbECOie8QZngiOsuOKSTRF\ny3vvq62+KMNZ3qoYPhC8oGkZXvvRoYMTat0/EvdIss2TrFzEbq6oIS7E9+FT\nQQTSGkEnLJ/+XZ6D7KpHj3kKkyM0pENMVpjMzBC2Syg9FsvFbf3yVNOKu4Dy\n2UVuAdNwYWZl2V2MOwWe1l7DjJOjK1HSUFXkVOywV0XRDaAox0Tyf64s0nSV\nW3nydvvdmdLGjBQ4bM+a+EvQkTodlQomxFr0q+g0LeuTS/Zc1Z1Dt/M+ZL4r\n5HXi\r\n=+/CY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.1","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.1","ts-jest":"^26.5.4","typedoc":"^0.20.32","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.1","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c431d44-1616369058581_1616369109401_0.38369681336224626","host":"s3://npm-registry-packages"}},"1.1.0-canary-6e66927-1616376502420":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6e66927-1616376502420","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6e66927-1616376502420","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b31c9d2e2b3ba7411b0bf5d7a4676259a595489f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6e66927-1616376502420.tgz","fileCount":7,"integrity":"sha512-B4suMdUOOMzVonBYII20cp087wGhOLcHpWqPilafIibqw/HEgyLRVRdZIwyLZZWahaVGJn6vtaOewG92GCd0+w==","signatures":[{"sig":"MEUCIQD7rfD0uthieNXl328f4UCsBOAOmAZdF3A/99M7x6KEGAIgHUcoX6vxuz8wBIWeHWQ/Zc2Z9m4wXNtOyvH9kFuUnIM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV/LxCRA9TVsSAnZWagAAJwYP/3P6x6coyTTGyrqoTYiW\nUxKQp42+6VapjRp3hatl1Kyz3Uy9xihggb17hJQtVkj9AIA4Wk6ZsDMHtvKI\nEFq5adQ8YSEZaW4R85a59PAuivNYYrTuGVzOpRGlMWt/kYaRfhmPhqnPepXZ\nbGOKasPzFeMrzLcsSa2x4YE/j5fGYnSmdxlKK/ZMMAQik0R+oVjhBby3qt1l\nFjX/VlSvPbqY6JBd29ha0LXZwTw873pOCpOsZ6XnnOyvSio3TRTmFSG+Fpab\nME/4MRj5UD5FZCIfNPDdCxHkpWA3bhvaYTnSXMZdD+I23i8t8cfmuMH7vg9e\nIyCqv1ywjcHDE1IfhLKFQI6A/5waWIbQcBegoM5jYDqhfnArIfxtYu9GqHJA\nXlxSK0QkHuerldt8T0BdfFuRoXiyZ2OnfMdYycucM/w65yhB1hnx71/nmIYz\n3vgH2FW2T40rsiOTroggMHHu2kr/zSgdsn7zmqR2ez2trvwyRZCDgnQ82tjj\npcWB3AXedlWlo8Ly+gcvxMbQv5a7pLiwruVJxgE6KWoohl0yE0Dr74PRQkBW\ns7f7frbQW8/huvpIKTprHrgxrfoLKrSFtbof+/h/XMrfa9Fthrpq43PXA4v4\nAoJXr8XHIfv/qdDbhQVa2HGAA2aPPSkUPwAMXnmzO0lU91uHMt5H3/B0uvve\nktBP\r\n=bvnq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.1","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6e66927-1616376502420_1616376560672_0.06851584578762626","host":"s3://npm-registry-packages"}},"1.1.0-canary-6e66927-1616376505153":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6e66927-1616376505153","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6e66927-1616376505153","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"db0ef93d5291471df51512dd0e62f3be7c8df8cd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6e66927-1616376505153.tgz","fileCount":7,"integrity":"sha512-r+bQlpEEoGZlOZ2EYpk+Rw+HmodEpPtQ8JjzQNTwMiX26m8VLVwrf2iUh+TbJadkLJlCrrDxPSvSHTrgBqGZ9w==","signatures":[{"sig":"MEUCICSnqFbaMlZqa2uu0Iu07zmCHeLpT/BldCShvu7u4ER/AiEA7BM0tLDRzMD3d8nZGPkgmDbpnFeyD20upRLqgp1lbrI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV/L+CRA9TVsSAnZWagAAoW4P+gMMHvCuMqT7JGFjnQ5j\n4BAECYYvmpGiD4tI/3dFKMfq5kEQG9Wj+M4x7mT3aP0bvGn87s3hKNxplQvJ\n4sHN9uOSKJ/g0o+mHd4/TF8AOoTopGDq6XG+Q6HIW4CP+RK2wCVRDx6QV3+A\npNuVXH6/voSJeKY8z5Uq++ZWRDpCsZ0y6pWEUu7UEjOb6p68xv010Qj1jmzz\nDfXXkvdOOam3UVmk+bXS5/x59Li62g5AcI0nGEk7mGQ5QO2oIZ4YNAaWm3D1\nU3JSt0lVxIflIjy4DsCQQtu5nT8/k1Uba2mutfRIvPxbS/Mdj4rjuUprcpdy\nkimBmVaoMeLIpYSwwA0411vzQdqZgX//txCGGIF1yYXRvBGXyZ79lrXuVbw+\nYYuw+Bg03meC7dFi/5DfaDmQetoqLcYcH2BzKD9GDJlIgnN59HCh1bPS/T11\nzMBw1fe5flh0I/vxnzintK236BdoAUDUDl0qblGvVqFDDt2NFHwb5YiN7VFb\nhDbeG9hhEH4tYFa5DcaUukHuDcTPkG1RSTJ51FFBV0YhfBFDQAw4rqPSM8hZ\neW/7Cnhu0RGonz29GxGrHolAiqPuQmqbwcHZ9bQ4QLRQdUwtidw5OztHXjEi\n0TpeVh82Zbga14nN+kh6RtTm3JYWoqh2XcEYMmdu+KEbLwJ/x9TrcNtohleb\n/RPr\r\n=S/Lh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.1","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6e66927-1616376505153_1616376574042_0.8614350201641563","host":"s3://npm-registry-packages"}},"1.1.0-canary-2b0f548-1616393921516":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-2b0f548-1616393921516","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-2b0f548-1616393921516","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1faffc1aa5aa34a738577f84c9496f89c6f2e98b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-2b0f548-1616393921516.tgz","fileCount":7,"integrity":"sha512-j4TIwL1/2C4kRh45TGyF+Wvo3On8jjNZ+Ef+6znOGYY/W25A/4S9GQiHbGUoMeaVH55nEIyg99qAZZ+KyY6nTw==","signatures":[{"sig":"MEYCIQCW054FQwm5Fwur11M22RUcQvAbF9AOVyZCbPpgEBCCYAIhANlUGtE086DOtChXs5i2CeAv5J5Ur1vK6t76UFzOglhk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWDb0CRA9TVsSAnZWagAA8eUP/jMXYZSFKAROcQx5rDIm\nyF10LFUvNGPe/qoZxGdwbQJZTZohMJPUveYcNFL9pKTCdKoDLGq9EZSmEUeP\n0RE0AUoeOqUCOQgGfWI5GEOM58xoJeJUO8emLneSGb1vcHeMGQ845u13wopb\nfJvmA06l6M7xXMpVA3bly795Afq6qN7Pd1bT04qSZAm/v1X/kxs0go7qdGZv\nP8aIZt9DgoICRmELgdCPRwaga+5JCUkA0wQ2JsF8BRqLnxLPsa4f79xKd5ZI\nhobsvia0fHf+IyovGORkLn9Mejaah02W80xgUw/W1kGXTp9QRSGDOKz2Z2lz\nr3OakIm9djgol6pIdaqp6tVB7RF6aXSjdcauPiV8XEuWewhwDhOIWE1STRww\nzWYUrBzIyUONVJVCrKlfY0ohnCHN9v/3BcyGbX+0iwHuK/3ewwoMm/hiWR5i\nqGwLIQxM8u5WmWnUAMe9W76Qr+oblv2Cv4EQ6//S8BI3pSohdAjpThanMDCS\n9WFGRmB6fqqJNVeHX6Qku0XjpxmINP/356C88Hc0QYoquLZ7vE/gbJJMxWdX\ni6TUbRJZAzgU+TTMlwrQqePfQDWgnQLfqSA8anqmLvc+GqVGaaphghE/9GFH\ndxacILZHQew+mlg1NpVvRX7iHmWp0rpxZz6nmPpYrpbOBfWJ8babUo+j9aa9\nvD3E\r\n=KS2t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.2","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-2b0f548-1616393921516_1616393972074_0.4600316443558463","host":"s3://npm-registry-packages"}},"1.1.0-canary-aee7ee9-1616404804013":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-aee7ee9-1616404804013","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-aee7ee9-1616404804013","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"978bfbc8a9a919132f304b59fe976a5b35100c92","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-aee7ee9-1616404804013.tgz","fileCount":7,"integrity":"sha512-FDKaotReiQq/BhdPbI5l/RpROMjWL/oXUXnuh2kqgoULFXPfd5aaUkyGxFQJ9N4NbGovJ94xIjcWxBmXs7C4jA==","signatures":[{"sig":"MEYCIQDEhRsTjLkQkACWnvZyODeRLpXBY//3dfL/ESM9cj51xQIhAMOCm1LpXPd+7v0+p5G0QTQVX8LtdQpGcsnWGVYWgGWi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWGF4CRA9TVsSAnZWagAAZPoP/RGRAYqhnJ24QTLXeSo6\nf24hTdCFMh3HXeucjEYrAX5DATeFHX75xNkqCHKKhVp95n9hG88Xqo1HtV+2\nzKV3y+5swN5pC5YB0XxUBJ7L2nt88o/tWsFLGoN2000JvLxh97AH8wVlxmPE\n1s5XknPnSW7nRuhr5YrQ/ymTv5by9gerWrQpWTvqiQ/wxbI/I+UjWwop5d0t\nfCuD5MOB8r09/mQ1t530Pj6ZMrAxqyyrRijjWNreYTMlzJ1UMhV2QlSZ8guM\nvZjmHa4wj8/9RYiAlWu8qW3VONkJhokoAn8/FyS/guNtogxerPHkiWzxTlra\ntRBuTvfx8dsuuuIdxqJjD/85+OpZYaA389gr2ahW00mV+cGqlZeLdgjkWdXq\n8X/iZ+udakJlNA7uqQdIj+GhDssj3IHqn53OzVR+ROQhtDQCbZXGnwL/YulD\nsCukr5o9d7QIYrT0BZNlUV+QwqIKvme8RLOtn8N8VoxM8YJ9r/oCbQe9XVpG\nIS8HVdMvPysT8ac9sTwZV2KOhwBfej3fZ+DBDKJ8Tt0zJdFwsuAP3OUu/jiC\ni7XZecMiMTNt8dQUGwqvrrgneflTaMAjC3aYKD9YAPe0Yo/acLrYqhsqeTuP\nII6J/jTAL1nN+YcAqspzdPR+YYCA870tRaXowDW+DQOjrMiyLqIbD2pWvO7K\nEfXd\r\n=S4IE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.2","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-aee7ee9-1616404804013_1616404856178_0.8246064646953923","host":"s3://npm-registry-packages"}},"1.1.0-canary-9017604-1616424915014":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9017604-1616424915014","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9017604-1616424915014","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"914abb9f7ee4a65a7e90c932a6e34a200f9a107e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9017604-1616424915014.tgz","fileCount":7,"integrity":"sha512-8kPVwfE0yKpBfhEgLNGCQasUu1q/FA/6s+1RiPCZj75qLaJgpusIx1n7ZmhYpppZSvOXl+5eddYRzEVEwB5E+g==","signatures":[{"sig":"MEUCIEKRzel/cK68aJ9bskOKuqszTheNbZFKSx9XX5g+6f1+AiEAgC80cvqkeGuEk6bhK/X1NNwGiiq/XtqTKexgJ3N1UR4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWLALCRA9TVsSAnZWagAAyeYP/jHQQYf22dFkgVvJ8tuq\nkCFJYrhhgmN8orGCx5wgXA3q5xwp7F7jhNf8uzaUeXBgJeNgEja+Z2OENErG\nreN58g73oelqN8a6efVpbcItLF4/QVt9bdIcrEa1z/YzFWG5Vc2YxT6drBMf\nrRqdFaPcz8KaNFcG1tXJgpn/0YvrITEqIMRerK7y1iDLFHNrzSLL2ATyeeCi\ne/+DQgqb9kEQKRBteiTIk2EkGWIKTNLzKrk2p2TGTgJAnnFzIHGiAaHFTCiY\nybSDQXMve0mR3rh8JqTJxFshUobyPyX6Sa8G8+azuZMs+by31nZB6QUTWnuN\nV5Jh7NHVXgF/Wej98WpGixVABy50tWfsJ4g+1QFreODAqKi6G55ZEGvnJMYb\n0pljG2jaTcM/PMoOK2iIAXGxGVQgHpEbQGeDEBBm9UEk+18aAyZfMV9WSRqd\nIiIBGs0MHvjARXcmT3hUejtUWQ3gNa1JJyD5p8fZDQVuAHY1DtWiPkaBhLsr\nO02kPzWdEsZYv28AcxMFbzqakncnytr8sd7dyz1EDn20552THovDzHJ7ymWx\nkjckJbOY+tOOlqx0xfAc4IjzSRPCrAhhYEBLfC4UjZKXuCAniyPEn7YAlOt8\nLkn0LeuNcqwwvAniDfsUyIrVRnZqDG8wUOK6reCG52UGEokHQQwdUbWwN4Nx\nlIca\r\n=cID9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9017604-1616424915014_1616424970769_0.28827139369692256","host":"s3://npm-registry-packages"}},"1.1.0-canary-9017604-1616424917138":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9017604-1616424917138","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9017604-1616424917138","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"197a8d10249a1941aa6444f0a613d06ba735ef75","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9017604-1616424917138.tgz","fileCount":7,"integrity":"sha512-dtahI6YMJbVIG2vU4HTIuEt7+fraFX38XdpAoxSUxwMMxm0obyFxHIAOv1UEoGKrmtAUqh8qjJD/Kq/JqPNycA==","signatures":[{"sig":"MEUCIFOKLDLMKHihKqGpPqzgsIlT+YaCto1UOz1rytQ57FkSAiEAu6JUxy9ahMIkci+gkgmwl6+lVpNdOowLWquxnDL4/g4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWLAuCRA9TVsSAnZWagAAaIIP+wZT5G4jxnuFcl5ptT6G\nJxMUP6JUzJs8e/GFjCjX+8BzkXtWUrpP2YRChnjKYL/5BCWOhYS8ZojDmZcc\nqbp4LMOqvTcw4X5f3gHzm1arfWfUYxJ/sX+S9fLfoBGBOqoQuBifnmcNH7ge\nnIYUsE8Ucmc8hiZBzBPbUnQrTxsLnzx1WmQQNt74LEMVEcoZZli7LQJq3woG\np5FUD5SdpaNZkaYr8+hjez9KsEkKUKBSB0vbVyDWFg/w5gRHsvUAqpVMv8Dz\nTtKp44XIRlzwFHpHcPn5rGQALIsZcwqZ8x+l4jfitEH67RU6+abn8HtgESV9\nOZTF/qFTBhEHkC29ITip+QIf3yKdK7a5tHKnb4gpKk4OKFxNoQL0VWEwnjZ2\nZFkF/iYH3KMFvV+MmUQSpuBSsoh4+bDbgqKrvObYcj0rjEz4kcXdoGPOPPxN\nASlGALUVLlDi4emT7IIfS3aZ21VzgGN/Rg9NRbmwVFTDphWxJgWekALj5s7v\n0ZY8WmHV8pwVMz2qITwI/M8eR/Czg5CukbsW2Mwsanr5SNWtc+HSUK1IPCTF\niHevPU5vf4mMbUBoVPluhlIFFIbBMUhCaQQUo8RKHo/6owUmSLrIU8P2Ippu\nYMdgymOL7ty4Fp/fpFqI2TSeK9OcAh/OllOgN6VCs6D5lfeKGihuYpFBeeFv\n+G7x\r\n=LWay\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^16.14.0","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9017604-1616424917138_1616425006100_0.8300153772501553","host":"s3://npm-registry-packages"}},"1.1.0-canary-390d82c-1616451190163":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-390d82c-1616451190163","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-390d82c-1616451190163","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"375d2bc6ea51a07666540babb9946f94aa95fdc8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-390d82c-1616451190163.tgz","fileCount":7,"integrity":"sha512-M/ChOg5nBpZpqASLF8tpG+m6j06F+/VwH/H8sD9RDu/vMqIxgFxVToiA1qItsYzXMWXNuTne4B3O9q6147GDtg==","signatures":[{"sig":"MEUCIQDx/7+7vkXiK+UdZ/cm1fxkDf3tn+yMeuhKdwHXoCD8hwIgX6rdrgZVpHYAr/BTok6he2ScBGoaPcUVmXy4Xyh6pBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWRanCRA9TVsSAnZWagAAmDoP/0tITtn15A0sG4ZxcWjY\nJGWpGDQOeEWBako0WzBY/LTVthp4ehbULfgkzF2ZJXoz+so0fqATMLvp+w6/\nIpr56NIAIaQd9H0NhrzeTY9wiQXZHbQti/cVHA9XhOfIB9F6KOt9AS5giTL0\nRb2zqe4SGhWmEOkfxT1lGLfoO3osUt35inJs8sY1ifFH/giZ4qcBuBq7Go1Z\nibaekTlYX8M4ysspfQtFGSzwBzB5p67GQbn6vw7JQIR6Vd91uPkNGe7lJ2Uf\ngqcUcqlDnUboVVgvss4onFuQo7YPWIeCDpU01mKVC7wFBAYdfL4bcGjkl86L\ncjomd+V8WPufg6Z02jpRXYv5wLLsdlJ4hxp6dtTwFQgk+ZfVSb7e9yOZBi1O\nI3tOApfYNwX3rnlEk9KOc3sPRQQND1xe3/fpgsNsqz71qemPnZ6fzec+/ure\nIkynDEZPtHQ0XWFBVNNgCW8suCGP6DYOAyYsquzyu4JBUhtekIhR5z5KXOH7\nSOukcRKTzQ/j/wuyHDpkTw9VDl9b+NxWMi70dh7G/7w38UqZiy30lZYKXwGK\nlyHAzHY2noR1NKPbEuJEFrnF9+yDfq+PxDSzIeygpue1hcd8i4fF+N1Kjso4\nX0xA/sgVZUTKJPWK3Rkh0+0xfUfq9Ht0BRE8JalylYMVSTyY+DL81eOFJW1S\nNgh/\r\n=+rzQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^16.14.0","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-390d82c-1616451190163_1616451238740_0.17061740845986195","host":"s3://npm-registry-packages"}},"1.1.0-canary-f5364de-1616517308630":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f5364de-1616517308630","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f5364de-1616517308630","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"62d2dc92ccc19647e26646a93a27745d77788ded","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f5364de-1616517308630.tgz","fileCount":7,"integrity":"sha512-ipYqSi60QbRyI3jXQD5ckFU793aGoA/rSy7tJQZL8nXaHDByXEM8dxHNwWaXFMQVmb6Sd48U4N44dvDAJ9ujpg==","signatures":[{"sig":"MEUCIQDmkDawlFhf13l/BtpWVR7UOhhR4lU+UqcYlnvTiFVHDgIgf9Vf2rvrt90/Rew4Nsp5SXmVlm9MNSGkbVAeutxEd3M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWhjzCRA9TVsSAnZWagAAQpQP/1qmpkFXD7EBT/uTGV3G\nNImDh2ILHrWlyHVvADb3SxM9+5ECYS8vPXrd9JlM92czDcRPnm+frgSQ9gmV\nCagcB7JQz32VUl4lvh4N3sxUoZEpehvCAEmXzosWlHOaU78sGPlmY7lpSvgN\nREAwvYRCC8jeCb/dH68ERwCqEYtnBw4+QdhDkx3A+QYK2yGpO2Otbr8WzKs2\nHUHVHAxIFkkRy9UcfSh78C645AEUpS7CP1TwLUNa9Ggf9T2+QMrBgF/sSjsD\nK6J7DowME+3buqSAcoQ1jUpzdVOjfoB7W13KmEvyOMnG0xDE+xZO3fzPb7CW\nI+pKE74ifS0xld3rZp9mp6l2HDh0yMo3ArPlxGEffC0yTGeL7GrCZ8iedIz6\nTg18PLl5sAC25qQafFsrPjKR2GuWQm5QrsXRcaGmXf4m9/ZL+CXAfeBgwRKD\nQvhmhPuIDXh0BrKAcFZWiOKjFgpTJO0NQIXUwRNnIUMb+2yjfii69UDWcl+y\nmeLJAdNlHL62HPuf9ng43yq6rhmzm0I3foQqNtSDCDdECvj/Hzq0lrlF/4RZ\n5xkiHHB4vavh01ZUG5xvC6o+ZeOH3Vb/xaCbWrcbyzsZ/sTjq2S5a90CUg5i\nzp2jMB3DV60DXI6fVHDtCbmOn07yUnUT/Itw/CzmlsDRBt7CUuSU/s2VVy7X\nRhUH\r\n=fOea\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f5364de-1616517308630_1616517362509_0.7543168833629594","host":"s3://npm-registry-packages"}},"1.1.0-canary-0560fcc-1616596804815":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0560fcc-1616596804815","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0560fcc-1616596804815","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8726abef25100933ec32e53e86e370ab1eaa970e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0560fcc-1616596804815.tgz","fileCount":7,"integrity":"sha512-tx5xGrEIq8RvAKI3CyHnwsGiwRP0IaIQyqJxbddRrFXe2IzuGo2eH+UfcxxF9pTi/or5igUqj907auXcpjIPzg==","signatures":[{"sig":"MEQCIHYNMWs6cQH9BLml0WoEjBpPBBfQbDGgG38bXbHX0z1NAiBRb8x75S+A3kZdVyZjnR46DAwPAcGBUImq8ObH+LlW7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW0+FCRA9TVsSAnZWagAANg0QAIN1FoMEyEnKQB9aaeGJ\nV1qPMtTIM02ZAeh11c+T3pNYKJ4sEta5edov7CbMUo17ZTOk0HrJAIElvLUZ\nwkSzwD07TWBMP5AQ9/9H4QzRUnwuodrxXJ0QpCmY8rlbcr8MM6MFZuyatUno\nPZX8Pn4tFn0UVLu9dor2x/KggSfKVw2imkew+47unTb8t7sV/lGnqd3GWwDC\nXabpj0yUGHR4oGnrK5uJFDxhXofLaIfEoUuHqoXHvH81o2GIkeuVpLJc7YCQ\nElvOQbmgcdtYhkx0I4xdQhTSXhgITWFZCyx6XVdfVh+rUR8lIK7ZcK9wjC8v\n2X5HWBNWgLx3bvUkrbBudsE0QCVy1zeE9qmHZwL3o92q3wrLxjjjPhJC1fId\nNUTuBGiJ2TRbeLQktWgWk4NcnI08oZ/+rmdkDb2vsWzOoNfR9udKPtO3bGtB\ntemWeZBdRXA/j2MhPnL+ROFd5kcABgTBl1hyIzA4XOeWFf389rULD8MoOkvr\nvE5SWKoMHQi7GLqIvQMlamIzJRlXA0QO5Ms7Pk9TOhw6Shli9IUXSvjy/ql7\nEarHFL+ecz9Dom9kG0kWdSXTnAPpzkgpOHKqOLfy4Cl7bRZ3aVecjXX1qcfs\n+4iYlEAecPyWvg4TFL6hpO1S33EVBeTF61/KrP9iXVhLb8wc7pwiwRqAaHbn\n0xcU\r\n=i5xa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0560fcc-1616596804815_1616596868373_0.767327296902101","host":"s3://npm-registry-packages"}},"1.1.0-canary-0560fcc-1616596802445":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0560fcc-1616596802445","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0560fcc-1616596802445","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3d600e279b7996d216e777674d341da95529ef96","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0560fcc-1616596802445.tgz","fileCount":7,"integrity":"sha512-qSov3uN0H5hql4No9EjphRg/6nTqQBSWeDFYoTQdcZRXjNPOxP8p+VeEuLevzIDVXMarTB6/I9stGL+DEHO29Q==","signatures":[{"sig":"MEYCIQDhphvS0tVtOLnxFLeYylhvQGYwJHRQLCavTKGYnBxyEgIhAL8E3mhsitA60LfwMN84GCrF/049up2H3aZgcd6bxtI+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW0+iCRA9TVsSAnZWagAAIVYP+gJNXDp1FV7+e96zz1ou\nF7rta4jTSejb78CzrJmc7pwoc8pmvEJHodldrmty81yjw1yw8zBSfQYl7GMY\nxUW6yR2+dfvtzJJAZMIrOqFVeA+jDt9yVH3rb3kjzRhxhiziD4Gi9NMnCZrG\nQysdEm2QqxNEMXIyRsDQdVzbujLHAVndPva9mdZoFblZwtRgB1uESQiXYbKe\nqYI89EDNEZEgUSq2k0ntjDjgeM+edaAIQHAJ1buo5lXGTZ7jScJGV4MXt4qI\n5FW28mnoSyMhBSD9z/qQ3LULujeAF1N/7uLMKJNW2kpqP+rYrR5FaDfptGKY\nFeN8jBvm+TVpm86TZrTi88IYHSxvjcPLfkv+MA+tvVWOOh2uJRZfvETFGqoD\nWsyTQkWL1ZiZmDF6qWRL1XhH0xcJyGA/pliCeHYVB0GOQ6BmW3HKeeqOtKt1\nxLvJrwIaGvCckd3VZVTNPJ1g8GAIsyLFI2aFbMkcfGVW2gTJYgro1u1Gn4SF\ntcecFFFZnpAkghE/BE0GjAiuoLFD1sEmjqOtfyIVL/gMUmVEH8+uIWRNGE9z\nOGJNGgPorLLadN4wPbp9O2FSs6/GWtgDJ6hOcpLXbpw8+1kdcGx+hT7Nt1kC\nFumg1hGOp5G+9+cVOxRYxtY0voveNrgkW2fRxckPoZqMmMXJaUsT5k9/Yx6H\nbVAS\r\n=N1Y0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0560fcc-1616596802445_1616596897868_0.17178119417372906","host":"s3://npm-registry-packages"}},"1.1.0-canary-9be6221-1616627771881":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9be6221-1616627771881","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9be6221-1616627771881","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"159e99d553c2d413d00b94be287120698347848c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9be6221-1616627771881.tgz","fileCount":7,"integrity":"sha512-ol1+4Y5YAlcIcfZnOgExFBGKNxBe5Pv2iz9Q4uKlAoF/Op+L/aZ5obecEVP31OvC92Vh1lPkk+6YJLjvRwOU5Q==","signatures":[{"sig":"MEUCIEznK3newPGSnE5k/0xeKBQDFYSvun+GvD2dxqqZtkfqAiEAgpcc9vxM83+sN7avqy1iIiXrZajTfzZrykUM0T9meMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW8hwCRA9TVsSAnZWagAAagEP/1/Nf4g8NSexBqi3phx1\ns0FnCMOIN5vOB7ZN0RyV+x6sRRkVIjXnyJTZiOCGxsmMGVCcBiJS4OmAT0FM\nVfyD10e8e9AcoNDstq3f+srrN6dewpawqjXLskzuLLq9r/zXD6Mq4XFJySBU\nxbj/j8zwQ6LS2g4e5ab+FkEcn9lfRzTWxq+fGBHk0HEorf7nqXg59VCq0zbU\noQ+clLTvQMQ9WikBbHWLxkSE1GluDiXoOR23uXeOltLeqoUfEIHarRoU4snY\nC4t7iV1nPrquC4bX2CuNl0WbOAdY+Nyhh8UM3kQVQfhkjZElF3REtxEU9u6o\nK0xKpePjvb+PyWD2V/N8hqAhLnWZw07tQf7ePAvNlnMIy7G98ewz8t65H3Rf\ntriqKKfe2n/ocEjdzR4Jwmf9cRJIpcTDJO73rn/NF/kiVzIKkFqD554Uhp37\nWbY5o57iFldAaxBnpxMZKLD1d1xHn1Eiky1Bt8QwWt7hW1+s9lVdVx/10v9q\nuWuVBnkYJ3EaEhfH8ZG3SOZ2gyXI5wzg69AZKzqnB27JLXFwaHDENbMjh985\nxcBFDQ+UHEMdrRBKmmoIIrQXZbCmP7PsaGAClmKnKL7lqkGvSk2ObSJOgviZ\nb6hFqwqtokVpPYjFkLJ4ghCF5vGp9oPO+pFPkHkAihPlG5lQ+MkgueeXSC3p\nRL/u\r\n=vHqw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.33","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9be6221-1616627771881_1616627824196_0.8678493152974613","host":"s3://npm-registry-packages"}},"1.1.0-canary-d078dbe-1616643404419":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d078dbe-1616643404419","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d078dbe-1616643404419","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3a803a3dd648327db57abb39ecb8df8b8f5c3b10","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d078dbe-1616643404419.tgz","fileCount":7,"integrity":"sha512-DIsEFLrJdeRxlmAl3OUP+KOPPIP0qHba7irvkC8tIlacp5fPaYTJTg59+ldcoiv6L8PGAXb74DarChsxdxGdmA==","signatures":[{"sig":"MEUCIC9bGRXLKG9xy1CHrW00AnMuYnDWRRiKlSBk8Hhe+qPvAiEAv+EltJPGraEK1LJ2Tn6AGpwAzKB3Dhp02UG9xNaeAP0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXAWLCRA9TVsSAnZWagAAsOUP/ilIzNdLjRSYcR6/H8lL\n9RfPK5/pQH/fKdcSojv9njy/3J/Gfh2dsMkaoJn69jmEQsUX8PRmxkt8uuCq\navaj4YNSdRzPjXgmXAAZ4YGilQDG0O0qN2fEeLX2mU6vTDzpub3lfB6Wstcr\n8y0PWELB4n5oQFLuQSwDgzYzg+xUVQvdbSC5f0oyV/8GigaQqTvjsRy0xAJ0\nAHYuCiDPWMlzLmtR2yiUmmyDZjs903tttQ0Q1qp1pI1ih55Mab5jxd8b7FV9\nE5k3NNamaeLoDVmIiQymsVV32uGpBgrexRIaNJ/qk6+Mkxk9rN/ogC2hVNFj\nSnADqRjTlDW9cJNjdd3z3IkQyxx9mhueIAGEhi30elL+KivGr1mqIDpCTfDk\nvZDxKeHEwbxbRq2e3x6BML+YVVwpxvRL6GEd81V7HOWLWnws4v2qWXgucAe6\nyc53VItYmi6a8tGzRb9r9e9qCX+L8Ch18qOlNuIa3va2NlXf3gk2n5pjNBpB\nVC+a/wkYU0k82M5yn0o9lLvoer1FPe3RiYN2xc0kJAtJQ3ke3fat6CuUYV1z\nkluhILQwh51iuMpTFX+AU6YHCMFxxqjAVdKFdxj6JU6txHlXtsL21Hw5P5GF\njYGahV8yxRMbWiUf1RvXUGY6NGfAuUEi6oXAob4W7EfLUPtno3a7fIK6NoHV\nmNsw\r\n=sCLI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d078dbe-1616643404419_1616643467449_0.3391695299449795","host":"s3://npm-registry-packages"}},"1.1.0-canary-f9cbd8b-1616663743293":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f9cbd8b-1616663743293","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f9cbd8b-1616663743293","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9113a7bb27c8b9d81baab5557a9e9bb030a79fe6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f9cbd8b-1616663743293.tgz","fileCount":7,"integrity":"sha512-RvC/QuQH++2MwZDzvQl/4WM4jEos8+6pGW2o3LXDAkikijwjLc/XuBFH9ZN7/O8rv95WF0+5n0GMnUoyGgpB9A==","signatures":[{"sig":"MEQCIGTPomZsr844Vth/UMDsn9SkobdNqNzQp7Ei7M1pHONWAiAVuEDhijYc2I4yEe5M9X4gXeMiHAN/R73LkRmULsC/yQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXFTvCRA9TVsSAnZWagAA3l8QAJznq+kqEFfV3sjfo4Mh\nOLQQTtZ7sWOGGnUIIkhyroJNsU87/H2D2+oG5OF+EUuTSi4tXc+NROw+smun\nQYrZzWX+0zeFQL29Bd/jMOUXMTCoSm11ViUeT7W8KJdWxTqCEk3PcBpUj+b+\nq/S90h1K/6i4MScvK2GtNihtOCg0HsiYWVuospzknLNAU9qsh1Ne8+QkCgB5\nF8rgdlQeTygPsRXVdJqwjaunoPn/obKUHjqTYBguR5H+TExDZUsTBsNce5a4\nXEaLsTH5J/9JQLh4hk9lyh2LR1Zv+Jmz6yTt5ldOpdYfZDG9SK1j6JWxg7KI\nKCaC7Sn4VMZb/vyJyo42Zsd0YhnKDRd6VKiBthtLDZqTbf+KNx4tFXBTC++W\nmqFmVAXeWXB1xmj8cPJQEu4Z5gtVpEgas3eflSOBN4X6Br4/khMY2UVOfPUY\n0JR6rre7srJlNdTav+usT+Mill/9LJVzIEno59HZtiwW4cr8adWM7jUdMaDu\n5pWIZRlT60Kruoj8DYGse8n6yco/XuYH0ZFfj6wKFb3YV7RUqG9f/xMjxx3T\nPYrf7FyA3pjFh80gNRETFSJxUvlBY/I+OZNv7nUMkHcNN2ussFxyBdEIt4OO\nG06whvc/RfZ9KNX55EHevn04oshCigtqSx3MELr/XGHoSBuzWhQU4vaxVsfZ\nJ6WQ\r\n=Dtpd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.21","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f9cbd8b-1616663743293_1616663791291_0.7283132559307142","host":"s3://npm-registry-packages"}},"1.1.0-canary-219b058-1616695721684":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-219b058-1616695721684","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-219b058-1616695721684","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0a521271a75578fd862c6d00d6f7ea5f83faca9b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-219b058-1616695721684.tgz","fileCount":7,"integrity":"sha512-1flVugrcT1bOUVqM/+F2L+sJlQzw5wyY+o721WRFr9AVpNRmQqtqKYa8rXygezNfskokRXeI/iJSk7IpBpBjSw==","signatures":[{"sig":"MEUCID/0NjmuFcmtcv+PoMpaQW056zp5uKfEO29m95obk40aAiEApL1cl2FADf9uNljEU4YDm+xEzi18jSlD2Q7Va/Kta5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXNHiCRA9TVsSAnZWagAAskgQAIk3tf5+AQNxhLnI7XBP\nPK8We/2d9iY8MTH1ePNqWWF+XaHhdoZsOXVgeJttxC6OnjNXXlKOqMHKedaK\nMm9vQj6RqVkmVIMba0ljVPS/r7ScYWqHzj+HBiZQsQPYmHciKSXyqWgoPckt\nLrDB8ajiL948XbLIBgsQFPlonggMlfzUpmzmLSf8gseaO/AXZ/uLnu4g64zK\nCznQ4e0jDzwYLTnl8fGfAGqEj+26Mq1K3gv5GGNXZ8FMUwad5p/eK2iWGxIv\nqXwROU85+/gKKpz4Q0y/X63vyQ2EjLocpoF4gfXKpl85nbgG9d870W6BGgvf\n0fP3CJMCjiRLkMnx5hxPMe2gvjS5UZJOPu/pBkpWMGOcAgBdVX1dgIs5nD1o\nfB5dEIJTjzDpfYqdVkYFEYs0EMjzN0D8UUg7eoEN/xHAhE9OXTBX1AnYUNv/\nNNq9DEMx+xw5xQUvjtaavioQlD0843h+dDB2NaZM4JO3UdCG+fiOv/rohB7T\nmqvThCxtOPSfZB05D2yOA13ZA0Xktg1JwkLiL45ygNSx2iIqsScFJg7Q5+Hu\nR9Jh3Kg5JAw63b10NNA74UROo49sV/U1uBSL4E7rlDd5VrISeu0gUagjuJL2\ngt5rwarYi5OiOvDWErC83XAhBcD6ZIsVcTy6uS4cUzrmpNtIncPeUAPGOsX4\nJVHM\r\n=H7c3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-219b058-1616695721684_1616695778450_0.12046206917172086","host":"s3://npm-registry-packages"}},"1.1.0-canary-35d81f6-1616714116642":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-35d81f6-1616714116642","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-35d81f6-1616714116642","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"497bf10ebe340a3e6c610e0ebcbe450e664c933e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-35d81f6-1616714116642.tgz","fileCount":7,"integrity":"sha512-5IOUbQP+aS8jFBajuSWaze3HqMhkgYx3ieh34DASSsDeopCztYxV9mSpFntwzcUfyazt4n2Z0MYvmGHphZOvlw==","signatures":[{"sig":"MEUCIQDDlmliw0TkAjagooEoiXDhnCFqHrQgE6CucChEMSW5rwIgXwQXwLaShHCZu8b9EzT1U1QT7GOknQQqKx9Lkb+7eKA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXRm3CRA9TVsSAnZWagAAXjYP/33go20CbCvMDMfV8/CD\n+doNvml/VMNSovIAZshOHf12OX+ctEcHXnK00KwN37IlDSVvjzncfVXQ0hhQ\nVhadqtHXeeVv4Ox4pxpH5/VmVhQfVb4wvGQ3EepCMpn/jPVKwlo28kzvK4AP\nlXwpjG8ZAk6wFTDVg09jihmEoOkRPL1TcYhyUJCCaskPEftPXtUVQfezEQxX\nJsE6dQ9kF5iCEmjN+3Bvkp774quTQm0K8CLCPMAyYo5qy+cvRugDlFa2W9cW\n1gRYUypLTqDdF8d5rOp3BXJ9HK7ihLWieZOz9ANjs1mXVIOTS7bZ7ZLgIFjP\nFHO70KaNeXQTI6rSfS8+YYdmo1br8UauU4Fk+C4SyNnKSkXMLbpO3TlYS+Ds\nzb4XfxEV1xr9FiZIc0HjSrQaiCz7XcEw2PjW0D1WvUr5pD0RPwsyqyLAH/nJ\njWa+SvGt45DcgxfqN8UunctqSEnSS+mYoT98YE8c25nrQzRqCSXvlf1Ov1U0\nAteqH358fJvejMpGfAXea5eE7FSpCzxrdgMF/lLVC8bEXu9pok6L9M26T+v7\ns0g3QwziT1XvI8gwOxWLvzIDaUK/+3eF9RSvWZ4eogMvGidrta5fpE9pqCBp\n7Jf17Ki+//icvaoGJkqNipDVeDjE2v8JIuaCxl3yPfLygAQXFq19p3PBzu7B\n527q\r\n=5Xf8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-35d81f6-1616714116642_1616714167395_0.34851248205816265","host":"s3://npm-registry-packages"}},"1.1.0-canary-80cbd69-1616756205429":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-80cbd69-1616756205429","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-80cbd69-1616756205429","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bd797967390e0b7938fde6710c568503b4a24824","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-80cbd69-1616756205429.tgz","fileCount":7,"integrity":"sha512-ieV2sTjcPW26YWMGQ6GgpO2bMMVOVL2hBOhE0aXMvj5CV7z79L+P7sqBiZzLZWOTUHMKKmZ/zmG1zlNg4lgfjg==","signatures":[{"sig":"MEYCIQDXzSYD27jO252m60Y8Oli3/5jtqaMkxE8kq5reav1LgwIhAM1rQ1syJ+gk4idsKFOjY6GwsSTJPHTK6weOkfuVWQ/S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXb4fCRA9TVsSAnZWagAAP7sP/1Fb6dorn2A6hdbXuSzz\nGcI1B3WXvsA4pqm70IE7xMOJlxTApgqrD0Hh+DAxyCxrvfWObZKnowGLXQRr\n37gQ/2qEQ8YchdsyCEdYZ20olgEHyjtWDUzI6TOZs5kcl9bMMO/JTNnjXh7F\nJVvVv+DlpGSXfsFeVdhIM1iVG0xrA6HqWAk7L5FJJzmkV30NLpUVgOKSg14b\niDplmghtS/keYTlTH7DIh8xCSUvep/viR3I+W+V1iRns9Jr51PipyeFwgtsh\nHnyQsCpHkRhVeebu/4H/TUwka3+DexDoTRYnKJlx5tAwb403QnaveuJovOgn\nSzDPgpCAjvUr9RGC9ngx90EN5mJuqHdmnhjscfFKmPzhfWYQkdUKeNOXbT9L\n8s8Z+mI4ro1m70FZF5SXbN5oymbRBy0PjYAWHzo0MRmPyFIy4gOhkeevWOZv\nJv+UbM7WUisheK+JKHcs0Wj3GG8ztYLfgXxFxKn6dYNZHtvOeecfbOGY4pUf\n0O2Rn6wtHvery3mrvAJGMpKnmLz+LgiA8fTkgzhfd/tINgP+QIlEhu2BCgIe\nHxFn5HL/gqNB31kx+6FVcXmZMc+VOGUChtVJBvvk+Vf29ZK+NNaiU3wL4zV3\n8hnqc2Vj6nfGbYgDbXJ0BMkEZXr47czhHdPIYMeN+waLhxWGtW/6TGZXTWuY\nWhog\r\n=4dAs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-80cbd69-1616756205429_1616756254270_0.10836055719240312","host":"s3://npm-registry-packages"}},"1.1.0-canary-da9f811-1616784483112":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-da9f811-1616784483112","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-da9f811-1616784483112","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b869310d620a883076c7c0e58a968f19917e8080","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-da9f811-1616784483112.tgz","fileCount":7,"integrity":"sha512-JhU75Ege3YhluWU7SnFyrzcibyBUCBHQNOFO/Ma0fjPktnbcEGRPGPXDQB6UnoA29zccpZA8r3I9vOQauxEOnA==","signatures":[{"sig":"MEYCIQCgTlCJy2VL0i9h2iOttltsVYTirZHVIGsBnLGnYTDr5AIhAL1SxTW6gWerfK+4tx6ceIM3Jx7AW2U3QVzwGlImhgNT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXiyhCRA9TVsSAnZWagAApPMP/3hSxGQZnfq0Qs9hC0OW\np/fIe2bvvvjjdjGyb/BJ2EvCxRpOGO2WlKgGwhhzffVIoR/cu/El1Y/2afnT\n0oNBndHK2AuGOSBvfbFMkMEnXxCsxl10M+I/EM/gaLNNFtvZi/+3dvNu/JW1\nLh6v6IraU+GAsuAdJgh8lzqJ/oglinmGyd8Rbpdr9sTrtPb/1yq7Tww/KvFr\nDnDTmLjboFiYU2qoGyan4c7CY+Yd4Z+Djitmw0/pCy3YUp3bVd5K/H6bJ5XC\n7pg5kVScwEHzebL7P6qs2nsNmOgJDjdRwxcjPq7yUmkPXE4dsZutFdA9ELrG\nkozQUG+0Y4ZtRFgLaS/JC+RZi0r8q/qNnt2bl8EOsmjQyEFOLN5f3X6E/GyT\nQoot6R6axzrRH5LdVSm1wwH6RGBVDfQRpC9lboNWXqzJCbOqE6XAILC9WKgI\nuvynh347hPuzSnaj7/vpXCsRvp/j7QhbiQ3Xl8DS2qDbKzLe1siwLdJZF+/E\nGXzXKeBuxtURvzrf4zUeQqtc+aKLFaBN9T9g2MhobUIEtIWeKOBdN9ZGi91P\nv41SRnjasLqn2cg08u1XOCghl4QxuV3alYt7mBzQySZ4gtzsbQOUQu4CNUQ1\nCtJJ2YXiDu9iSx+Z6trE+PJ03tdGq2sxE8hQUM9ZQ0trBYt8hborEjJkTSeY\nrQrh\r\n=IfO1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-da9f811-1616784483112_1616784544465_0.8674846778505405","host":"s3://npm-registry-packages"}},"1.1.0-canary-56b620a-1616784622969":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-56b620a-1616784622969","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-56b620a-1616784622969","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3665ef5a2beaed7e39deff52ac3868a7e65b4046","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-56b620a-1616784622969.tgz","fileCount":7,"integrity":"sha512-oLDFubpETpTdW9t4HCmHAqDVA8XOgo2WrZ9doiR33t0tJMwsy9NZfzcqBek22XbE5TVpfujeudIp67+9hf9fCQ==","signatures":[{"sig":"MEUCIQDsX2L2Y4sIDxNwlsOclmfMKkZ1oUjkjBIkPoEIqkBOsgIgMHSbNfQTLAtj6XfuwnlAeoCpue1ZsVeISiObMfO0v6A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXi0wCRA9TVsSAnZWagAAlHIP+wSqxEB7D3UVygvoX2/+\nL/gopP7Iv2CInNpkr+CcYFEnSqVlxmCB3CYrY4uLs15NNQbpiXpjJFEfFdFo\nno35a8fYXVpp+Qc4R8SyxSvQqdsQNGByTcXfsYRbZKSqXKKJ3boVnJYPefY1\nktz6J8a8Fxck72YI0aNa9EZiKATtDwEDq+/XhOiqpMYW0cJq8kdv8L/VzLtM\nXUCG2yXP86JnuxNJDsMpr3s4+WeILFdW4Yf3CzMidiWq+qlO3gnKUMAKFEnG\nQL7XYcsvnjqQNHBfi0th85mLnBy0DRuptxJiz0awoX8h6DGubeP4731cZU8u\nqBZCmy1wAB/LzK4v87cOleihB5qfvougAOKzfVcfVHcFHQ46B85swDMGHDG6\n9jOvQF5y0DeNMpBumv1oFs6XVjcFA1a6TlDiS60iyd9xfclN5HxFZMrW24Wc\ngultqqk7qncOHzLxWGHIIfUBAsq290nJ138troBh/sETtjQeG1IopJyh1OzT\nuX0u9/DGp+MWgwoWFtDswMuaEw4yFdaw1ge/w5+RCt11+zBf7zMAjLRPgQAZ\nX9DCZFm3CyX6gZTPCBUTYuwAolUPWy8GKgM8Vlj1EXQFhVDWUXcb1Y9oRRrv\n9dSvWiPuVQiktMlR+dXuJsxOepUswi0F6QCGPtmbOgruhPsWHfdw2RVLS/Yn\nS1cH\r\n=uJl4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-56b620a-1616784622969_1616784687963_0.12203903659613258","host":"s3://npm-registry-packages"}},"1.1.0-canary-56b620a-1616784622853":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-56b620a-1616784622853","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-56b620a-1616784622853","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0c00463d9342141f2fbc343b086f9e0af9070c46","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-56b620a-1616784622853.tgz","fileCount":7,"integrity":"sha512-DSeNp3rRkDojlbQ5BRx8OsVZbts0ou4LGkDj38e13a+7slIYfYVA7pCtT4xWiIGKg4kmncrCzj2FPh+rx+uaig==","signatures":[{"sig":"MEUCIE63hkeTR/Xhj4r2g4N7iyPZkcTe6rRApcGA/wrtZVO/AiEA+1SMXnnSSuwEeEjPIkmddgdF/Jhv9rqLkZh/d0zxZcU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXi1hCRA9TVsSAnZWagAAnREP/1v5bn0fVPaORMPtt9QZ\n47IIhEGoAx4ata2C7DPWdCY5CvPot/9zbzWVS1FCh4Br7M1xTBvVNJRTL+M2\ne51Y/imUrBtUzWUUs9Ip38PGKP9Xxop6404dbml6kFvFtfJGAPEEO9pF2H0Q\n+FUIZV1ynPkn1jfc+PsVwaPsJAS6jGpHbX1AGWzN6z+KbnSzDqlbNO++eVtB\nt4MK/zdP/zOuPPUNgTliSIUQ/5U1fd4uIMi0zCcJBQTx15gwPbFpptN3nnAK\nrfsigfq/QV1GHyWag3NH1f3XVR992XNTa5MTSQudckhykjUswgd9Z1yzPSEj\ntAu2kCwbebX4dz5s5PHxlBInp7LdKozYYHx+AILT8g3tGD7q0xyctyAkJbv+\nXaA7ERuek1QNoWRPUZprTq2gaiasSywVatP2g1L4w6H5xgZdRcnonL6zGf4m\n8t+MK3ZXIqtQIkb1AfeBjek9cE2Zxr+8uRevBiK8HwfoByNDd35AzCB0bYQc\nA6EiNgCPLwuNQjvvcJQWyi5UXXbtTu8wm4QLlY2octXUVmf/JPuRde2HcJfM\nPZJpfyb3U0svGUikq/NieMWcG111gICJ471HIJy0fjL6jA2UV7tQ2dhkvVB7\nweibWhmr75OeTMUXORwFJ9FnwvhF4RwI5LkJTMThU5ThjNoweeRz5ASB0cLr\nEEnT\r\n=IDP1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-56b620a-1616784622853_1616784736806_0.13472598841374595","host":"s3://npm-registry-packages"}},"1.1.0-canary-18151ce-1616793452077":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-18151ce-1616793452077","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-18151ce-1616793452077","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"66f979f5fe29e2da460292669e8fd1cbe724f947","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-18151ce-1616793452077.tgz","fileCount":7,"integrity":"sha512-fieAXywqQ17i25gMWQaoosGpZ5W6Qpd4YvSr2MsBrISTHuv1hgHnaVlMMIFLdsghK+uY795wCrxBSAY+LSd9GQ==","signatures":[{"sig":"MEUCIQDNyRiVU4tDsIvXnFwpl/XJOiqqz/CqUqzoo8Z48rogjAIgDMKP4cLg87M74Nl5dhoEH2NUa/vRB25gmqStMmddbfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXk+sCRA9TVsSAnZWagAA25IP/3jAIbuMjb7GAsiyJI5c\n2tV6uW5mPiY0nooLNeZh1RFMImcKM/WsjzHhQlHnTQ0zulkg7QYgnx+tt3GK\nWSQ8aGI7mBrwv5epTAVdjgFETO+M3pviH3d3n67v+wO0yEIarGVPpw630ytE\npp2yTge89oH1X+FGVfOJnlD/5fuUUg5wtxyhga+C3hYQ9s0MrLVei9Cz1+0+\nF21ZGqJbUqxmLJ9IWRmdRCNwUQCAuPL39Sl8lCcLBHjGesToj0dgEmbUN0oC\nMlYoL1IUEhvmm83rKyen+T2dmi+QSjvNWp8uVv2YiNFAHoDGvYtqdl0i667f\nf4ecduMjGvgDVY6mqQ1wvpfQt/a3S4On+yOiJPwe39V6dSBYFHYbLw8LqId7\nJQVHrCTTV+UyQKFfJmiGKwZoFn+1B5U6V7c1tFLgfAT7muwgEHtNegoe52A/\nEIVeWHAk7a2s07F9TyjqkxX7RUIecZKhQv0cxF+xZw700AlFa+AkJXT4cw1v\nXWqSgr5IF8uwhPS1VY+eyw4sluBzATsPiT+AKfeuQcTYRrb22zEgkUnG7t1t\nfijSJc65N7wV2OrOXM6QVS8YaOrKIuxXYo1B03LdbuhSZLU9iP05RfDjn+j1\nE2loVMbR7glgFS92LMfbl9kEbcYafm3a2Svl6dG6cJxnFUYEWS5IkAS1/+AP\nV/UK\r\n=OIcS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-18151ce-1616793452077_1616793516021_0.3195501894065369","host":"s3://npm-registry-packages"}},"1.1.0-canary-18151ce-1616793463870":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-18151ce-1616793463870","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-18151ce-1616793463870","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"89690bffa382b7b7024f120324c3e387a860f6de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-18151ce-1616793463870.tgz","fileCount":7,"integrity":"sha512-tHyawxW/ksHBjXuzW+IVquZ2gscF1Paua73PQgTxb5dpOZ+dwRsNUGnUU3+KHgIFCkU2AyCn5Ev8+cC1YncTaQ==","signatures":[{"sig":"MEQCIGmRw6930sIpsakDsleRe6hk04fCrE1BylW092HeWNaRAiA8qRidktcaeKcpt4yxGX3CTB65spKM62yy/4mLVvDB+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXk+6CRA9TVsSAnZWagAAN08P/iUEuIAVdfbiWwnzv0tn\n9eflT0X4E8jx9qw1wyJeWB2S93rQ/C7RTJrpluQEtk3q9MVhklk0iJv6SVQy\nsRBOws0qDroq8BDSahomLnZQTpKKo86N+HBsOHt+hBnhj63rEqMw69wFKz1H\nsHkntYOxuRsGrVJVXckOTIsTOpWx93IFSBPqQkTNLmYzlR1L9wUnSWMQZXN/\nvqsmoXfXYFoZY/7Etd1BoiqIKThsAo+MZ/Kvbh7wXrmo1mLuCGiR+dMgo8JP\nPZYYROMptuldhp/FXSM/mfzIwubiOkwdkaGZ0mrE7WHWaSjBbyC/eWWsn/A3\nK9uw3lt/s4n36khcrnJanciz0W2hWNE9zKym5x99zn2swbjJmy4+N61+btQ0\nHyN5PuMH5zSoetx9KfEQfinEF6E9fiq1uo0OHTyTGYDicMcT2W+kUx76kcIz\noq+4NqOcRjySviXagKRF9JVNq+m92aUUWJzYkFISiDCrQjUwtJjGaVAMqDZg\nAtVMmJW4+qblh8yA+0uL+A/uVMg5H+7Z8m34sAg2W+W+G4PoB7VcDPtXABU6\n5ypC0s/KQkDzFYtrxfl2iKWNV3ysOQfT4fCyOBRZqsBUclQNGk8dzQcFkR+X\nr57lY1wiO9jDWChl16PW5VeuJt6ezcywiI93mKAVm2xqGu22M/mG6M+eAoVn\nQ8lP\r\n=7hCU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.42.4","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-18151ce-1616793463870_1616793530036_0.5472764738848803","host":"s3://npm-registry-packages"}},"1.1.0-canary-d9e4605-1616823828583":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d9e4605-1616823828583","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d9e4605-1616823828583","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"678721c704015ca1d64b918a5e1c90ab73031955","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d9e4605-1616823828583.tgz","fileCount":7,"integrity":"sha512-ZNBoQScG8+MjCgPnCp05YG3kZjKRX49BH0mduiVSWUzduxGZqE8Q9ecHuHKp5jhv5V1hbt6AtA6TA69eIW9xsQ==","signatures":[{"sig":"MEYCIQCZmHIwMJPzhje3XYbMrhE6enQPajtYPjiP9mVU+zS33AIhALaGv42QxSuq/v0cuMSuwqbEM8Kq/EMfDuEJoh/q1NJe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXsZNCRA9TVsSAnZWagAA+G4P+QC4uNfJdQym1WcWkMlS\nss9c2/pdliygAJIjDk0sF5DTn9izspVmkvnNrF7WXXzSW1CABCTeats+r/XS\nCb+Jb4L5K3IEPJ+tOCuuBZGuPsRJDEQT8ySdiVkFz0NEWhTxcZXVM+Nu6ixB\noF0iUBlOKsvY4GNDKug/sh3Oq0UvuYiVcdPCfOVNhvuVV0P3M0zi5zK1gN/F\nBKBsr6B9zuRb9rJfEoPoXi+CbV6G62qR5qza/rsL3/P5xoRzYnM6c4tjrDE+\n1j9tuTorVChGE1HlPJ8YQ2rCJtuJxVxwc89VaZY+gNP2P/ymwBbqFoHM12Ri\nIG3U9sWoyTL7iKqUgBQo+PowRplVZazDuAN36eEFveEOAj7mLs0aSgPtMIJe\nQB4nsHSkOIOi6Rn0/u1TEUXOY7OFQfOQkCCqMxepZ0+ABYSxFyGcaArkpPL0\nnQzMXEs0CkSXKthFsyznoQdT17Lr0gkWSfEV59rq6RsPB/v5dHWT70/uCJdJ\nCVeSMnEfBeai4INuYWXQtkKBlf4z3v3zQUDGm2DsY2//WdEAFojqqys2xE9E\nEZin/UoF9iXcl3oFOL8jeQl08WVaY64eB3zZmYCgw13vfcW3LRXVu6rMDQ4Z\nVx3RuVOFgJEl0Pf/tDQYJhoiFS2HzSCbIjXkxiXboGbnnGTUr+/KW6L2q1Uq\nAkhR\r\n=Po9L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.43.0","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d9e4605-1616823828583_1616823884343_0.5901071841971219","host":"s3://npm-registry-packages"}},"1.1.0-canary-d9e4605-1616823830303":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d9e4605-1616823830303","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d9e4605-1616823830303","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3dc26c7cd5767db2e801f622c609145b6cb632ce","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d9e4605-1616823830303.tgz","fileCount":7,"integrity":"sha512-zgRRTrverbEg29i24xbzppwLbwHUh1av7sUg+OhIAlfNp2CHrEh/PPRUuPZLCUNIuzVfGenYsWFupO2V+oy4rQ==","signatures":[{"sig":"MEYCIQC1R+Bd2SJn7HpHMTBKCkJDydhhVMJzVwbsflK8zNDcuAIhAO0Ur6QXwZF+/s7OAMDWzJdrWg/muZgfvSvEWYtSAyTC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXsZUCRA9TVsSAnZWagAAiykQAIst2VAo2RH7dFOoNoC/\nflG1VvwoF4hMDZWKuaue5lxvL3A8Qa0zuxvlC7bGWiS9VLXd63rAdo7BC3kS\n7Pp56CQlHOPRin1zxByQ49yTX1535glzNuW2npftf1EP9Q5cCvqzLd/6gkQC\n+F9vdmufppsHkOR6mznWP83GWl4b+I53PZGXwLTiN5aVATeGa+TdqQX1og8t\nJPh7PPcdjzqXrtLzVDDQYQJ8KuKxsieHeeZhvYAJuAW8fLK64JYSgovRJwn6\nuEEvCmWJkqHTmkWgEAKFSNKUXG8R0JTBzw2+pu1GA/MpdQTwtnpClXGhseG3\npA2yPKCZ/a+GglGStwlCRe+n4oQkL6bA5tLPuJatrydb2vqsUhR6zj/WCXRj\n8lRaLbRS7id42PWHSUvXDtWM7iCcbGNWZnB9ZehRwTQSKwilxN9JNXY6FS8O\nOpO40SViLKg4I9tE1VaYIw7wIxupHgFcnLGossskZlvY0Oy45+iC80DSUDhi\nusx9uVgRn+j/L6HN8DvzG7Bhsp38uwCXljbuY7iYbmroJnw9Z05YPokxeUyI\nvaczErLCeVYvhD4xWtIc+vjxyWikQXd9cc5kxrNN+th8fQ1jd7k1I0fsWTIc\nywvgOdpf03n7XL1cPQfF/VqemDcvsG0imC9VSR0332+wddxLZFPnGOfW9tJJ\nlme6\r\n=pPEw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.43.0","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d9e4605-1616823830303_1616823892481_0.07662811160655458","host":"s3://npm-registry-packages"}},"1.1.0-canary-1f6441a-1616912679614":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1f6441a-1616912679614","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1f6441a-1616912679614","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"669b1dc3e1924c0c1d11ba3c47f1863259d0764b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1f6441a-1616912679614.tgz","fileCount":7,"integrity":"sha512-z14MAuim9nWSvu7gEpOy3k9km2H9xQDPvSFQU4nZXMhL9gG0u4hs6hLt02fhrt91vN6YiB91utcqnoAy0565/w==","signatures":[{"sig":"MEYCIQCsUrYlcYHC/3/zWEBA17bhMJ09sy3RiycIoT8aFnJOPQIhAJdYghByixcW4SBhguUZeR1FNRTRA/FmT3yS6fhFh/Un","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYCFdCRA9TVsSAnZWagAARWIP/3ScWc5LdYc26cq53kGJ\nFER6Bi39PkLuN52dTZhAyRu9aGzvnkbpOqkzj/XpbTGTIBUgPjLI1v17GCS9\nss99rpuOMXAbxBhbxOLY5lRdvW3OwE7+S8vDgoNb/w1b0kS97OZEC3camNJp\nLZpawQFhZqnPsmlweIwFXODCgoMch38eBFC88KaIKuVuZmr+IY8++eIRIFxZ\n9szYocGCbHCT5g8Ap5YGqQWiQinq4t1nxEV7hrUhTRslmpVoYKAruKI0VUvy\nzxom8eteXjTqEUwWkJXBeqDUvwWlqNxPKVHm6P4L3XCcPUJKMX78qDlx8TeS\ncFfQKI/9XgieCHD4DR4japh+dfq8lHiRLErWWuhF3lubzjV8dVRNc/T81Ojb\nE/W4xQZXq/VUUvbxqDkfC3SZ5QlnA5KxszyAPDjPhvgZgzsiQsRI7vOW+MjT\nk/0AhcGoB9Iro8pWkBZreHi/NgrtcDmOkGoNwpZtm7cGsCkybs1Uul0uoPqB\niy0fzeGgJDRJ0KlUPTJAlh8RAHAy2Tg1v/tDXo7YlAZJwYTSFT18QywRq8O8\noW2MtuopZQdIB6sWx9wDF5HG0o6xj4hdQfxGKqlb+WdaPzEoS2hW2pZY87FP\nnepEVTeA05jdOZhT0PrkaVYSrJ5wVyKFCT5NNB9eMw9n3NRmfKJ/cvjxtJCM\ncawv\r\n=mfW4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1f6441a-1616912679614_1616912733175_0.15567012606349917","host":"s3://npm-registry-packages"}},"1.1.0-canary-1f6441a-1616912684647":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1f6441a-1616912684647","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1f6441a-1616912684647","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"010c92d8375767cd11965e93d1f1247cb0230ef8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1f6441a-1616912684647.tgz","fileCount":7,"integrity":"sha512-F7hIcBiFJyJxNBzNa4mwhBFr8iXQ8CrlSNXwclBzwcqxW52yMqhnsOODQqz/fw69sP1Wny2DEs2Hi9VHOt3/Cw==","signatures":[{"sig":"MEYCIQDf1XOy3gbGdtiLRUZap1GS9FZvCPDBpf3+20KbIo550wIhAKxYLXOul6glngdBQUX+HlpnSbAvqajXZ3IEBEpL74fM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYCFpCRA9TVsSAnZWagAAR1kP/RGU03ulUCzMFGv9Tg9X\nxOS0MrOeDm8+vUjD1TLOGYrlJM3cTY7dl7pBuhMmvwK2aTgcM8fxJaz13AKs\nq5yO3ESKrUtgo5V8xP2ftpk0Yad+BUO5yIfxpnjayF5Tn/yxsUAZ2R7cQCHM\nfj06Zsc1qHbt9GPhSEUfZJ0u+9vW7xuJz1dct8Li+SZFoQDNQm3u01kE0DQ0\nAOU3pM4KaJqqtW9Zyfvig6QOdy8uufTGrav8e0o9aMjLAm/KWAK+zjM8120u\n0xZ0nxK6ru3Xd2RNG/S6JdvDZ3YcNayFwkawtE3IwAA26qafoX/7jOTS3/Eg\nHw8Q4+leyxTlldhmepbl8K3uoB5TyVcaGs29i2pnqJp0sm7Ya3tR7IatjleH\nUKLKRadFrwXkuRcR0rl165qsaNqZHdVLrpWtugNU9iHhOTyVpSIx3U/RJ+Rb\ncoLMH2gPIIj2UW/VEJzZmPm8VZeOKvwQlXHhueP4AVQbwMcxJZctr04uJQBz\ncjKE5kW0XhjA/E6g2El4BVDA5Ld5UJ4i4Rm1lHImRGboM23tfRUSHjQUFMlj\nVeBwhhdDf1ihF4dOW5vD2ykSSJffOILZCrw1qXA67N3J44zcWHmiqwCkML1V\nllZrJL5IIMM6FeH1GvupDlquA9OIN1skIkOVjbEnj6BQznXSz5jYZJsNvx3a\njdzD\r\n=dm58\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1f6441a-1616912684647_1616912744806_0.6035669521612441","host":"s3://npm-registry-packages"}},"1.1.0-canary-d9e0a3f-1616973229653":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d9e0a3f-1616973229653","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d9e0a3f-1616973229653","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a1f3beb35c02b79881449f55e869d57fc2811727","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d9e0a3f-1616973229653.tgz","fileCount":7,"integrity":"sha512-ohKP8XosVPCNwTjr5QVS37Uy3K/ETjKurR9g/sPgynqeyMDi8abNx9fH4tF1sqTsRp1b3X/UqNumJmdsnJGfEA==","signatures":[{"sig":"MEYCIQDgVbn23sEaFRhYpne2D9LVE8DSH3Unoinb4ljqqHq3OQIhAKKpgFec1AsUJJH93AuJc7OcVjpvkYD2QsKXb+22QQvL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYQ3jCRA9TVsSAnZWagAASfEP/0qEVxAjhfxEUhYtVBqq\n6s2uP8oWynZktzsXScmC1iiTZj8FERDHn8QmEcqvRjmZvaqW+jPDfoBevaSC\n4NEIwMFCA21MxKWnqZ6z3kWb08GcY0hzwjYEmsjbxNuXNGLeLRQo4SS3GvKh\nlrQUZUkADajEsTBqW/2KeBaJ5B78lqa9tBqKWy2DQKAUIl7CUXKQpwvZ+V34\nFlYacJQCYjDohbOdcczNYf1wXRhWCNsn6+W8xxOwIEJ4RhFPfjhBjKutEUoi\ndu7/RZKIrqR4F3AblkgTsOf63/Prhzfquq79IKe7B6TlJ1UZIs1LPb7rT///\nGyzduUym/Q3jwot340Vq/whflqYrfHs2/yOqRC4Yi6oBRd57HVrKbondE0Gi\nrjHWiKzt9P0ee59MzETQpmicPBRwCx8tPmskhNtEz8v9BS7aMVVjHC1+QpdF\nC4BzCZxB2Wh81s9t8SusH5pzIZwIWDzVTNsWR8lNtkN0z1RnXEYHFU9Zaw86\nI1C1FK9hthcAhtAMVuj0tAkoVEvXyUNYN94y5dXMMcdfFuRRulIEEL5B4g7r\nvAOZW6Ss44vx8GGKYI9P8Vb8MFVMXEWLXWMfFdoXmRBrT8xZadgTdcv90TdC\n5EiTfFEai3DnVY5zsb7W4NYYXSYvXipY9n2JZOMiRS8vX4ksPk4/f6Dw5iB9\nj7Qy\r\n=EAf4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.0","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d9e0a3f-1616973229653_1616973282500_0.813382697022814","host":"s3://npm-registry-packages"}},"1.1.0-canary-3115ce2-1617003687103":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3115ce2-1617003687103","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3115ce2-1617003687103","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"72ce3e4689c3cd12629f9542de82feb54f89ec3e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3115ce2-1617003687103.tgz","fileCount":7,"integrity":"sha512-beTXaGiOdRanuyq2RN+DuTFkPOqfciJomzOcHuk0qtKkqiqJomLDtXxoL6/6GkdWkT78LMLe9pMTeLqGrr3dbQ==","signatures":[{"sig":"MEUCIBICVdmhJuJX6HVVwyGlVJintyAt3XWW2NnvpNfV3yovAiEAsEBmBF2ybeDmVg9YCaf7sDrAOqgFieD+QOu5kedI7hs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYYTcCRA9TVsSAnZWagAAIPMQAJlCnlce77pDDuOJla9U\nMJ1hC6KP/rq6YXTwwJuyx/FOhBQUfHquTwkxWdkEhwTnD4RaUO6Rgk7tlCce\nFKXqSsXZcWb+kNYIhH74x0ZPN3bM60zckSz4RSvho2ynLRsvpsMFEp+1IQ7r\nXCKPm4sGCj+RfCysMf8V+YL7rzf0kJWa31gRjmDJkHsGAUwy3P5mCqpFaAsK\nqzZgfKHgbbDpe8zQO18hKEE/o9j48dcI52JXHOcpbFwHj64RGBThAHw0DS+W\nhPb0hJ1SlHH5+GF5pInF9iOaBLJEMIj+Lpt/cEVtEFC1PlRVbu0/7Se+Swda\n8i11amRxjNxyp5nXInUc4tCQXRu+stCjQvi0PXsC+oimvhAlMSmsh27BotRb\nrK1pPDGzX8y1o+A2VvJt8SgwstI6/pgJXx55yKzzWnEPFsxePqTsr0tHJaQ+\nAmxlDoiTFdnxV58K38+zZdrXSL1mR7ctXeh++dMBTjizttKzyut1HVNlE+5R\n+37em3UbN1oFgHTnEVAobLgcnXB/cNoPT1LKPblLwRhoyEtW7pcMC12S1OBy\nU/ORI5/uvA8PsWBpOLL6V2q0ZapVV4PdkhyXh/jPd5I5DAMWfrRZOkThBbs8\nPQBfe20XmXUQUPK3lnJQxGWjwy9hVF99y7iQtunxlAd3v1NoAPI9a6M1mHp0\nhXqI\r\n=fHJO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^17.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3115ce2-1617003687103_1617003739918_0.8200036179137395","host":"s3://npm-registry-packages"}},"1.1.0-canary-9512afe-1617008611021":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9512afe-1617008611021","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9512afe-1617008611021","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c7f4e9f9118247fc4fa49bae0e612832b1ee6256","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9512afe-1617008611021.tgz","fileCount":7,"integrity":"sha512-R3qIwClSAhTTvvQvoNhKYsWQ2JqywI9bCAeBfUkRXI3OD63tT07WwqVIuXeXlKDu7K6Tzj6GE9gVsRDciDXuLA==","signatures":[{"sig":"MEYCIQD4qxUjpMhj3jkrRjsEQ9NbYc8Fmmu4JHhrKBl4nvhm+QIhAOPahec3VShligRzH7rBQ9BKsHSFULKl+vMRrBpuYqoe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYZgaCRA9TVsSAnZWagAA+6UP/jvbw7uszfmi1P9pqZQY\nuQJltAWsZcd1JWjctuz0dCqT2ZfGX4DzlFR5XxZSCwtit7w0JXcyhJ8K2S4N\n6C8OTo2d+GWX8tikQKRHq55CXoqP/GbDqr99PKonXEXRTOWDaoDQPkvv18kW\nq44mu5XXTTE24NzTUkL32q2upIxEzocCFglTvz8XHChuvckT/bsmj2F/ZUni\nXIZYqSurkSCyCcZvGtgkKLlpPFk/28fyOR7fk0EM8YgdV+fqthal1BJcHa7c\nZq1CiU4y29/k0dKHpwbZyEEtodM2DozGrWFza6st6Y8keUNVcDyP6I0i3ua+\n5/ZFJhm9kLK4+QY0O4wwspAqJI7YI+NbCUrjQ6ERQBUVvoeC+bSd9zhhQTkO\nrZgO8LQY1R/LiwlideB/tYMKKkri6Dll65pma2FIB3yOoJehlvl8U2khvKvA\nQdVmippo2pqGXcYYXHxq1ua+GM+v4RyR4czybmJCZEeoI6m1coZ3uMmnx+xC\ncP3rtMeapemSWUSGzLn8xtOyAeANWGClclntmJllKESQ4hX3UISX5DTxl/jn\niwzW1HpqPnWuB5w69HmH2jFD1P7QZXhKJEaHmhyMzJD0ZwPeit98vJbFJAnw\nP9Zm88anyG0H5icIYSEi9mLs5vo7TlzWLSiVoGzi/5fsOplgfTbwonzc0w50\ngCg2\r\n=x88e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.22.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9512afe-1617008611021_1617008665933_0.3186987102590113","host":"s3://npm-registry-packages"}},"1.1.0-canary-2737ad9-1617008831209":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-2737ad9-1617008831209","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-2737ad9-1617008831209","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"59d5c473fcd4790c3ef60c1b2bddc3c11438a54f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-2737ad9-1617008831209.tgz","fileCount":7,"integrity":"sha512-b/3YW1rEu3jUDKMto92wQbDNrriIebwG2xuTZSVygeBVI8yAfWqbEdbJDnb5N5iw6Ar552kjUrq7Sv1oBk7Ejw==","signatures":[{"sig":"MEYCIQCBBXwlX7Nj8Ybfl6Od1PD6PvXCfVxAJYA4XELWEyZevwIhAJrHQRBmZtwJtZz82VhC4/8gSllFycUH3mas3xAS7LkN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYZj+CRA9TVsSAnZWagAAkpEP/275lC5MdAlWyd/ePjO6\nqMEc2bfZwvB2KWawFaUGhmk2GGwHdLOP7p8DTx2+KOYFEUPSZTRec6j8NS3l\ng5RogaTVQUhacIxckDmKFhQ9+BQFALm/aFUllpxjxMhL5zV0JN4DIad2vx6W\nQn/ejtT4yv+JAwGVz28Njwr6QsbqkK/Te+b/HPBgRGJAHsKAIIDd1KUfuAyA\nmmRLO16HBrbZlRYpTfDsXhLmlrttHLQ7A9dImX0SX2e17koBIDEOGbuatTBJ\nilH8HXprRSaK6qLm5o6Aa+z0+uCNnYKZyQNl9AlvzAXj5zZ/1/O9Tk2JwNf2\nsfEhxFWp7/waeXqhhzQV/KEmd450DW3JWIgEjITwXlGUiYVNm4Vf/FYfzu2E\n5gs2tjwGxWkbams46AiiQ8XexL68+Pz418nBuPC40x1PaX8rf0Hz/HNxPUwP\nxJAgXNFppZsrN5FaaXiTCKvNrEojpgpsT/LN6wvjheCrZGOnEudMQQwBTxe8\nZGyV4kzyXDymgkORy2k4pEVeKYZnp7f5GHy/WAhDswlu479vO9K5spJ52cuf\nTAtel+1aZr+ESyDGpGv3f7u5JjncjHPV4gheHI2mXV/m29gaZuTXB76oIOOF\nnyY7OXsIWh0nztYF3/d/ZBhWfUcgmbB0ZL3ftQdZB6RZPmTXnSkwzOAUvN6P\n6mUN\r\n=tJIe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-2737ad9-1617008831209_1617008893916_0.2974193391436324","host":"s3://npm-registry-packages"}},"1.1.0-canary-b000a98-1617031399886":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b000a98-1617031399886","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b000a98-1617031399886","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8d7ff6db980075e1da54610d19eab55d0e0a6912","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b000a98-1617031399886.tgz","fileCount":7,"integrity":"sha512-/lfeiYE+6SCyRIdIBiyTP+jyd5bGWZgbRVj7scOMK9m3NnrhC8gzw09MgWGu3VS1OYcYUxw/+wn/H3JDjGjvXw==","signatures":[{"sig":"MEUCIGKRUcZRt/3X3fBKWoDqxwTzct0wmqLYFcs590KpZs67AiEAj7CF/DPCP1rFQAgPkVyMEbVrM5A7N4LEGQhbJ53N23Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYfEhCRA9TVsSAnZWagAAI/sP/2D8ER+iBQ1pwrKXrGj5\nT2mq3rJSgaG7kLvxeYpYPLb5lWaZFC8/MVz0CFwhXNfQ0FzKFEPcDqs+d403\nc/uqFu/CTCS5VA4alvnvnt5Vk6FhJk7ObFc6CftcBJYvEU7NJPHxu11KlA47\ndLwYmYtnHWtaLroAGShaoOEuhl0ooRzKI8aOCi77OLQMJqFyyYRo5HEJswhr\nXyzkabPrKtI2jy6syXI1wh4s9Zy6152pw3PHhIZEOy9SQkr8F7TfveNPSFcY\n91kpCs6wlKbfYvKpfmN2ydzBumUcyUSKkh2l97EdKKzPn1TsXmh+VrIOvY89\nrJrdzLrQev4mVxRCrsFV7Cjm3IgIMe2uJk4OncQvegzVB2cnp9hP0VHGlRv3\n4gRtM63I0YN11fAboGoS4yfLcCSdjYg76rNQ1bNI9uLubOhp0GApsbCU31ZE\nX6ogbGXkq7m/Qz9HE4R5qOInbnieUa/VSt5DS6sSEw/e5FurhoD3soG3KUZd\n3WcZUhK317uRpNSkgStkTB3M2uwaNuLbnsrQchrAOYrVw94+FilUScFqj+zQ\nDObpMkNDqKvJb5iw38s/ikoj7VgPadevRcnZH9UqHUBSFsPgXBbpejFlJDk9\n6wSoN3bsqZsprqRFOB/vqHGGg9njA4eZ2LinaDOluCFpZ+YPCGHwOcybwbV/\nmQox\r\n=56zK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b000a98-1617031399886_1617031456620_0.0052021185660224845","host":"s3://npm-registry-packages"}},"1.1.0-canary-b000a98-1617031418337":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b000a98-1617031418337","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b000a98-1617031418337","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7dc1852e2f0c3af7f51eed75fa47f2d29406b04c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b000a98-1617031418337.tgz","fileCount":7,"integrity":"sha512-TaxLL/dq61vx43lF+XM9M8XfG+ePAD/nr+Z20sOTD3/HXWRLQMHL4dbsMmbX+QQeM8K5zeASgI4DvtEyTuxkJw==","signatures":[{"sig":"MEQCIDGhnMY20Na41Qm7lDIxdbb7aWCNunsfvMfvqJhkNA2tAiBTPpfvU7NcMJn+BmCVxVkkKH8Ka1C7Pa0YjxXtlXbnWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYfE3CRA9TVsSAnZWagAAvf8P/1riX6jy6KGtLgaLSPZH\nLSAmFRfd/8LC4QQEUv1Bk0g3fjQuveko9KiMquE5A2GxeQ+G1O6DJGaemsZH\nmiG0xO7OXONw/LaBXpsJ83PrQX3VUkTeLbcKtoVHAGH8uCN5W5LRZhJ0IG9s\nqYUPCxP0WeFI+kfq+lchhx4U4QL8PZCvofQB84G2bvf9GPhSLOsQO1o18qEB\nF+lGlXVJxmmVJdn3hgQMTW6U/e0RhzawnCxiliPVfDLnowe0hrVBY+pVJqjj\nJyNjxfuh2f8XLCcX/nVdCT/bb1+Dkb/2JibGHTONRqm+0Ln7KI6jaQHwgDHS\nzrkuSIHYxtPi9t2wIOMosgmL94DmGnY874dW0a+hVwNea2987MFC3EMeX2Ht\nhl0Jj1IbAZwGs1y8Jwe217BW0Wj4tlBSNZsQqXhBul8O6v1H3z2IW5zqTFqY\nafTW2+Z7CR9lB9EkhOKa6s5vZ8HKMkBHoF4GVFqJAFp/CVUyOk5EvPf+oz6r\nielvNIaodXZdUWKq/znIR88xhyerdZwDQZCpca4h+Sr4lrD0TsAwXm+rqCMO\nAhK9KE/GI43YK6ok6v0dejefQ0pcYPcwU99TVbMzCNu3Uw4MgZF/p5dFKQba\nI0AoD3YbD54bM44dYbYFen923dM+7o61UbPnxG17gMi2DHA++fBm8JEioV8+\nuZzC\r\n=hlGn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b000a98-1617031418337_1617031479273_0.12931033943063208","host":"s3://npm-registry-packages"}},"1.1.0-canary-0f185cc-1617046645359":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0f185cc-1617046645359","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0f185cc-1617046645359","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f8d67895dffa0e6fd326a1b44dcc4370db430314","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0f185cc-1617046645359.tgz","fileCount":7,"integrity":"sha512-s77tstmAqyow5RLeu7xXy3CQEhVNAaCgZ0sMcL8hyrXoVcEmIkUzsYrHbf4kTdFS0+bEdKX4PPvJUldRCzVj1w==","signatures":[{"sig":"MEYCIQDlNEvRUjNiL9CuqjZ7yXZ5fLgpi3NgjyijFulMFunbKQIhALn81Q0ZpVIPZpfDduJ9SPwrWSnfOzYL7zWJ7fngbrYT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYiymCRA9TVsSAnZWagAAzpkQAJeIO36ZuH67gFyG+bAG\noTkkgD9gdnPKqu0WMXXJV3MQMBwX7rSmZcgCzHE6oFKeEOXxjA3KIcEpw4Ys\nnZXBEql9ujeeppDg/g3e/TEs2ah9ShFvR7WOuxw5G8YBepl/SggWW7N4UBme\n+LDx5XFixRYDqWUtxHdfsyMGRTp1+BnFjGT129wLPJNh+QXwnXPKA2ALCfKn\nd3lYIq8e8KZwRSbKG4rnpjJauU1yoXuBl/05m8qPohx38vuX57MyVf5h2itr\npTuPFICCnB8kLPH793bZYjTCrvHqVWElp+e/M2P/sM9Qgjy5WLHrWmGvJ/A/\nxkN9ryLh6xk27BHwqvkO2UImLAyDsfuHF5DV8Q5Bmowa7WXpF4qJguFDN9yh\nmHxW9LtyzZMv5XbWonbmJxIMjQFuSffxWnl6MMWa4KEbgVj/JrL1MwI3YTps\nEQUr9jUPKLzlZQITQubXWcIwzJlmZZRZ9Gxj5V7ZCujkCJ5zFUGLA7Yatq2/\n+eqJ2WqfpTjV9ChnAJQNrdgqX5bO6Tap8QOzGdaEQ+PlaJIzfeXpV7PcGPCI\nT7YVL4yazL4mEeSDaltzHWlbHQ41wF2ObNM/HdUakffR25nOL2/R1vKfZUHe\n3S2B1NUCDu3X2cZo9BxNOzi1pfrKd70tgofnVyd7Qk4KK1E7f6eh8Y2bQRNC\nzJ83\r\n=7rIE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0f185cc-1617046645359_1617046693566_0.38504001420323064","host":"s3://npm-registry-packages"}},"1.1.0-canary-0f185cc-1617046645781":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0f185cc-1617046645781","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0f185cc-1617046645781","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"11d52203f63707b8e6cf6f482a1e147018aac234","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0f185cc-1617046645781.tgz","fileCount":7,"integrity":"sha512-9aMYpdWHi3fy/9rsNdYYv2EjuqUMhGn48xIjn1jGFfXsPlW9/2XNNuOfpNIpvn6tFsKkiIQL10hMU5qRkZ3m8g==","signatures":[{"sig":"MEQCIFL276HwzRS0OrsEiBt8HOF8KenBExvRmNg3Y9Y2V6NoAiBOoMw8YahpcXpB9CQFfIRCAwzeoeC7Xl6i+LEpu9fLEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYiywCRA9TVsSAnZWagAAAqEP+QGvtJANZlYZm8RvTdYm\nQOPlnygA7VjvTayUmUSXn26CDIjf1CGYwMQzlss/Y7dKpGVTACZlS6PNZKwd\nSi3r76Xugm/hcqR2xn/spt41otlaJPjERA0OKqJ+jdp4hLkwMQggKBeYVZtQ\nPnz5yyqTywCwWUJ6Ni7iEnrHRQZIgrEPZqRiM7fNsZ7t9wL/KKnbwoVv/rH5\nxH90KsgWmNp7X9VLwkP4atGA6U5W95XHMDn52b+p1QicMXgklZ9z/T+tZJBj\njqeqYJLaxtrkXXKytIGpu3ziSchzNLIUAxnOE95dkSOuczcd0ZFxSO/uvlA0\n4JT5FXOmRTMhme91dl+Mxx72FVR+9+9QHtjVWzXFCSWKrkyT2kfa9Y4NNU42\nbIFKU+WdIiCKb5nrTBke7hpE0KTKnbwuZJ1zdqh/+PdL9aJ/5SafznH9wB0S\nOw/JoDqPieXCfmgVD/CdlcBcxD185Pynu3/0uZ+P5NiRAPQPpI7QFe0Vvk9j\nR6UuhPJsWJuox0V3iv4AI20GY/fDqaZmqhtggpyR7uX+tDrG3gxr9bAQ6glQ\nv8rKlRGfGItqVTJwkIxS93rWU49eltX0dpU0uHZLzp2WfEgrmgcPTKBgn1bV\nufbcdbP2GLyqZq5yBPFQMc2PnTXIqCERFNPZTuVRJYQksZFa/XatxqOeS/xx\n/CaU\r\n=sqB8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.43.1","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0f185cc-1617046645781_1617046704316_0.9681680622199607","host":"s3://npm-registry-packages"}},"1.1.0-canary-237f4b3-1617105290057":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-237f4b3-1617105290057","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-237f4b3-1617105290057","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0770bef65b1e27a8d670971111a50e0ffd3b972c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-237f4b3-1617105290057.tgz","fileCount":7,"integrity":"sha512-QB0mXMzKJ8yYt8tFc4dvGrp/4UItgn7YpOztJMcU7L62N6l6QwxSfhIc4FraRVbj8UxGUf7imByD6Cz/eZeUkA==","signatures":[{"sig":"MEQCIEYJklTqNgV2uXrMHMeLEWHRFR3AnrXtMotdOAwOGtmPAiB2s0Kkqta01/XeikVT+6qmmrAxIX7CYQvSUDlxRSKiPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYxHMCRA9TVsSAnZWagAAa8oQAJYOLuPUxGqPD2r+kHiF\np/pS8YcwiUhd2xsFHRWKpm/FQsMcnfpmek6mordvXe/xhGX9ePpijmt9LbUX\nVRpKubHaTcsrWQ5AAmX4a1rpqypLYTJdDovgujhBZBI874QNSGGDCATGPGqv\nXuREwh6+cyj0ChgCCPn1ybrT+Xh3FJt0O8EIgGwxRVyKZt4VGpfbAVKP6RVO\nKXH4KyKbyDcYZ9tEpxyhuDZT5mu7G+ZfHOf9SD2Vow5D+JpRqGr/Dyn8JwaA\naOw3NijMZkKfpAZl+C1pJWjpAbn8AFZ2CV5nB8crGC3YZYBN0Ak1SThuZiBk\neyIInAe0kvw1fITxz24RLTlz87vaxjGJVqi8k8n+wic9OcOi48WU0lkOuiI/\nw4rSPO6lFUwElDxllmLw0ryq2KNfBJgOvmJwBfocmegI4w4v/IkYXWg9HmWa\neSSi1euPqqwWjw+uKYKdC/YbqTDXQ30Yl+YMzlMUIbZGX97YzjHbIOEnKQpY\nxOe4Ehb2CuDM9+gjmAnemATvoHY+lMLcuGaL6D8HtNN8iP/sdurE5aWG65dn\nlI+XxpTyBhfF5/4cCrTvSOSw7DJ/d02TR+zAKRrsYMeXrB9dp54dNnbhmz7G\nnVP/CdNvG8MKuCYgFAxrofNmZ8MKcCpOSJfNmVXQ8UEChU7Isl7YQpOB3rfI\nazxV\r\n=ZfRy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.34","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-237f4b3-1617105290057_1617105355941_0.42454005519659654","host":"s3://npm-registry-packages"}},"1.1.0-canary-859fdb8-1617480979946":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-859fdb8-1617480979946","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-859fdb8-1617480979946","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9450bfd8d2041d9c25ba5fe8c2e6274e62b80413","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-859fdb8-1617480979946.tgz","fileCount":7,"integrity":"sha512-WmmIT1AeCZX3hCqWHeto+elEawOQzuLUxlkCw/Pzv/PYPFLMxXDGXmRz3tIQ/345e2Q8Z4SCUGD3yxx4Gxr/JA==","signatures":[{"sig":"MEUCIQCvY7nwYWdYKbpOIxwgUu+oYh8sU2SXug41Invp6UtPVgIgKaJXXVw+29/F2YS1ztpPOO9+EyROylzmBFe7UHVYzXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaM1RCRA9TVsSAnZWagAA7kQP/A4pC4zCmpn78IfJp89n\nED9V3qTTUq+AgF4Z+tzq/cYo0FWVlskndH7uiO2rBBv1463yYTcAv2OvN0LM\nr0he0flI8FV3GyX71hpC/GkAwpkFh8fryEyDSvAOqZB303n/oYrdltru4HgS\nsUCz+jg+8ybFDuBERJT9g4JOeiMOo7I7UtR9RFqXZrD7K7fGxIxH2WYgLdkT\nUPZxpW2tln+VWyuimHxJZDX0tn/mX8hhgb2fH1j8J1TjEOJEG+mZsXe5vjTJ\nECBrWj28gXObK9Ph6qC8jVeW8nDSGaBrcU6PUHheFo0k5+kQu3+mwxldHBjy\nNzLjXbvo5PTnA73Jx5NNLll1Cq8biQEm5m5WKzd42AqSXGD05T3tS2d0UG5E\n380hgUaa7jQT2GkKq0iOMALLJopOvfQn6lVsk1rs3wvU6S4JwpuzL2tZqKfY\nTcZPOm5bGjGynku+Edrr4yblLQ/jpjTRrO3c2tXWjsa2LYwKFsd74AxTeXeO\nqB+vH1WlhWRcoYEuiZD/Jgj4mlrYikX/NnRnFZ8SICCY+EfAFBgWwi3A0qv0\naeSUj+NtFKaJCjr8PqiAq738BLMA05pFqZ/xkaRSZmPut1hxPsMQhL+xd3es\nAUQClmJVgyG0N9rKfbVlfq2xNYfsJA/4cZmTspRhYRcP69nUPwcwxlX6tacp\nYcF9\r\n=UoLy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-859fdb8-1617480979946_1617481040595_0.407967302701179","host":"s3://npm-registry-packages"}},"1.1.0-canary-8f3e3d5-1617578043426":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-8f3e3d5-1617578043426","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-8f3e3d5-1617578043426","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f24b65f4b6a52cc65989a29e4c1c80a86accbe15","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-8f3e3d5-1617578043426.tgz","fileCount":7,"integrity":"sha512-W112ylT1QVTkhsBLASrWrWI5Xt2DgEJ+CHWWzmmg7CMpEweojxG0+PcyM7dk2ny6TngMFcJYvSFnVIFra0ZTnA==","signatures":[{"sig":"MEQCIHlMbEweUr5/Ayxd0CIqYLtJE6bX/IIlyLiE2nS/F54JAiBAgipCxANogXRQ9ekhUgwlG/8sC95HVTOQ54m0ywj/LA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgakh6CRA9TVsSAnZWagAAUy8P/i4g8CDFPgmyPTQM+1t/\nNZ9ej0tB6W7dbN5SC2Z2XB3pRi31h3+WQDoocQUFu5R8zGR4OpdhkrzfXcRS\ncwoEbH5enSSh4/VbrvGWc7xatruX5vDmFGMM0P1ZKOHdyae6FGXwHpt+HQG7\njZOxCkL3lxmZJkcrTJ1gt1vgM6YV7DSq8m6VGstogOWN2dstE+W22oBipAnG\nKGebJwAqtLPiAEyP0qi3kNHC6ZabEa2a2LcgcXFHAaYyNLOnh5NfmQVMAm7s\nIX0g4uaNcydRruXtpHt5DzO1T5uXKAC4mcvWSGOWKQW5p5o6s2Sjf96e5EKS\nYBMEDRBWZpenz4waTQyy5K58W2d0GdUEM0bpCyFibxnK7OZeRGqic532oaJ6\nkUoUQn1s77LwIrCUSGfIU1YcHHrKwjSL3WwVfJGp6+hdbdaHGGK/kuiJoNNQ\naKZAQh3JTfxPn52J20tebKYi5GQsqVwNWwilt5bJGjE1JUonGyDTRENf948c\nVUuXK6Gk7OtUTiP8/9tOiEQOpp9E/PDO/BnZEJ/ux+39KziMMoao9/qAjjBM\n+AmAWMgCb5ZWpunUXiwno6TItDPC9ZdA17YWw9c3FUfsp0oxp6SS9lhHCw4F\nYPrAplN+F28xjVJpvPZRgzlQ6i/YRSZA5MKbKznV/fq7mgGWqmLSw1Ijfa8I\nkOvh\r\n=oXVL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.1.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-8f3e3d5-1617578043426_1617578105812_0.18312887900982222","host":"s3://npm-registry-packages"}},"1.1.0-canary-33f11d5-1617647139795":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-33f11d5-1617647139795","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-33f11d5-1617647139795","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0cf9b7719164c8fb74b81ac16a3cb53c27689841","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-33f11d5-1617647139795.tgz","fileCount":7,"integrity":"sha512-V7dS9AsSQEpHXXhL++yN4KDwmCCTG+tQ//QidW5a9e9ZnwuE9J6R3FY6eWfqK2ZTtkYofq0T8o6izcBNj+4KcQ==","signatures":[{"sig":"MEQCIFT7IWxp+sB5YQ6ZtamfR2W9XlVEsbSgIFE3L0F0uLQMAiA9Uy1RrUPF4EaWgwuPkjxiry+hTBumuz2YOxpmWSkNPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga1ZfCRA9TVsSAnZWagAA5BgP/ij3wJZCsoXW+iuRo6SQ\njIIKEUrIa9FxQQq1Ypysb4IJx1HpFP/gseiK6Jbmo5YP+Pi0XDb3AhjgbYXO\nJKkk//drE0PpgxNr9clM31cP2kd9zbqTkuNybgkpRaXYRMw068rE/Od8sNX8\n8CeYxr59T8hmvz45tNg7uRcLsERfG9Kj1jcreDQZRZFcCkFUsI1TpiTjeelJ\nXT4bfDBpUtBtWjXtThXxo12efUjOhukYHT4suQMXEERiwxyDYi/QvyRynTGm\ngzGegc6s57nnN370lCaqMaV7EA5PfYOFZS2d2fd/cGLzgicjPh6S4x4xmQsc\n8k3x5Bo7X3JXZEBRlAhy5GbN7FDtL6qz6akPBeyoAN4mOVeKkby0Q+EW6DVB\nG1RbTBCnW0iI8Nig4A3t5EKdQIAdTcWmRKg+eiyoVz7ukffvml6sYQBOjVHV\nK+4CPMIyfH6VcgYeivB8FFOKFBZKKF+n4FF/I1hFo9BlPoQyYneYFlt3UH0P\nHDmTotr8oECCETW0GbmGPhuM5eB7j8PaYl7fNDpxndK/1/Mx9M1VLK6qCm8w\nHKnT7fFNDkTfvZq8re1czwu+C5eONIGfNHy5ujeq6ioXZJqAq7ITzbCCHYZB\nmJf2tCJHEzCbOljTrR696MM2tqOkabs8cZqSbdTEtO3i9dsO7w6TrOoJr5Q2\nMtWG\r\n=P2ZN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-33f11d5-1617647139795_1617647199348_0.8718115974830842","host":"s3://npm-registry-packages"}},"1.1.0-canary-f16d3d2-1617698458777":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f16d3d2-1617698458777","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f16d3d2-1617698458777","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2f1d0308e8f3831606a048024dd3670e4aed8879","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f16d3d2-1617698458777.tgz","fileCount":7,"integrity":"sha512-LxdYTNaOcqpUAn5mlWducATkcsxxU006hgiDJ1hOhh5m/D/6OH/3he1u++W+SYU4Q6WFW9M5ukXEBkuqfmqTUw==","signatures":[{"sig":"MEQCIE7lfvc+7oaNRAE5+Lpa2COxhKTuiswUpi9khHPbctXRAiB2v8Dkik+F+3LGWEmmWFcLr7ZUi+G/8IwriSCqEBpz1g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbB7ICRA9TVsSAnZWagAAuBkP+wQXAuj4qAxTI8MHjxhJ\nR3EVcaV8DT5jMQpyR1IFV6L4QPETk4VjqH0Y6/6OYvMABmJVV8PHgI5EfhX5\nMlMBSt97KVj2IcUztYTZVxnZqaFtJhpuzHtYPtWKtL4QEWSdNYNIjzdr0+u/\net/e2dM1uHQ0E75U7MVkGSPo945IVPvVT27DC9vO7qdaRWMr3PaLfFtpTNmK\nTKEOwsgXPCHvSq7kFebR3okYpUxTkTUuAXoy4bSy5newx1UkOHio4lw8B61u\n8rdGegByifQ+09mWwLjvHdayt1FTol3JRqSqZyVZf9PSdSJKigDULYji6YWI\nApTR6bfpX8el6aVrd6C39kSoNmJamjxTlmyYdPMOUpe+Lno/o+LAwcRz0PqH\nQbwEr+3EPdViuFF/jbvOQP2yS228Vz1fAMrdqIiTPwq6nFJTap5qFM8PUBf+\nQrIgXpuQ5SFAuzXLn07RuKm/tfnlnlUtLRlPY3db1/XveYl0EJycMH5eXvkH\n0ltS+OB+Ikixwo83nf3hZlVge56GQ4n0IpOy9lnEuHVM5od9ExmihsaJ94Yj\nzho2qLhQ9YmZxxXF5MQgdKhDqfzLQprTmyrP0XoWrCwqSrxIwPm28/sZiOMd\nL1zo+Ofv24p8NaFAuiGVZ1WPxjBbPK6574gd9OMkwRBIl9Mcp3W9HZz1xbMf\n9e6t\r\n=SjT4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.3","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f16d3d2-1617698458777_1617698504479_0.9000885624176489","host":"s3://npm-registry-packages"}},"1.1.0-canary-f5ed39b-1617821864885":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f5ed39b-1617821864885","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f5ed39b-1617821864885","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"50b643c94aac964bcac76bbaf8d9072e57809136","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f5ed39b-1617821864885.tgz","fileCount":7,"integrity":"sha512-/hlSo0gSupC0q/+mAm4f2NBk1FngMUIKARneAsGGf7NHLtx/CR2/B7XhBEp6xFbiDUhBlMXcD78aVLlGL5ODRg==","signatures":[{"sig":"MEQCIDAvG36yaDiTRjlLN6Vo+PwXh9RACKcJugxqJAomAVr1AiBo3J/cda6Tp8xaVP01KVTeIS2Hz676I7Ect5KE5++zCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbgDeCRA9TVsSAnZWagAAWkgP/1cw/633mMtuy9+rf3JE\nh/NVTAh2yqwnWEpdl+SE/3MqN0DUXw11G7v1WF1sST4kySG993GAvKsmln1S\nkyfAUADYzdvVvW3ipglA7fOYFsCNHJf2asyPTKebTydjqDRWiu4ivH3lZpb5\nkSc8ksY9YqXl8VHHdtVCONj2Or91o56imT9HU3EHhGB7Nh7eEMDr+quWC2qD\nemTMkVwHOypUnj1/cPI3OF3ekvdF+Nrze/5tVHdjcE2QkxOLAzWKnxHgPd4K\njdpAySEP0wQhtcYujHkuc74HmG3YZkWtsO/qswHfUZxm7tP7wsBVkEsMDWQQ\nMvMdJfNc98rv4uQzeAGmSruCk7v04HVO9jTWL/+7zo8pnNHwgZYVOvy75QUC\n8701W2XMlHzaelmt1wFFgeDWI8ACnnjOSarC76S2wvHuqBQxKRi4LJYcNC6U\nuTwBQ3DvF/ojw9x4fHPOLNopAxbzrdOG3Nk0xtrrBXQpLqWIzY9Ru91cWSrB\n1VhaVmlDPhWVpky7b6DUWfdG14jv5Bx/20YAvuyWHxWdqlUckJdJtjur08lS\n0qarr1LVyMXsMr3hbAxHKEH9ltuhyD9DSLSHZxzd6UkVBjZYG1jepxnZFUcN\nc0eztnSt/O7Cu7tsJ6fWjmlQbV/9aUbQ+e0oLry6pBwXhozh9gM4EIp4mUlv\nxAjU\r\n=Uslq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f5ed39b-1617821864885_1617821918541_0.717729480275876","host":"s3://npm-registry-packages"}},"1.1.0-canary-89de927-1617920152491":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-89de927-1617920152491","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-89de927-1617920152491","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"54b2a0f5339e1c46da1830c9e6b1892d08350629","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-89de927-1617920152491.tgz","fileCount":7,"integrity":"sha512-osfTFA0NnHlJQXraw/whbLMUMt+LU4AdhMHzUzjhr4y9W4R6j3RVlPxGmeU1paO6ZxMAUWxb+K8z+odzV/wziA==","signatures":[{"sig":"MEUCIGnoSnYgZi1eoeN/YKOFzfYfJM7Cq7WA559xyROzOILJAiEAhtnpJFTyRhkqbcIiDBj5ze2zjRN3YR2xqK3bOiGaSQY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb4DQCRA9TVsSAnZWagAAq6kP/38UKfnSm6sDvHE37NQR\n/KydJ0d4JWRtDJF2LbWzRx93AuBBxdVNq/i1K96LUldSclF9eAP/b9+UdTr8\nd/1AxNPZrdooEDrX86iMbj8Yj+n3MtcmuQpihoy8T1iabiHL81X2NoxaunKO\nQ5Z3rBGQXyyX+JVxRbPmawgHwZVlUxk5LPo5nEDZDCu6mGohvAv9c5MFtNih\nm4KrngTyYouaYUDnKbbhI6Itfec8QRvSGp79Fm27Nya331E7vsH7Nra2cPHi\nw4WouzbzVshmtE2jutgtXB8YJ6IJvVc5MBYu/1TEs1EuvsBZFx+CL+/CAywr\n9bavAwZqyGe6thi5vw3gAkbwD8ITs1g6qpIC3q/blDK+Wv22mwG3izMV51ur\nLMn2bs5Z0k75XK4tXeqfVrmeQNeODkNi/94D5dJ+BvPe5XVaUQY0WlD2zQgk\nPVkQyyEEDPPQmjT/W86dgDUkgYQjpFkZMnmruxkiXcIY9bu0Uo6c7bSAtBlQ\nK41BLUPQ4bYUlkNG3ciBPbXOqTF3a3LEvAwQf5xUsjOJOaeJsjAe0JL1bcxM\n/dDCodpO0m3UKLlTBKr0d1DAlONWpRe4SMXfBa2hJWEEhP4zJBLvXqi6a9SC\ntJ//Y4DjryYbR1cTQNx994INAz3PqEBT8ZcZHayLyvL22UtDKeEof0JmyRTL\no3x2\r\n=EDxC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.23.0","rollup":"^2.44.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-89de927-1617920152491_1617920207664_0.17704810567749152","host":"s3://npm-registry-packages"}},"1.1.0-canary-b4ecdb3-1617945939700":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b4ecdb3-1617945939700","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b4ecdb3-1617945939700","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4ee2e31a70109dccd1b545b50cf343462f744525","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b4ecdb3-1617945939700.tgz","fileCount":7,"integrity":"sha512-mWOtKAinEwlbvISdq8Yy9ZuqERgPCinjF1Sh9fBDIEqA9i/MnkVLTBQ7zK4rh47eZpTam2mBGd02l87lszTB+w==","signatures":[{"sig":"MEYCIQCDKrj+ZHDbTLkaUVdeIcqwddHKrRRvTtiATwttGpS5DQIhANrZummTwTzEzZdm9uWqReJLSCpoXI/gW27w1Zf9MDbe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb+WECRA9TVsSAnZWagAAhuAP/0h/zTgs4NAWJjLYhgPR\nvS4lX7XqfXWUwKAOnsOtlqQaHrO9UbeB3tgOMU2fvkxbFgivpP8iZV7cpv6v\nB1M6bE6zAZs/is0Ts79sv2ltAnWCXZByyQbbHk5i1VAiuI6T4vGAJe+8NFzw\nxaeOzAUDR6jhnk/GVTZqmSEgfXODMWtZ6bi/m0K89DTTjbLFK+Z8vNuYtnE6\n+RcAiOu3khQT4go5kaqxTuzlojH7mPcuGMw2zk5zH+v/6q1hzOnxHRW/yV94\n3+Nf331WU59dS3rTBG3Rx/u2rjPXRvnJkOXWzYgv2TzVW4iUWW4OJf+Mp0eU\naMkgI0Nx055lrfilr/VW/HwANgx3ZT7IDW5K5St+MoiJ8J0ig6AZKMYektRL\njND94XPCJ6x/jgt7V0Ea2/9ftwHpebY6Dy9kezlg7LRQA5Ztd9UKRGP+qd6S\nBGRDYcpBuRjAbWCSB1jmn+NivAAhGh250GdrLg5oD/VBWHA0n0tkePTXeh3U\ndzPTmOMxqnXxeOuUfvo1J7dx2OvwqL1syr2a+3FOl0s/C/1nMmhLoqXWUQP/\nKgMdpfwwy9ddKnsRAGBNLBTRZoJ1hSQLA6UZP773MvZvg1Qc/6ukHGbkJaIA\nXfNuKcR4F1uJnES7T1vl8+YihCH1vsGThoB6ILPjKJbGLHScq/UtEFxtkfHA\n6A7j\r\n=65uH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.23.0","rollup":"^2.45.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b4ecdb3-1617945939700_1617945988315_0.20585583790165907","host":"s3://npm-registry-packages"}},"1.1.0-canary-b4ecdb3-1617945941787":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b4ecdb3-1617945941787","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b4ecdb3-1617945941787","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0f57a3681a76d8514db068ee95a1a84c1e2fbf6f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b4ecdb3-1617945941787.tgz","fileCount":7,"integrity":"sha512-2d2jhvGvUJXde9umoqHCCOvVtoYqEo52/XjgWgk3MnumavTgAA/nqw+2fFTfP8PdaSaFzkscSSETtt+RtUwYTA==","signatures":[{"sig":"MEUCIByFw3p32GXhBbk9E3H/8OE3eMnM78gw9bRQVu/CsEhXAiEA1VX6QyLFumguHAlwVVWj3kb5W/TEQZP5JzOqqZzhP8w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgb+WNCRA9TVsSAnZWagAAqh0P/1NTZhMTSbAAK2szoOPb\nV1qaX7wL4MhJlf2RbtgkJWNVZjcw7zR5Yb4dAUylD8WTBSnydSqUmsI8ddq+\njs0RMdA9FxsCYKyjbgyBUzvGjrVmQ+w5SQ3pp89KQF/kVJTKD9gk3hyNFU1c\nHOp8qOKrqqxFkXJVKUT6A5MG9FO5bTnTXTpl+WxLryVLxbgRnuHCjyA+TQHR\nhAB9Q4Nonf7roE3uLPFk4Ii1wc0JXpLs9wmZNfQIpfl9KN1e31P/VqITVGIv\nHRp5cHWcgfxccyTQhstT7JhwvYPBDEzu2fKw0kVeUtdtz8N8GVktNxiTmtW3\nHOcSB1ZFmbidtmLmdXXY9vk/ty7t1Jbc9XQ78SczddxIwVVEKgn3x1YOGtT1\n/hwcuVT+wTz21aJwyfQNmvM/y9Dkjk8DreQ6n3h1cOk0wwl4BLYloA8Ew0Pk\nTbPzjIXzYnlEB7aqrrfcVlbxrtLABC+a3Nubh1mhOHcIfjCcR9aO6GB2Ebx9\ny8YN505O92MfQby0SFv11qURPPwq3rS8cn32dh3qJYEFNRHRoRVdkviMnykp\nsrqrxzf56ek0vw1+dFI7yhzlDgdkfxSTxUxRPbJ6dXsQpGxRrAC89N0m+fq9\nXn//wc22XBEVw/k5ByQ8wmEp18tXpZ2itUnZko97KJHUubpWjTekZvWwL30a\n/qql\r\n=kxkF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.23.0","rollup":"^2.45.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b4ecdb3-1617945941787_1617945996899_0.45941801422912865","host":"s3://npm-registry-packages"}},"1.1.0-canary-6448d73-1618006524391":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6448d73-1618006524391","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6448d73-1618006524391","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6b7d200def7a14ad09d997f957ee06925a825992","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6448d73-1618006524391.tgz","fileCount":7,"integrity":"sha512-kkU/+gT7hxZYXfV+XYgb40xdrasgax/54vCzgjK/5ZFbCwOb+MwaG7ZWM92mFrZwzhG0UZTnDLLZZjepa+rN6Q==","signatures":[{"sig":"MEUCIBDH4klCMV28FmsCzJ+oqlStur/Zkm+ri6s2ttR7pEaLAiEA+dYFl7uxYbu8xol77XPJqctifRdsHqP10wxOYTz4ulo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcNIyCRA9TVsSAnZWagAAKZIQAKQ9mL8HMjOfpE36MvRI\nZD6EYFUQvCIOxYgFM+NIKxKP8bzotgVD6S1tnols7z6nIKr3KjSSoI7ET282\njKYXYmb11b7FF70mIpt8d5nOTbO/dYg+NAq0N2BFJ0/huAagtJFpaDYjJFnW\nnB59s18KXB9ObCucxg5YjLtG/8ekJUzotWFPNtB8/0sq4m2SwQ8YWDMaslkN\nO2jczV04ycVVsTj8GvH7qO7c57wA3B9VQ51YTQRZKGdLyZWkf8nhrqaSL1/n\nOJjTT+dd0SevlcRZrXlyPaIPUgR1w9OxQIoP8YkTUAbPXNZ9iIIGkOVm9lph\nuWjXO7sZnX+F5LVxryAj1sHg3iE8mwUQYK/+YJcshq0glzajcwrLYygACsX5\n1hHPOdN74asSfs5bVmlUPfnfZzpplpk3lnn9szF5PgBeBRmv47W3UnvAREMo\nKPjQP7NvyGAL8GouPdUROtFDr07P4cFtrHPky81HknYaSyr5sspkh4ufYlPy\nKq7fMIr82eMiAFsrRf0eZ3J7oOIJjO7knnVZ5IKfDg9k9fMI1vur5C5OjnGI\n5bJKN4Jb25rJwy8S/nKHl+jcqVEY5y+TbNXVsb5huu5qTCS4M2RRxxdsg03q\n7BFaVBYrJYJX1NCKXEOzFQNh41+9aakVGIo0cNhaz0w/b6dUMYh2eLFaRC1X\nENeH\r\n=q2nT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6448d73-1618006524391_1618006578041_0.6174338089269236","host":"s3://npm-registry-packages"}},"1.1.0-canary-6448d73-1618006533832":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6448d73-1618006533832","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6448d73-1618006533832","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fbda57919eb157b31be41890e487075216f33043","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6448d73-1618006533832.tgz","fileCount":7,"integrity":"sha512-Y5SRVWoKtXMGnUAmdszyB7j9Jk0MZ9njMiB/3fWa/afqVtmO6wv1ACbGlteWnp44LKY5TY6EQYMXoE1nZINpbQ==","signatures":[{"sig":"MEUCIEWGjwwBLOJZB0kpeh9d0I61W8fohedPAkzuJR0F3QicAiEAzOekGzV2WBnxdmog9NOwzsv8sauh75iBIiT5CtgWaYo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcNJCCRA9TVsSAnZWagAArEAP/Rd3fQ2g6Zc+43R7vYzA\nrmq30QlMQU4Fbpm537wzpFMgtZ0RhzMd3vccX1BXnQzLOzm6axlobk+nmKJu\n5jLs+nt8nrMPME0s0wid/WG8ajgB7tpCtHJTVbi5yvOKGkbPGVDgYFimJtGP\ntb49B7SETqHdIN+7m5Lh1IVUIbdMJhrYYH/YxeuznaGgBQF1Z3qL1uOvOWY8\nrF7yXHEcPsC+5UM/CVOS0mU7FGs6s9jMUQPwho7dUn/uOHi3mqSNodugH19/\n3ddchhpj4JwhLk7Mnu9sFiGBhCh1f88Lp4nJ/dl7RL9pd7VJJvhM2YzO/ShR\n2EdtNDyWooqim/TRDFCoeAGdc63SMtvTPCXmySiWl1a/qXKhCn2NoKCrQUA9\nxNJyhn4Yy7DJsYvZhOWwvJePnjPXAS6pElhNFO3xrM/CqsakbK+BIse5S4FN\nUd9CyEoT/UFuRJ7u8dilxx/Q1c92VazNW6Fkp+M5zYN1/Qiu3Zs4bNUEcs8u\niPo9xQZFaYMiTEM0qWx4bx4qmc+imi0+zWX5R1Owa/CObj6Eu5SIzCsKLWwy\nTTM8162wvq8pxbI44BtnMjmU/nK4zoLkF/Il79Iykzsqfalrq4F4/NegDsgW\nsDFIV3WFZPb+6kZS3n5n225Ym1J54c9c2IkmK1E/xV6rlgnMo4L1NsDatVa5\nkQGL\r\n=eJxf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.0","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6448d73-1618006533832_1618006594137_0.21483684020107474","host":"s3://npm-registry-packages"}},"1.1.0-canary-d54f916-1618031918917":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d54f916-1618031918917","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d54f916-1618031918917","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2124300172f3cd7365b1b3f4cef0fc46a499f9cb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d54f916-1618031918917.tgz","fileCount":7,"integrity":"sha512-5Tnro894PoY8QDaJN4XK6TbljyW34OYuhMjw9Fv51P0Rb6Xan+Gj9VxRkI6MBKobJSlE20kNSI7qstbaudubmg==","signatures":[{"sig":"MEUCIQD6uq3BT5j3LuX28fvf7qE0f3d+MrBaISdYA8US0mhWlQIgfyLvlrxmUWGwhQ/8ozi4ToFZ+L6F1ZOrps/r9h6jz+8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcTV0CRA9TVsSAnZWagAAmIEP/jeRr6fWWj0cww/aHFcm\nGioHM7onL4sjnjUrJWeEuPG3hAiQOImqsDmm+5pK89RTSW/5grgD9VRDyFD0\n5urkm/SYPq/lee+fRCdjlKJct9J+fqFjDjYY7mKryqkgZE8qHHK41cmZ9i7I\nq08ZlQVvdPL5u+P0HRRREJJ8E2xSfWPjnYBYpS8OJ48PUI2U38Aq+2VwG1BO\nLqif4qYKFiLOYN3F/yavYm68t9wUeMaBn8kgvf6ZofbRawzLwfu1WkuVZBGp\nX6Gbmnly3pMKa6eVVZ1sV7aRXdycXkiRQTcECa/ryBEQPeAf74YbLj7y4sUk\nu+W28tIIiEs4PNcqhMS9zSgAsVBRB8Mc3+DgEm30zcDc+9scEKHZ4hi7lV7j\nQ++pPbCL+c0VJErCVoeZIQUxJM2ZfDTW9XUmhE98UhmQ5P1nAIQHqXsj2z4E\nc42en4yy4WoHYS//jIKLT/vc5cbDEuTkB2eguxo0llH8GBc1aQbR7ei9Vuhj\nPqOyM9A2ezm5E1hw2s/wGcg+fCHmLGGpcpHcXHp7InHPcAAVmQPhm4GsFbgx\nrcklpnLrWvXgzsXaXG77jSzRpU+qScwnH4MaKikno8uOhpTsHMqD1CAzJQGg\n+oRZsYIfRrpcqeCUPtOHIWkhM1M+bKEyQ2sLWsvnA7spDXFMJNfH9yqREhQG\nESR/\r\n=UWsv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.1","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d54f916-1618031918917_1618031987510_0.6428214057898594","host":"s3://npm-registry-packages"}},"1.1.0-canary-d54f916-1618031917553":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d54f916-1618031917553","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d54f916-1618031917553","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6ac2f6c2e6d63b61fa4d6db9dd96c0fcb6a122ab","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d54f916-1618031917553.tgz","fileCount":7,"integrity":"sha512-s94LHuzJgh2M7G7JqET7DOhxzte54tvC1HuZbnvSBHn3MHa4eJ9gC/Bl1TLnV/6zy+DekwiFkc4Q3xQD0D6O+A==","signatures":[{"sig":"MEUCIQDlYHDB2KsssAT1VFCOvqPIpyDO1u+w8/MDX2SIIhiuXwIgGlwhcot9wgIyY3hZcl0an3P5e++NeYidv+H3iGV8Zmc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcTV7CRA9TVsSAnZWagAANAUP+QAjL4cS8FXvqSU7+7KX\na3YEVo13MhPI+lgHz6GnhBsq2Y+5JKQSs3NqLgqhsksLy6wDbZwvdG9G8nie\nG6FcWDKPKyP2FP6RFCAVX+g7N+ND9n7UNUdaHCN6BEhqs/P59QZeWmPCKWlW\nqWlSscZgSRrggIjGEl6Jxk84yXBGbrURAy7HxoTdZcjR0q2t1YJQndYqqSg4\n4p/98A1P7FkrQpoLlsP9JSXoqn+cN/5DgatOYFqUNGKTOSUHEa6CpYV3KMb3\nIMCiBOSCNPFWoHF8S/NQg0JHx0CYHpw1pPPYmjSSfsz8N6SyTyipaV8xhISQ\nHKlUBm26HBoqnPkKR1Is/ZoaicXNkiyHi0yKvJzInpNn7+n3FBERMU02VXYn\nIJ96ARLCpLmh8KcoceqnQZjmOfgp7VTbC+DbsoAeuwvUyPaMH7TsguDvzlrr\nvnl1MzcMKLqD+gZUKn8741RlLNaaO1qPQUvtfBzpeZfuYt3xrPhV8GF+DA3/\ncflLLoPYKzenKe1nqtuxQRe/jUBYZ+voiiaDaU4KcWKU24x7FuDPK4wliU3V\neXSxuULYAXLmCIK95Jm85urBENW/lWrBZPnQXZVq/FLIzeiC5g7F8DtLNbZi\nTj1Mm9myCgUMeIlUxRNYwGYelh1Bwd2A0r3IMJdbX4sl5TRUhSNgpBd32VDX\nhxEe\r\n=nEsk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.1","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d54f916-1618031917553_1618031994496_0.03317725640898028","host":"s3://npm-registry-packages"}},"1.1.0-canary-206f710-1618179827866":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-206f710-1618179827866","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-206f710-1618179827866","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0ff30af889d5cf3a45ff24d9ad48491d573fe12f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-206f710-1618179827866.tgz","fileCount":7,"integrity":"sha512-RQhMwcAuAPLUT4Jle13n0u3p2FIRZs3tsoDZwwsdnLQphb8F9Uce81hL2IewLX6y9cg2mseqotEC2qTBFOrUdw==","signatures":[{"sig":"MEUCIQC8loObDtgmyXGtXtB7s9U57GLY8cAD8rbkNkO0CySzJQIgd7YksZRCaO8CwoJS74EDJk1N724CN7rUSMDYF5okudk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc3cjCRA9TVsSAnZWagAAsdMP/3YG1T40Tyy9L4LI1l9U\nfaHhG8fge++AmTk9sNoOwQBMiUtYqdY5sisgvBPE9TpB+mB2yR++4/n017k9\n0JsOA2hgtqDtYP9fT00LDgX+lRAgPcqpO1HPlP+kWWRio4TF37LTUz2kv9jz\nzpmPfGHedJQaMNVEJDYWoWPQzFggsJYS4Pc1LSju8634+Umzj8edkiiww0wJ\nrLwsQnWlG1p3hlsiehkOoTl63MueMyfzU1HOjUzeLT7HXCeNAwXzb5yRgWJw\ny0n981VnOWLPvDuD1I1c7WZ+JylN9PZV/EQbXK26MFCOOrB7gzjfejm2BEes\n2Gi7w0KSRg7sg9NzTz0wCIWf+sHWslMftDdLT+eaYqTWaROA3JGaUr78V4wz\n7LES9nzmHu9Ky2i6oXXYCYUpqZpY3o/rI2b/FgOx9uuBVERAdQ4gyx7cPQpM\nd3RTSyCPVEgp7OdFAcoRrQa0XXb1H12DgCStSwzGko1OC9D4g+lpes82UBJ/\n01CC6aKTie4lm4xhGJYMJsppDxx8r4aKNcukTlxnQwzGmG1nAinmh7xhO4h+\nUfPCFeYezVO6rJxqaB3pMq/oUgYqfbXISIkLJpSqb3tcp/FIvXPRAett0fiH\nV8fI5B7A4UHBL/I1JhGc93URRUFr8H/l/vGUNp+yguKvSjEVLPWMq1NC5wJQ\nxRtU\r\n=PEBd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.1","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-206f710-1618179827866_1618179874694_0.44091013892977315","host":"s3://npm-registry-packages"}},"1.1.0-canary-ee1dda0-1618292061614":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-ee1dda0-1618292061614","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-ee1dda0-1618292061614","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b478e9a14c3273e458af9e51c18d3e1aab66680d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-ee1dda0-1618292061614.tgz","fileCount":7,"integrity":"sha512-sCn9w3GVYHIUpMFI3AMx/TyO8yJ9QNKeMlW8x4J4pR/h2Sgseb5N/QTBtH9vxZP8UGo4tLhWjKuk51ORn5crAw==","signatures":[{"sig":"MEYCIQDUAoxPWIwoEKL4p53jkAEkfnTXb9TO0On9CmFtjO8OAQIhAOEdrn7vzGMpIv4TRmHfrMArpdyMI5gtIQ5jlHImBZmx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdS2XCRA9TVsSAnZWagAAPrgP/03zRVHdKgS9hd8F6vfe\nHcT+jNc91JyOt0KTL+MZVpQCEZCyPrgfri5xkpWYJWNjRPGqWbeqvVHg27Eb\nbQa8nFJ81Y+2p42Or/oBbWZaEJSMBSqF9afR2R13lyZHQkQ00VgbTuvZh0Fo\nM6nlTrvnxpZre2VxdSzqm7EhzUO3BjvWES2CiZG/3VeSmh24Ehp4uOKNJrjq\nsDX5XphX4M8EnT8IkhA3UTNyx1r+GEBsRHTn69+6OHzZJY00e/kcvmU8KiMd\nucN1bffV2D9we+V4IUnAH434cA/FD61k0LTK8G3ssq/tqOoiCF6u1A4A72jO\nEP6/7U3RWFCVr3mPHIr1CbPatOz5rNvj/erDPVfEd1OmuqMr7sHGill7BwMH\nkYiO9pLC0zUpRdEpKFfVG2yqq1XbX8C4cXcFa0kbFPFssZfNSCi/DPzTNPfV\nrxnDopfTjIK6tN1BhxgN7xuRJmVbxOyvOXi7XzwEx0i45bOaNIydN8ucmj+3\nQLfq9YKUyjrMSl1Az/i06Tg/7Ik+WfKXowNqgK9rzxXNGlKSL2BVR84roVM7\n1LGxYj94qOjrbOOfcmU0u3y5qsYm6Q/pNELbniLD9rXkkQQ+cF/urB4q3WVq\nd445EgIIHNrjm34dvP7ElfOWlu/31LZwx1JmKu8w/2b5iMhlQAxa9aLJZ/wm\nYo4F\r\n=B1FT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-ee1dda0-1618292061614_1618292118927_0.5312405351098075","host":"s3://npm-registry-packages"}},"1.1.0-canary-ee1dda0-1618292072515":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-ee1dda0-1618292072515","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-ee1dda0-1618292072515","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d8182aa4b22c8c41c478169e9c9327eacd4ee535","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-ee1dda0-1618292072515.tgz","fileCount":7,"integrity":"sha512-gvaUC4oji92PFoy9T2XPuCYq6eki3W3WFg0koytlyrgUtt72jv7o7/HzC5SsSHkSMic5Ay1muH/eqNw7gr8hBA==","signatures":[{"sig":"MEYCIQCy9mD+AnVaZeFAZaXJba98Dv2ElVZfz8dhDYaJ2y6DGAIhAO6X6LMWRaLotGfr34FfJWhNebcsTlSjUm1CUthXNuDh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdS2kCRA9TVsSAnZWagAA5RkP/0clMKO0rJA7V0gZlNZM\nbV3TmoBmyVzacdKnek1mbsPPbaD1aTwF1uDd/OvT28Kf6sn5fqdKYjagi0Nu\nn1GO2yR2S9y6xeMVU/jPJvN+p4Gqnn6r4WllX/dfeZ6/BXNnVA4DIOy800hD\n7DqfAi/2d2YxypU4pC2ESozFH9qoeBr+Ub8+0x8xz1z7S2LpbCpoHYnD2+m9\nEXzEMgQDZYw0KZbmFfrXCTRFL3Al24UBKTmL8h2u2857p4PgBosu7abHK6ip\nKGRT8z0vtgtdxk7yoFcZPp+gtp02pvBTkTJ2G/msfJREUjQIGz7//WYPzKos\nHaPM0MBP+IyZTtszu6BBHGGtF10yrk9J7eCZNqTPaQdZNLdUhBLkR3+hP+YU\ns/c/boLwXLGuMtnPO4TKE0a1JWbAoydurVGLl3UETBIhI2jC4nnvkFBxx+wm\nSztD6NwB2mykt9f4OEmbWEDYR5lcpDVrEjMRecJ0zERLU69ssqI7hIGBTpEL\nRoKXkEwhZUdR8+vzsLLXgsYQZP4fRVTFPLUD8aRsG4aG6nk/PD+e/gPeS5My\nUrvP7ZzoAze2RxfZn6xdboEIiPDHVdG/61hWxUWR3erMtpvT4q9PcHncklAl\nBOffQ2BUfCm3O73EWtLW8W6zWdB9mowZOrRVlymXkYhiLpW6fSMTewGaS2lL\nLOZA\r\n=Y/qd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-ee1dda0-1618292072515_1618292131890_0.6953281670496323","host":"s3://npm-registry-packages"}},"1.1.0-canary-832ae77-1618352157518":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-832ae77-1618352157518","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-832ae77-1618352157518","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bfeb5494f890aa760ce0653c750d23e2fbf0260e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-832ae77-1618352157518.tgz","fileCount":7,"integrity":"sha512-5WAqctFJ5uwpIEJD3jNyY1myaRW+ZthEbQrmq27BSYntyiDipqMQT02RDRtlSpeyxYvUTMRdd0NIuriXmNEbFQ==","signatures":[{"sig":"MEQCIE8ka0hi1Aoj5U6Ot+glD37Y0L2ZOyXy4ytUhsv8ELluAiAyFfZetoS5KuI1QfAoY68/BiQR4TSNL6doF+G45luqOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdhhfCRA9TVsSAnZWagAAD50QAKC/Lwhiy7nBYbAfJ4Hq\nBeRJexZJyJz0RasBEFA14P5aXu4RmloKpMJyp+M75vl6/tQ6zITYxpc+LJYY\nE1D7hzY/lknOAajGUKhlx6e+274i1S9eRuShvSb3MH25ARcud+fOhdSZ4FDn\nAajUqjelsWe3rI+z1SPJEX5zt4wwbP3vofKMWBuhtCyVZExn34Ync09eRG8o\nhyretaD86LhgQTwYmcFVmwxTJfSy3i/zwlXLKuDx8Ici9x4jnfCTBNUlgE0G\nk4Tpj6btGAzcnIHFF6tt+SVof3U98Si8M3qLl7BkqtKUpkwPO8wc0a1Mukwh\npMNIRQQkK9gagEgdpG+ENY+GjZa6qqoRsXCRtOzfTfkjSMnLniRgCQC0Fgtz\nH7wyOOpG613lsQiKcrMUrutpDEOn7xJfOJ1tnoQ1UcW1Cr/hEtbLjeRV6ODK\nUHnhxHpKwERvIv7Do9Dil3M8LWuR9wap/AwGE+4bfLsoXNBtiIQ8ARzDJp/A\nz+hvRKzbuGX2JGdT73om2IuQ51UDTiRkVakiTnxD0A40AxLHNzUMXheXZRzg\neYhX6Og+zT3dmsBxTOq9EmJPLaZ+lxBevJ8dUem9QZrjXnxvLZGI+SKYfp5a\nqSFo0/LPKepdTpu+teORfzBsCTdZQx7l5fMnyYXqR1fEj0ZhXsQfd4vHlvVj\nhXlH\r\n=8VEp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.9.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-832ae77-1618352157518_1618352223323_0.6494743950206303","host":"s3://npm-registry-packages"}},"1.1.0-canary-01c3644-1618395596223":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-01c3644-1618395596223","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-01c3644-1618395596223","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"31a48da24dd217afaaa9db70169a797b832d5390","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-01c3644-1618395596223.tgz","fileCount":7,"integrity":"sha512-jK7Bv9MlgvFOpBrrKTKT1y3kvJJt8B10LRlet/NAXWX8duabvhy66wIqnC3eMzq021wfcgFqlQw2Y33ldV+sRw==","signatures":[{"sig":"MEQCICV+SxzmvZY000wR81HNV8uUtMkloD6zjFtCuRn18EunAiBDKdVWK3k+aFR972mAv/hvmLgcXdan87tiCXtzUqE5pg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdsIECRA9TVsSAnZWagAAvf8P/ixftY5Rbn/fEb/3E7SH\nk1sY4PdZaZdJ4Jo9Sy1Oc5AJncvkouEEOUMqdMpLnxis9NJgNvwNQRTaoEXN\nzWiRFDzxuR2KDGpuu73qYvNxx1mmFSp4da+q4EULZO1PYNoYvW3r4TR7GpuQ\nHx8AyILkIaxpzCzAYFvyXapkqrqKRbPeYHurVJEHo7lduU1EllbBUy8woaRy\ndYngQ7hy4zt0Am0rVaSjPNcS8GMP7NsraOrQtlvaXEAWgp5tFnhHg7CTvWM9\nhLW+mq2ahC7qnF9zJJCPoEaQyIrR+vHTMSdh/CjSVQOC5V/cC4zU7WeBLE6c\nfsRidHDhc5O0JsnxPzhftxrPMbvDBqk/b5s80gONyjmazNqqHQt2OEmkcU2K\n4OBSlBV/lZ1YvJl6tGAnEo2Z7I2jdwDdYEKddapJvo+ElhjjBetOQkfrQgGd\nXTksro0Qbf9iURTfAz7Pj339DLYRSQ6fCFalBK0a4kKRWhYOECl3RYdkX3+x\n7qsts7gJ7x5iEY3g9CmSwmdOE5qk4SBQezF7unPoDhlATVs3xI6sHwK8tuAp\nsDEmIZQOu/pDYKPST6Zu9W9iOm602QMUy7HW/rGFNdcMqxAz1h2taU1xH/oY\n+naA4uiwrhOCgiEMhG/hGP6AVCvaPtaBJojt2oXa0dnzwlkGC9ymSqqcoHez\n70lf\r\n=sL/x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.10.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-01c3644-1618395596223_1618395651647_0.541516044307168","host":"s3://npm-registry-packages"}},"1.1.0-canary-01c3644-1618395597586":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-01c3644-1618395597586","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-01c3644-1618395597586","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c4d7d49d0e54a709af638b9bc55ddf147486cd48","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-01c3644-1618395597586.tgz","fileCount":7,"integrity":"sha512-9GfmmmFk+eBlMh50ihVmNsqKc64M7mfbbgfgTMGRT7fZvOjmmTknDh3jPKfi4OJ9A94yt5aSp9jtwY7Urhiu4A==","signatures":[{"sig":"MEYCIQDQ0muZoh5gHXL7m3z5zcEu+YeAPRvp9LUJEWMtNiWvSQIhAK/4WjJEULXz4yoCjbb8K5+CSOTXLSy9kc1Piu0Pak8K","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdsINCRA9TVsSAnZWagAAIyAP/iO/qYn2755n3b4MIEqd\nmYy5p4Zfz4Yj/Zgad3GVHPn627Y8lPF5co7N0TbYWPUAe5V4gI5qkE/3siIi\nXl0uOGH6NwhTapdDySd//yIp3k1ZoZ7ggQWhbIz71NUy+7frchYkaxGubvF0\ne0aJMbuaXp9u2MYNBwR8/H0pOvmZH3PYo/fmeAYggWG55QEJ8DvuzESPHT65\nHdWhR7NgvXjuEzP7E66NjkNvolZOHXainMe1mI3APoSoVojXaOH9OiU0gavc\nmtpbJ4bM42PikPWh5i1lA8p6S8O4fzTzpGLU1aInSirYv5h3QJgiuc5nHrat\nKZ8/NmQLeMh0mNROwZvTH+TmcSypmi8tNrkoNLmvogKxxcLIt+r23ksced8N\nVua1Kpgiggye65ZRFBda6XZK/KPbZhhiXLdICYIOWGrjLHZLQe644wUX2FHH\n7lv4YCr/bM+cmsdSOKl/R0zn9y6Tfm1PJZ3XpHC/9p4kLS7o5ayFxAo+xFk4\n2d6JtLO7jLDB62IQyypMtXbT3oeveoNc3DS0JrpyG+nHJ+W0/NkiII/tThEu\nhSjaAakX5LpqBDG3rNd1cNJ33tfvQD+7R/zxEXTgU0Xul5lA8P/7lZfyJ3dw\ns2svTkU9Kzr9whsoAkn2pBW8GGPmhMAfsCZCPw6boJuUI6MQaLAo4tcKK1n9\nv0/+\r\n=MB7z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.11","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.0","dependencies":{"fp-ts":"^2.10.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-01c3644-1618395597586_1618395660498_0.3524217009691839","host":"s3://npm-registry-packages"}},"1.1.0-canary-9095bbb-1618482688248":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9095bbb-1618482688248","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9095bbb-1618482688248","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cdee53f3541a1b7fbcdcda2d5c1d9c6a32a624fb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9095bbb-1618482688248.tgz","fileCount":7,"integrity":"sha512-cru6QXZQUDCTaFtcsbgDPPxC69G+q3FKGrtGZ3XCN0XS1nVtLEnttTfVxGEvq8vwsJl+JvKSgcEIDfjm5ayhPg==","signatures":[{"sig":"MEYCIQDaVUwv+VC8s8o9Zv6Icp/nTwrUVy8/r+U7bDT4UPGEQAIhANpUoDryRmgnBwz5bFU4QmbVAzLrsnys3+6f4EtXshgi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBYyCRA9TVsSAnZWagAAdkkP/it1i4vJX2FPHSe8gz1u\n9J14BeJ32lfVUH2+nu1AetpVdMHP46h2soVRWvroksMpsxG/Ztih6SVRtV2M\nKJjyaDDx316k3Kz0yyOn/cwkWeC1iN/snJk8sg1R9Z4C39flinqWxtjdZgDp\nEj2KP/jgIASrLO5nsK9+nIeqY2athM8EvnzrVARqbJT6OyYYHymFnZxLJsVD\n46XALOiozqVWdlEVYxg2UOhjpRAIYej9TzuR+tertlJeznA6+8FmWTIHJ1vl\nJfIRR18tT7G6dEKmBCTcxq8jLZ3lRo+YuMcZzWEpnVlE48IieWxfWdUqfW48\n7DRTm6YHKUvdmOXSrTC/l7aPXxfkU/fJVhQ7t6XqdnU4Ri2j8e/EDWZKp1uH\nzprzv3iYzN7yUGGavWRc+gvYgriQ/7nI6jePcONN+M442x2go+isBogzEapj\nr2e/DLfjGY/t8oflEqSlV92s0cUt7t+6hRWUzgbAl7MrB+Av5NuAM4tbkVVL\nJQ7L5L9Fw4HNLfrNp5DhPOSss3UrXyVjPFEgvA2k2jqaQhimb8dvZkQkXYs5\nnxXYBsWyBkp+78Ho3ODs8ABxZjNqQ4VYBMNjt4JLHESRgKbIm4Ts8ohSmMmc\nppiurhE8VdE3NvwMWS5441UB2EBxBaD212R+wcLmNZm4HcPL72s05L4vz+np\nEAxe\r\n=z/4j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9095bbb-1618482688248_1618482737442_0.5088777614873761","host":"s3://npm-registry-packages"}},"1.1.0-canary-9095bbb-1618482685870":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9095bbb-1618482685870","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9095bbb-1618482685870","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7c5cdb069da3ffb73d57f5fffa80c7c27144f90c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9095bbb-1618482685870.tgz","fileCount":7,"integrity":"sha512-LS+gtSP7TEAmX1dSG0r5xJhgE/tN2x+Y/jJedoIrj/W9KdeLSuuAAEgJvu0vfRBv833V+VO031phWi8CjbN5bQ==","signatures":[{"sig":"MEQCID+/ATx21uP9R9Cw0vWYZ+Ll7ALDgLBmxg/qMRFHjbgqAiBIVheuLiugLtyKtKF17FvofeGbfD375RnIZKWl3zLdjA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBY+CRA9TVsSAnZWagAAfuUP/i1qoRIgUk7/PFI5k07d\nnYtU76eW4ms321PggKOEzhb2TENeHlOm2D8+iuUIs+dxsHAojq7BfwsZVFTe\nY+5wm6OhPNGLQ02JWeRbzK308RpYY9i8z9lntW5EtrPDCA5CTy85P3f/+/Eb\nqDcz7ebmF+QH5r0KhP4HgMfdIAdKuG4U+IPP8LU/IOs0xb/HZcW3hC/T7LSi\n8ytDwYr9nSV5paRvtGOnz3b18FG1kIEWcMya5rZ9sllubeLj0GGFC4lselk6\nqnF/ykbJ2lDDq+ISNC3TqudI5SbdnDnuU54nuV6TZBXXVSpyqSeHzb5kqlfv\nc7PpG1aV2iySCmvSZE4xUcuVnOtv40i3/b9E4rUh/EYlguLABgKnFaAzYck0\nxQk+xbgUsVUe2SDMASiGBvMpYUlauqz9QUoGzkH6c3hnffMlpPszZrfqkeAc\n3fpqqTD2oBKNzQyYFs70zs3St5ylO7hhhYqDhSAilFEQbyBu//0d2JfV8b11\nUbPl6xk/NE1i7fJxgAg47D55Pb/tYiQM0w88jZA5sHwEuK2yewRMI76YrU6E\n79KUTnYDY1zN7QJnRwar0zhamPRCdS/6L5qZkwz/qOZ7thunj4ilT84EYSqP\nmfNZ0BH0prpjBjV/KbDG3aIeYrBnsTA9UbBoUNTv8xb7Brcz1l0cO63RVvmo\nBxdG\r\n=RWp4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9095bbb-1618482685870_1618482749877_0.21557111827707343","host":"s3://npm-registry-packages"}},"1.1.0-canary-5698f8e-1619009741851":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5698f8e-1619009741851","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5698f8e-1619009741851","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f4ffb07bd524e551d4b3f1c35d050307712c0141","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5698f8e-1619009741851.tgz","fileCount":7,"integrity":"sha512-KpVUN4EUxiGhd2KCwsLyCCTI6/WHqgYXG9fCGKAm4qCEQJ7jreHdORA4mSXnZbR31SSX1eGQnbbhA9ZRXsmZYw==","signatures":[{"sig":"MEQCIH9YqUirDvFHFqAM6sHQo4mRDcoonUN//iYiyTCWG6cfAiBz2bh7a7lXBil4uAlW4b2OIo3JRCOKspeEdTLx+b8DeA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggCEICRA9TVsSAnZWagAAlEkQAICdtvQREcVApn6KajzL\nxT88AAsSBRZhjdXz9SuNwFab93CxTswAPTRM045kEmaMLzlVG+JMhUex2LFD\npD/8AJm68SWpPm509ixJDa9gEy9dvvEjkubYzs7trkaE1SMtWG9OeTcQ5Lrn\niZOKfnPii+Br30iu7Qc3W62KCOrajAh1EOHShQrJncW7q3JszQ/oZu7ilRbn\n0NONwxNWT+O4P0gB+XQVYTGtSWy105M4rZTy53wnzLLAMrEm/FngIl/ya5hc\nYqK7g01B4NtdX4QF/DPr2YsCwl+EuosxkvHsKOSg6fRRqtH3lEm6MeILrfJA\nY/OlsNzYiC5gLpH/1DAEE0yTjnZr0TPpwKiTr2bh0TQUqJIBqcr/IG4TcfIh\nGMS4MyB+XxoZe1YiBGFLHhQT8178bAcCEXfPqoyd4tWEvGesPk8avSxYWAYm\nGPWtR2iTwdCXauIeYIjeeNg0Ngve5iOF5MFCQkx5Cgj021xjzqXYtxdEEZtT\nPZAA9ne0qNGb7f7W/YMtI6Nt60jpJXTACU1x3OIW+Wolf0G0NmB0En9w6UmW\n5vqFqAOv6tWl7QPArHo492LjmgBkn0zva7ErOgJ8LCHvIqKFg9Bk3RTFLEuj\nW0vE+jBRZQNolcK5rRJU7wZmZT2hPhFeIZy4vUe3udBN5hnmHvAFOTPUAol8\niRCQ\r\n=7icI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5698f8e-1619009741851_1619009800106_0.7421562145706533","host":"s3://npm-registry-packages"}},"1.1.0-canary-1c03250-1619009801215":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1c03250-1619009801215","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1c03250-1619009801215","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d710706ae4bc023e1795acb603f9619049d574c0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1c03250-1619009801215.tgz","fileCount":7,"integrity":"sha512-vvsEkNkenogZa3lKy6pgSJofXzezc8BXHqejqI3bhYu7p0rroNCzKvbNU+OXF6hFmtB/BHgQ73gzOXcUDW/wyg==","signatures":[{"sig":"MEUCIGZJRLwpYBX5d8DmaoDTxUpUyURh2MVB2H9zNxGxGdvKAiEAlHuO8ggKVHVp9ELtiDQuHepzQFrrYUjmFVfpTe/dYFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggCFDCRA9TVsSAnZWagAAe58P/Ryc0MzZHRbLWR+oZ3wg\n30QtUwB1DaWjJpth3J6jZEBUNAU4oYW9SnBGHUwuUfgvGuEcVHq7/UbDv3lx\nEx27flM/J9zVRJuIVgi/JXiB45wFZmLt0FgcGBI0qb9W/SuAH9+ExGXEV7k+\nf5ADrHLzvEY9BuOHypFkoy7SEDRnxmjr1Bj237u+yINXAmeHqreFZL91Zlr5\ntux0EdhQI/Gh6blcE02AZs8aYEgwhknZ2B1ASamOiv0IVyEEW1hM93I3PLZf\nYOrLxTDyRddEZExAPKfAFMXindAl8cn9nqF0AVLZC047jfyYVfplHyMJH0Cf\nRteedkd4Mj3Vg2DQYtsmfuW24ssEkKxy+ixYMHIfZrefB+7SZlh3Y2T/o4GY\nk1W4Y6L116f0f1jMVI2Z/BF3owpKOEmS5ctfJnJRl1yviZSbwXiVVgnHWHdV\nccw0aY4nhgnk++Af2RyJ0Q4w6m4XvTmMoK7ZZi0k0vO+rXce0eyq/XErWzyS\n0+VD2NoKBxie/P0Ug0MOCxz7c9g8N4K2UGBnknJnDhCQHYATVFNro7MOJd8h\nO3kESHRYyfTlnJW+kHRIdzAQEpJAloMDp5/dG2WOlDuMs0imuRLtc6YbgnEW\ng0BHBDut7p5IYxNWypsn5D+SWPWD8AHzuLyYhX95k9O9e8NYtPVQsJJBdVG0\nNN9B\r\n=1xYC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1c03250-1619009801215_1619009858587_0.2562681375863822","host":"s3://npm-registry-packages"}},"1.1.0-canary-16bdce8-1619101969398":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-16bdce8-1619101969398","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-16bdce8-1619101969398","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"80b53e9083ec3a7b59377c6d34882928ca44348f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-16bdce8-1619101969398.tgz","fileCount":7,"integrity":"sha512-QeOe4M6Yi8OMGPxN8Nl3IkJB83MMGDN325xk9yT8xE9bEm6tI8mFEixH4Ktl4wHHM4FpGWgwuu2yzWZpPHbFnA==","signatures":[{"sig":"MEYCIQCxMVIm7lyuGMGi+FymzpeED6IFuUQszzuhtiB4SXo8+wIhALRSfIr66Ut27c6iOLcpJnVPtZNJPIJ3jaWH14/jVDP9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggYlPCRA9TVsSAnZWagAAddwP/R5wggXSxR20HzPEpbT8\nsEQrHVlYb6PQZCc52p9ykppRjxGw66rTfdb/YTLStJKbTBUuD20OP+EOhoOQ\nmiqRCF8PlZ6s7t04Coyd2Ia/nTmiIyCcnHHh9kiYRBAkJkUCOckoTOnudcVv\nHzsj4qNfGkKCGxbwk0SwUElC7ZEa3EAXNcnzhAl1Rcxglr9vzzWmePy0AW1n\nT+0lSTWjJBXS2wJdZsZclNWPvTKw0KQQSfIs+kBX85OIF6Df25JspszXvNIQ\nduQuSPi9kMtRGZMGd7lb9TmsF2SGcXwTNyJYcDsfEU69DsQgoJRK229ktGom\nb4g4QvxTuEI93OANK1wXyaqEGvW2qcOYfMGmu9IY4FUYQYDoYQWk9/tKuUHK\nLDgLzbtwZur5Bm+VInpWWfleCYqH2XrFojcUKN0Y9cFuPd21de3q9EJqMR9x\n06GmUZdLNTR0HUhLNln7tHvdi9/igI8nhEmD+wnH6/wSy3U1gjOov+GZokqF\nzI5TRWHmkffKC2X0eSFp/JrvpyPp8qe0TpdY2IIVUOn56ZpV9ulsgx7M+Iuf\nngkiMdpmN50xuhPMUQ2HDqUzHp0CTnT3WV2a2vkTm+DZV8Wa3IPanZwlog8U\ndpEmWy71PPBRv1Y5S+DC90/tIBPqTLT8Ds5LYSluJ/FVPhYrYxEkTAemhiQG\ndtYN\r\n=wqkT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-16bdce8-1619101969398_1619102030789_0.41594689289948716","host":"s3://npm-registry-packages"}},"1.1.0-canary-6d3a96e-1619122571399":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6d3a96e-1619122571399","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6d3a96e-1619122571399","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b69038f853b5392dfac86ba7c6413d8e08d4074b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6d3a96e-1619122571399.tgz","fileCount":7,"integrity":"sha512-UwJfQiVpWDKeH3WhrFj7bM20SVmYeT6YtrbzTbUv7DlcRpH0hGdKKA6pKPkDk82l1CDdazNV+ZM1m8CuBlDxSg==","signatures":[{"sig":"MEUCIQC0vyYlFVhsCdgHwU4APPlz9zL8Ze7hZ1zwpa2oXPk/hwIgD9ZhlL3G6sAOGrDkdBUCMaSR4h5+yfdC/LrJLEHymUA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggdnCCRA9TVsSAnZWagAAdBMP/3cHXbf+WuRdsZPUnpax\nZ50z0xom8MqH3H/a4nBBqmKxCESeFx/7SFuiaO8gel6WClvx3NoH7Dwu58e6\ncVRcf77wFmUAoqdgzfMVsjl+3XyeK0WLC4n8j+ttKtO3kStW6E8qVWqHf8ZC\nbpGuYD7JliL0oyGGbFZIpd6qwOL05gYfG0JR7YAzfboAx5QAtJZKnpWjFCQh\n85qPciiWdP42YOU5UVmd5fltsPmXxhZaniR+Tu5qLXxPwbrytup0s2iGnW0E\nqKqiu21PjWhLaSAgPWf94O8vXFsDTKHaA+lXKt4cBzcbGJtYbLhhtXIrpAUE\nYkBs9CvYpY5X14CAQhSBv8VAoCyMsJd9vRCoKneGYi2gql6yg88cNVaPySqs\nr91eZ9I/at4fjaxHqZRsTA4keOH0+FHwuwI4jTsKmd2Pf0L9bKXvR4eOxDcG\n/RNTRM6JqNfzpZkUEBTycGYAep5w8MGRSx3rlBjlYENKQbdE+1l6II2MZkUj\nnXwymHkxMoTRCR3jztbIK3dqWuUpzdWBTHr0CckxvbMkuC+tV/VQ2VMGjLc9\nGXyUXIA3ekU0K73JF1Zl76/s8SRj8I23ctsWF8CeL4ZxOozGE6bNM59PuYCN\n9JSZux2PJsx+/62ePCkuzOouXw1qfRoH2llcUyCnbrQiX2LV4gbsf1H2gLw6\nqkkx\r\n=T0Z2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.1","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6d3a96e-1619122571399_1619122626062_0.7261052617492616","host":"s3://npm-registry-packages"}},"1.1.0-canary-d7aa894-1619129646690":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d7aa894-1619129646690","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d7aa894-1619129646690","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2656cf1141e50693e14b3f72becfb82323b393b0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d7aa894-1619129646690.tgz","fileCount":7,"integrity":"sha512-bMVE7N5c6ky7a4wBeYqNNIGa6jmwAJVR43NVecTdxtseb0tK624Dj70gV0pZPu2E5I3pVe8o46HPK9vzIRCILQ==","signatures":[{"sig":"MEUCIQCtIo1kVtbu5MgFyrfgtY6HEUkg/Cl9VOyoTrY72cCq5QIgO8ZKt1XMM1bCd++8P7TcGL8VjjEsB1I9BdqUgSKe31c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggfVtCRA9TVsSAnZWagAAGqwQAItqAVaWQfNnb+0EK8k/\nRnY4G6ovnGmahOojwz855RZ3WUCJvhagUYdRg+MpUhTmy3+rHhp0wr99Iooh\nZ/PL8N3Z+lbxxnA30lU4prwIc41m9ftvbaKWJ1h/9vzW0TjTLUdmGZhhxrjc\natyznRu+/xP0qwC19ZbMNUSkyOYBb9vOnhUpGIlscCWXK3VqkM9lQ67I2IMJ\n6QipDC9D1Xw5fA2DLl9Yt4jmQr9w+Mp5CMc9xfCqSZu8W5A6bPziRY3itfua\nWeX98HGfXsDUgcqWvKr3u/xS151E8FCvZyXwivcent7ZrUjWQonw0tMUXzgN\nSnOXYHCqzW5/Kr0+ZHOVjsQMiaWBoQRhS4fjgXAwmoqMfznNB1zbluQwXOWL\n4zi6lHZteJPkVE9411tOT5DFWsXxFuPD9R8rTcfsYu++KY8LhUg962XL7B+j\nUWM+km6CxcQf1OzeajKimXojnEmAyREkuE8uA2C7lT+0K7urix6fPJhNJK/E\noy9zkp8Pq4UAqnASMiQ5bHRYZrMsnfYs0f888lxqRAjG9zVqwO6WU2r+6E58\ny0NwPFk7fLogEOaqlzMA0XZeaEHjFWX9m0oqCX223s2GVTLxvKGyjyNHO0zQ\nqYRAF0BARNduf5gCXcgJpBl88uJsIjqXGKH7tX7mCWxjWP1QhvDBIG0MJiLB\nZ3jk\r\n=OAfK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d7aa894-1619129646690_1619129706366_0.597393309391353","host":"s3://npm-registry-packages"}},"1.1.0-canary-e473a70-1619129653664":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-e473a70-1619129653664","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-e473a70-1619129653664","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4e2b8871cd0fd54b5b7f444a050592c8d87d1c88","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-e473a70-1619129653664.tgz","fileCount":7,"integrity":"sha512-Y8YhEaA6nnEfSanO9OYga3g3a8GsHFbFVX3nEqZ6p6Y+R5CpR1jk75Az1Cqw9Oj4wspOC3PuIsDwQsgn791Uzw==","signatures":[{"sig":"MEUCIQCBQ+3RiSXZ2AtCi/zxHDSFHlSu/IScyPAozB7JRMx2CAIgRk4g2lmfRsYfCJyyi6/IHW2GSj4n4IOmo+ocqhh4QU8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggfV2CRA9TVsSAnZWagAA4LUP/RLvmhrd8wQjZ7Mvt3UH\nhcMsOLYZmb8O8xul71ARXVUnmjCU3QjCop4tfI1pnMUKEJOGW56EX/sZ9bNs\n+TK6xfMcx8pHd24lPjsGaghne2Gezi7t113jRTeUuFLQ2+a2iyGAxJ/zK3cF\npleHNhthpXS7JTGX0HKudRwTn0OcWs6l8jIM2M2CN6/oz94g+0hU9texqVEb\n+MdBi6SNBpTG5HLGvvWozBz3joDKsl85YQNMzAxvUCcplFj0mvHDWK/zBVwt\ntcfRLtoZI40H7ZwG+lVkEAnrSkLZWCsIYOHRJBm84BPoDmJWJ/jrgk69pYAp\nVPQ1MLZT/pL1tkNFSzt2nDKdsQtAIIFU2qjk2D47ngR74e9aprY18PoUQdRU\nRBFyvW5/ow4m1pqVVzRK5yhCVZTAKMaXS/MtHZOXft3Kb8sSIsxTSVrALcYd\nlWT216u49WSnlc5f1vDjALuwPRRJugbeb/zcMxTc1CSdz/fLK6xByMPfDFDA\nM9vzvMoKSup33KFiLgNKne7P4DnjQKBnVxz4fgJuVUhwfKmnv2tqGCBdYI4+\nLifmiQ40YZw9LIqEEylmexNJUwLo3Zqh1hJ21QSuFbhBHJJRkwweigXSR+vT\nqOd3X+TBQTdIS6wzgmYQ0FYnoPN2YEl/3gl3Tj9WXnm3LWh+l+KuE0+Xo3SD\nYwV4\r\n=9KbH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-e473a70-1619129653664_1619129716495_0.13469707653615126","host":"s3://npm-registry-packages"}},"1.1.0-canary-cc1305d-1619146252703":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-cc1305d-1619146252703","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-cc1305d-1619146252703","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"948372df8bff702d44afbbeae97c04948dd89d12","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-cc1305d-1619146252703.tgz","fileCount":7,"integrity":"sha512-P7jCVnx3FexgQlmBDBhusaz7kyBEUiTwx9AHXYjlF5VdASEjhqjVhjlfaeoeVLaDIEvckqxhd9kZNdcRxtlckQ==","signatures":[{"sig":"MEYCIQCan5ox8GN9gNMu01qZ137nTG7vQfgQ5UnsOnBLX4UaaAIhAOUnE6apsDY99zR3+6BMzC5LA8jx9vUC1C5QRSZAmweh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggjZTCRA9TVsSAnZWagAAVMcP/RwsCc1yXNVtX9MCgA+c\nzi/SN1MQ3oTZ38LNO2EV5N8Pigzl4B35SukevyjE7L9XeoT9nuw//j9ysfbp\nMhT2oUOiR5ivgrluvu/r150jkocWq8u5oybmskX0AIS8NX5rxzU8Y7adIoRL\nIpuMdIPrZn4AoqdIAOrJ5ifMDQReSZ5noKQtCaMc43KLu6AHLEWCDf7PaYRV\nrfWHDMVFQf5X6ZrCGJZI19kCoSbo4897T7MF3F+ZTV8jWS0MjLHGeOTmjZ2h\nWCeI9u7b4bWaXZdXFe8zkZh6EmWg+zlsJ4q8FKnZuxnGIyTQCyoN0bZxtUZs\nOwxPQ5rfVSpHT9e3xVAZslbstoU6xEFrpj5HP8JArSvX4mBnTc3CxxiiUI7+\nHIqnDfvTNGW21B11TyxmaPup/NFEPPaJlY7XM8COSWKyLfBjlbZrQxgbWf+h\nWAqfiae8jydGKrzZtXKLtcrJMEHJmziAfdcWN1hJEeW8MkZPSzqX9eYDw2yA\nDfgXbu2VAqtbCMrDMm8f8IFwU+XLZs99jQrZki2fhSxiKdPZaxx/qyJYNwof\nxJXcT3hT3uzjGKKE4sVIVtA5bNVe66vsipHsNMKBffev8k5mq6huY+9ta7pM\nQdmp4WLWwyaFnjKXxTuwGmuMiZVcS+DMEOLh+232zSa+531CaAexi1oDcjk8\nNt8D\r\n=uKfR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-cc1305d-1619146252703_1619146322717_0.8384872213597068","host":"s3://npm-registry-packages"}},"1.1.0-canary-6d0578d-1619163397056":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6d0578d-1619163397056","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6d0578d-1619163397056","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4cb428400cc62479e60d147da134eda91025e2ab","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6d0578d-1619163397056.tgz","fileCount":7,"integrity":"sha512-llnXRiQTqUAruzkp6/fNBDcF2rWPwILvYTR7snJoqx8OY61A+NeCwCl7P8sxSO2OCq4PISRk/WIfMey30/+ISg==","signatures":[{"sig":"MEUCIGipPEx1CkTll+VztMITQ1v5bXPf4JQB/9kTgCaYEvgjAiEAqvuV3WJUKuCernLBJXwTj0IMpIbId9ly7hX8p7kiSag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggnk4CRA9TVsSAnZWagAA9mAP/2O+YvnrQaK7l7n0T0lw\n95CZX9vFzUmp70nfLzLCbFORKYWcl6LMv0UWPOVoSW/RNjEhBAs/ESPgJ5KY\ncKnSe5XQza/nrOLWK7Sv5AH3971Z1jeRnf7uyf2xUzvuwUj7KL84rSmv5cNj\nWcwO1V7ucnST5i5Hzxlj58lFcHW0s5OSrU5B94H60nL+hWdTguYsSS7qlBEN\n7mkfcmAC0DnkKObPimuMd5MRJ6DgM2xu0z3eoCuiR6hvDKLzi9w9WDeERD/l\nB006Zp6OSvbb2elHJoUCcMxsqxNjmRG2FcVJ0mOjEEsn5qPFcrTG5W/q0KbJ\neXIKO4kZlVNcW1t1rVuEM09qFoM0Yc1I66i35IGK3eZvRM2RQTLHMV/Cm0Oc\n5imiUdKLsbXtHJkMUBNyn4PZ25rZEfGeKPZ98b3OBztGg8YCZfWHOlz/Mojp\nqWnQD5Q+MiV81qBLgtp1soNX58rAgG353rGOrzLBgOtqkgPSPOg91NcO4gbd\nskxZunulyclg1j7JMfuMKrid1+VCkSqQS0ugO0Z+LFntZDmeSaS9euOKvTe/\nGrnpTaZrZNxZDtR47RL+JPfNJSAV8TsCN8afT/zMEoOPXo1KXI1dG6sbogen\nPfD0OP3beFh9WrMxXC78tHdF76BEIa4RohBzDX/ePjHxQ06h9Ou8HxZz7G5G\ncBEL\r\n=WlDQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.4","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6d0578d-1619163397056_1619163447588_0.5372972333499837","host":"s3://npm-registry-packages"}},"1.1.0-canary-9d6a729-1619164505487":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9d6a729-1619164505487","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9d6a729-1619164505487","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a6dbc0431b0f2ce506a849ee4db7d2ee322387c0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9d6a729-1619164505487.tgz","fileCount":7,"integrity":"sha512-coGJtaGtM9DyxDoKxGiE5qfCoZK2uwbyqIjmYHRhBnzB/fPkjipcUD1p7wWNTb1Sa77S15gY/3Bv2TURYxGqyw==","signatures":[{"sig":"MEUCIGoG5hqSXOTsNZ1h0KVyZNDRnj9LH5iCIwRB+eo+1AeOAiEA1CcsLd0FVSNP18Ad6J8yI8WWGgcMUEyYc2WgZ91DxAE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggn2NCRA9TVsSAnZWagAAJgoP/iuv8D67Es4ZIKg2liw1\n1Lrd1B8jEsB2oK8M3UGsLhnddVKUdSaOwTKOagajV36aP9MtbIhOx6p0w0NZ\nJTjEGjc+tFslwV7+SYMb1lny0B5za2TCYxU3sPiUGPb63rysVd2Mt8Mv8Df2\nx3fWYQYoMZWhsmII0+dArlOaA61l4G/HL4VWkXOiGP0Mc7ReJKJ/5jJzQa1a\n8y6xE3mFrkpolQg1sCsw6fMifm0p8W+ByZpwAWrBFwkRH+AaTnhv8mYDuwvA\nUX63i07834IiNxy78XDF3orekk0k//y/WkIAEIZaa0lQd/xl+5bkn+yMt3q6\nT1ExRvXsk9MsA7uxhy47+5d+JQo0oqpjRDdIMtbI55X8Ai9b4JAp/vTum4zG\nYb+vSvkL9pJSZ9eAfu4Xs22jecggB15D0ZrODwLreks/ycsDOPhOYjhg05/4\nwM/PnIDaoMv5Wxw0WacB/fKiFCtTUskOjoC0M7yJJlHbO/NK69J4URYP1hst\n6+aBCGUuAos+WrShqmCIM2ZfhoCOw+9MOfdvQfQPJ0O22pdm2Enn3yPUPV7e\nOQ1yBKlKRq263LxORaC4wxlVOuNF1GUe0NZF2mcaiBnaHEUH+F3Piu4+ToOe\npixmcgm7I4Xp/EMoFXyZJP9r0R3jPso/OFMV8VKPa+8OARyx9tWYkroIWe6A\ntfcM\r\n=Yuug\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.35","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9d6a729-1619164505487_1619164556374_0.6014458300581886","host":"s3://npm-registry-packages"}},"1.1.0-canary-77721ae-1619168673125":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-77721ae-1619168673125","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-77721ae-1619168673125","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1404bc13b05f0df0a51ab998f750703a3b843c3d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-77721ae-1619168673125.tgz","fileCount":7,"integrity":"sha512-kRJzCgWQ9Bu3ewhaCnrmDKJm9ffXfkjnEx369+R4r2wpdf9htc9PocX7O/qZPluHlW7teb389kFCwKQFF1EszQ==","signatures":[{"sig":"MEUCIHLIjU+WYx5nhuXlS0h5TlbwiQFExY0dsvyGb8qtxfAoAiEA7LkAUYK1v/NPHnLh7gU6qYpjmWu7FtAAcSHDarbeCcM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggo3gCRA9TVsSAnZWagAAR9gP/Am/MdgtYa/9E6DiziAh\n+9FrKtxEPFVoGfIoyHPqf39yg7qXOqwSX7MHB6nQsdYWhQIknDufNy+7oEXK\nQBgbcG8Ie1BlxLaXaVYLYaTSXumw8Wo08qIFSza2H7cIpkG9N6Qugq3LnHNZ\n4g7oQkC1HaMalZEkZn1LpFtKool8fqWDGQM6mH9JZVzobhCmbPNkGdiYERuY\nybi7oifBUtOHZLXcG6KThkD7EFT3jwDDlcMZcKp+fEUt7yWi9KNr7JO0EJI6\nhCC3G+MYMULps6589hR/7ra8rUVeK0WoRjQphG6/5GQPz8OZrsYTN4chkm93\n8gCWH+KC8nXUZ/9OwRy70V7o3jpib1Mo/x6rdEXFgXmpurqAso9BPCQzf19s\nsNghYEhuS/4CbJvgV/ajVIG2Dt/R/xJCLVgp0JNVKlOiH1lQpfAOTTaDzrYJ\ni9KD1vrYOe3NmNZH0qqzFMbLmkmhyhtoYmj4XCMSiPCexuO/Lvm+Tt2BPg5z\nu9e4yDIb6mo0SmWbb0KH0+L+ku/pd8ls0iJ0OiEoJoNFS3ltUmYQd7lRMAqa\nhBnp+YsxkbRYvMBRnHTzZV5n8DUZSWRrU/H0FkMUJuLz1/GRQomCL6Ryo8jZ\nt9cw9/8VUps65bl55hHMYpR+HUC/3uBcqhWDtjZf9j98rxg5WfO4L54Xoqsn\n21uX\r\n=qjB9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.24.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-77721ae-1619168673125_1619168735507_0.7347818342461454","host":"s3://npm-registry-packages"}},"1.1.0-canary-3e037d0-1619218053802":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3e037d0-1619218053802","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3e037d0-1619218053802","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3b3ecb9d880656f0159ce0aa8e432476eb14cecb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3e037d0-1619218053802.tgz","fileCount":7,"integrity":"sha512-fCVQ41tavUR2zTt3jCf7/8ax9umZeF0TzVbHvseOH0GiA6uEg4KOKJ38pp8CxgCakgTUR4N2zJdrx4ua5AwCKQ==","signatures":[{"sig":"MEUCIQDDtkLm/vVNxhGtFez9lnOqzTeuVEnTHyOVKn81CoZCHAIgC9Kmm82dMslQfU695Ay8GmhNvsmRWRt+j/5JYbPfUuo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg07ICRA9TVsSAnZWagAAu2wP/2k/EJj4xtrvFyqBMQG8\n3uUfLcMyh9zvSkaLM9f61eI/tCeAolgx9Hep0dsMnoAOSWhoOsVrWV+iATRI\niXUbwjCXVB92TnWbu0rV04nLN3Z7Rg7s8AsMJbtfNtbs1xUTqCsE9qrULCM1\nHbgIpuZ1tMhaVQWthvYYQ8SHWj40KM2p5oQgErhY4g3BUFvt2q9/3OpMT87l\nmxCfJHHqBxjXIr9ie4MVp0AB3wnoWcNro9PJapOUnbzQgmTmIpRrYK+gQufp\nxMqJEEtCU3FXPFFXdiMGgk9SFOisAFv3G9uQNqRp+Gr9noWe+WnLSUgMmc8X\nB0Kn1Gc4QaOoeXxA+w1VUbjAnIY5eFf96k7gA9e1TmUodRu3omjQ97Q0RoJC\nS7+oWcWmE2TTlwnmXLkBQPEl9zxhv2I1OicdS6HWaVWgZv6zhKz2YS5jjF1p\nE/A9P5pKFMrGDmMMIp5mQyYWjFSJ6tzhKswEEcOhuOGd5NBsWNKnIeP8Wys6\nE7xCizHoEdvDKDlmJh6H7TfOUL3E8aVFDd7J6Q4kMukNBIdWZT5vZPOp6hLY\nsdUA6UqIvh3fVNwdNjKOb4ZJuizDZVsBrb8dHWSWaegr4XUG81atFSzhS4At\nRUNRm4wP5f69to/P17Fm1oImXkIR45elc1nm9UqIZWPH9QrevsC1Cj/BAUkZ\nyxEb\r\n=BJYh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3e037d0-1619218053802_1619218120302_0.03170560830435387","host":"s3://npm-registry-packages"}},"1.1.0-canary-3e037d0-1619218051222":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3e037d0-1619218051222","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3e037d0-1619218051222","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"05bfd181e226ca5b0b508e68fe5de3fef774b97c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3e037d0-1619218051222.tgz","fileCount":7,"integrity":"sha512-XD342fudifSRunWsCmpq6RS/5w3y7Opyr1a2IX/l3V8Ew5OMYn0auqR5spanmm+FIr/yby4amxlObQUP1vRbTQ==","signatures":[{"sig":"MEUCIBe35Ci9jV/9YM4Ux0EAWzFiR2AUqnYnEwnc1Y9lpgzbAiEAg3iX3Z1GdqJAVkgJPhs6rhUh/Wmol/QhHjW5dKBTNYM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg07TCRA9TVsSAnZWagAAO1cP/2BEM51xeqIpVz5vYLpR\nrEomDlmf+TQv/rMrUr1bbBGRbUz8wQ9YPKNP6E9RpukUGo7c4qk6ttUrW033\nVqBZbjI9OQ0uKYjBoY/o0q+x+nHorNczn4MRag66jQBxHoZFY5FkuYOoujiZ\nvIoXX3pHOf7cb8F26NHfbtdMZZy8vchYtOEUDvpoSiJXM+Yuld4uKk9EfiNJ\n/ai6daMVY0iKKt/R097b4zuZmX6bz/rj2M+zoBgVPuYjlrlvVJkFe6le8n39\n534J2+M9OgKyrRtS0FDv9zZDeExFiX9tk6YEQhej6GZAFtzCawD1eG+LCM9F\nuid2YN+t9xHSbHTDBF7iiQFq2r5l0CnqeDjfPX3M1Qpsc7A1VcqzoNGLeEFe\nc6PXcd8BKM1jMNQvbnqRKcoDX4+U3sBVj3i1PqGFxZ9ZIZa9N6hpFrE2lyrc\n/EYdOmNs/BnTTwiTLMBiptckmpOz7m3OCUpADWknCrlF4sm1wIYrLyUYNq34\n/PGk38G0o7vQIyAm14vF0H3woTEKlbBArUgdjcMkHl60abdch3jLLrldgUZl\nGLWp6jV3YochSvF9JdkqFRb2BgZHKJICg5aJDm21mL13S6/KQg+U0qtR1pIr\nh1wR3ybVBrcrypX5oJbkEd8JqNL42Zrz8lPGv8VQt/tYdyGjhQ0vp4Gzc9uz\n1aLs\r\n=IzG6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3e037d0-1619218051222_1619218130551_0.49285487710593867","host":"s3://npm-registry-packages"}},"1.1.0-canary-8cf8aec-1619392975010":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-8cf8aec-1619392975010","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-8cf8aec-1619392975010","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a6b3e3845becb29d387361dcecc8268f0bdda096","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-8cf8aec-1619392975010.tgz","fileCount":7,"integrity":"sha512-dYVXeDt/y1cMN/TH0jyGYKqiGreBrKGHFqAoqH5US1zyNJdxgh241x1zy8ZQxOfGtUPMukf/5taDO5IDohJ/mQ==","signatures":[{"sig":"MEQCIFXAmbzZ1GuxZGa1bCHe8G0/eNFjmA6tpSBZ6xK+VdZ9AiB2W1L5rG4zzQnmArQTmj9Qu6F/o58MRsqRkrFwRPnWqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghfoGCRA9TVsSAnZWagAAM+oQAJ5tTLxhOyv/Kr023M/y\ny/sqOyEPt1yPM1dawn2R28nKtRRT19CEO5ecCaDNsOpk+fHYXfdpVlI/gNsG\nQOIdZWhYKBAgdpxjKvtuEU6Ge/r9PZEnoMibVtuZiEm0BNIzWYyls61sc16v\nFZbiNz/p59AWdwyPRLwERx6CqOww7pRtBvJfUO+9WmnW3X5dj5b3ak678PCE\n+4f/Wo2PUj1sZLCUeBEN9w+1tNQVojNDdnpHQtts8XWOR2BsAhktNyvvYykg\nFDy0o5jrrhGYP/Sw5CsvervyMfuIyrBUS2tm51R6n/kJn2PfSp993DVvtyRF\nx4bVDfNBywJ6Uvb8nG0K69ZtxzBBAoGOQF+TgsJxJVxbZAsCdAaGRNIC1zlL\nO3Ro7Dd4tSBX3sh9b2/XVsjcK4H5oLXm/k363w7Q6OAMaxFwC44nfYV0iagg\n0CUzl37OZr9v1KjAQt7IFu8jPp9KQVGZf/as/g+L+S4ehMr1NsDczIJdeT9B\np7z0tazE3BtEdU56SbAR9ZtNSHqCBsxItd64zeXjkapEWrUy3+gQy37LRTRi\nIaOzsCXiMbs6E2KR+y5w6LyHdoe/Vg6Q8FXN3E9K9ND8hogY/4adElgG+4so\n267Y9xlF42KgDSwwunluwc88fSVzWAQZysPvUnWClH2i0sE8qZa2u4007jTL\nXET4\r\n=fvSM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-8cf8aec-1619392975010_1619393030015_0.2484879325276239","host":"s3://npm-registry-packages"}},"1.1.0-canary-346ce6b-1619423010743":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-346ce6b-1619423010743","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-346ce6b-1619423010743","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8e683a8f2c04bc335528e4d89c52bb944e8ce38b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-346ce6b-1619423010743.tgz","fileCount":7,"integrity":"sha512-D88WaNfnMIg/r8ue6JowCvMioMzEMRRehhkCxEb/5Pn7B8TsnqtSj82l+JH//j0BTxgPWpsJqTfMJa60WyKPJA==","signatures":[{"sig":"MEUCIQCotvwDKB8lIXTmmOiauDFb+9XqSATVjsNKCn9I3DuufAIgYwqaL0lksQyB1Xh/OLs4tRfLjDOTS5d41dX18uTEnPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghm9VCRA9TVsSAnZWagAALn4QAKPa5GdXfAN8UIfeBbHp\nNfAhPOXK2MWgNYtklW0yCMCNyQz4Kw3BLOCYz5g0MFDuDSk7xvBIbxbzsO14\nEIIn7dkVEzCViuwkMVXpLbdYQ4NsnDDMBXpPvckktDRKRbpPnK/fvNoCRNd8\no85wIMX5b4gASi8yH1+a7JujWimBCStfJXvpQm/M/a6p2OVvWE+96NZgqN1J\nYSeMtrPcO/3Ks4do/CxWcwQJlyCn8xPrPxV8JumTWAW5vOS1fPDTjNKxHih+\njrqp9IQ0gVZ37oHoKvA0zDkVzibsnnk8+0PbGnVhtP4yeqeqagAb/Fy7ytsa\nZMHq3+Inrw3A1ncgXQjrShNT9myt7q1Ia7SMz6kFBKwDJHlF6KapY991dL/v\npDYE44V8ohWMwH44Vj83bUXJ4ZPQUowCt6sYbslu5pOzd9EdCYmiFLLJMkAL\nZBL4J+clRRgEa9IbCD/+XHHaR41rtR1kjdF5gNeGWnFRH3CPGASSBxZSi/KP\nvb9C6aqOgczBJykR7/Opy/gtqMy/HVstUgwx3yOXwKN4V9OsLOQmQKTp9cPR\nxnOubPvwwzyqyjA46y7A9xKJICRc20e74Eo35SznPLj4lWeoC4me/gdioJLg\nrEM0F5WnWj40pQt7g2J2YGFBKdZfkkLCumBbsAPNTSCM/SHXLp88v91B6OEu\n6l+j\r\n=J6QZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.22","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-346ce6b-1619423010743_1619423061295_0.8172382442283805","host":"s3://npm-registry-packages"}},"1.1.0-canary-b064934-1619552681430":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b064934-1619552681430","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b064934-1619552681430","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e30cc851dad26728bcfd2243fd5856f38279e076","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b064934-1619552681430.tgz","fileCount":7,"integrity":"sha512-ZZcGyvjyR1z507M38yre8hHKA4cPcp7guFsL3ZBMgwm0zROD8tqdCvDPOq/RoYYrDtWMtbAgqkX/gTTDnOyqkA==","signatures":[{"sig":"MEUCIGB1pEHb8fDesvN069cKTbM8kj8ZI8pNe/ypsksXFEshAiEA3imN1drK1p334Z3/M+mx7vwkaBmV5XMOXy3BKTwbYBM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiGngCRA9TVsSAnZWagAALUcP/00fNiaDMp9SKDW28igA\nQ4la/Id21aB3PDujg2JI26mZuTEd2HIz84vYSz25VDWTLGuAqnBm/cQaAPwD\nH4os7nbsuME653Bt6mC/CzW5BgQBN6pclXVxOo8s2duvluBvjukEtIw31GgA\nwmVBu+fnUAoZiRECp01oO82M0qvDkD4yaRM9vaUKidS/R44I5HoB+NI5Ra08\n5SVIqX8olZPk54AnfZevSUwLKXJayKVObQR3kE1El8KvTVmyuQ1kmok69k54\nk5zwuuN4Hc4tC0NQhIc1VYvwxnpQa8ca+YRXh5vJV5/+tbNzXCIVPURHd555\nO0bTLKAnVzqw8IJXyNREASD/y22/x1PtxpbCt4q2kiGZwOVhkDQTs5eOlOXw\nmGUBD3C07S+Ce2320MtiSmDUQR2btUQt+1fa0WRczJ0OI8JkWeXFD+BSCst7\nE3AnqkIAbxcmFTWU1QK8Abmve0Q9J4G/duewu5NXmOK9SGH9+tkzdyrZOkkx\nNMqJFpepulmV8idqXlmwOhA4dGP/QPkYtbExaP7OHSBS9PChdx8OBBuWgMvz\nENlIeLdjS3okIOLNOiUAd6zFVexwfxvbaiLjjhryQSc+7Zb/7WSQAmbZ7Wju\nis9UvwFrgNfA+EudbXqTEzi0m6bQIoAD2w24bvKrA33GtwEPnM5KMr3zBP7l\njHq+\r\n=IEE3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b064934-1619552681430_1619552735497_0.5492908952583802","host":"s3://npm-registry-packages"}},"1.1.0-canary-b064934-1619552682690":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b064934-1619552682690","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b064934-1619552682690","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9a9dd3cb1a97450fb411144751ed07d85019480e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b064934-1619552682690.tgz","fileCount":7,"integrity":"sha512-UvFxYD71kyJYbbvZP2Tcr2S7JovfbG39zIhX+dKIifQlxkVHCg9GlrJJtz+02umQyf5zJQrQ5FcBOvcf4a21Iw==","signatures":[{"sig":"MEUCIQCd/8t2ysja70SKVlLJV+VIzZ8LrT6eGkzTu1TanzXYiwIgGPvCuYNppibr86dq4AjsPLxaGvMGHjiEiNgocgVGCso=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiVy1CRA9TVsSAnZWagAAHOwP/0nZZHC04k1WBP7Lk3Dq\nlRrfm2sSWAeneRlnZF2CK9Brvn6qJi5e0Ccx23JEF2XK8VM10Zw6W0epW8yA\nAhdP9ijpoFM5TGbwjkCqf6awVr2AqvyN+QtKplLrf0KTBjvJoo1P7CWpDyXV\nayzdqK1NIGdEy49Z72AmqVJk/04epWoUNyFYKR7DYY0+A+aW2EyrOqr1se9Q\nmkdJyi+pns/8Wk/BYMuqOnG0kxuIqk3mYIku9qkkEbRweqswIeucllsOvdCU\nbugDRA/J5kLmqFXCBS8bw5v2UlZA/UD2fjDcJSS0DhL8IDKlKpsROAcWqaUb\nOLq6fr9L/zGXkHs8OicxzhHy6nqC9VuFoLpVEH1nof7F6fvzSlxKTG66dlWg\nkzKXl7V3d2QMTBg1cFIgxU4d2oJ5EcK7vkBgPxaSrv6B5iQ01LGW0sMgJWa6\nmTBu2UqGMgHXnpaJs371PM06C5vpJwoCDSnwFVQSLEiMkOFU8Fwmf9g+U35N\nguSt2SVMsQTIxHcCZ4iI34Ek3hHceQLH0yS29HnB8kbbFljZN8hkOiOtjERd\nYGJgVNB9TO2ZF7wBwXqft2T4Kyr/iCW3XbwZ3f0q8unsIGNSfF3ZU0I0Q0uz\nvSbY+z4Irby6+Sv8LyYu3Ee3I2AwIANYxh6BLIuMZ7MW63+Nw5KGaORfWf7v\nS+fD\r\n=hZ0E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b064934-1619552682690_1619614900853_0.6114391777294192","host":"s3://npm-registry-packages"}},"1.1.0-canary-0800860-1619615551516":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0800860-1619615551516","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0800860-1619615551516","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3ae805db56152bf4f99fd95b6991494c1703f673","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0800860-1619615551516.tgz","fileCount":7,"integrity":"sha512-/y22BoRi7VQK9Lm5nnPxUsmq/hkBSqjsiq/ST3MjY++fO1G2Qmht8aIpwAn9ROgdA5Dg3bVzTx8UnTLVPTpBHA==","signatures":[{"sig":"MEUCIQDAPtXDZMBcOtv/j3QBtPIHm8qzF9HF/q2vRE4QRXJpngIgG05B3Do7XyKVJCo+KNA/Z7W8avP2doAJkYuEBl/z9KA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiV92CRA9TVsSAnZWagAA7AkP/167A3P2X84ivznDiy5P\nmHZ7/8QahIFECNUBs4iZzdJnY3aF480CtLZieaAI5d6jxoy1SxdArb6fTUda\n6hPU9nFXFrE26OVz8tKnksgTxW6stJ71HWPQMOauYBvBaxcahalrmdWyeSfn\ni+pLLVQ12xjtsQIyAATbINUHw4aUu+EWX1Lj3Cqw4sKFLwBZeVNJcS6w5BY4\nNoIqokyJI/E8RUAssctB1uTmqeDsULrzw5V7wa0fzRGrgvaeKDKNAH+fD5Z/\n8OJrrZG9sg4LVowUIU4MZgZdYjcJbQDRXnjAc9lBE7IpsNEJNEfeg8m+0L3P\n0mFT2d+ND1ZlVEMmTXthEU0ZJ57aJMzJpOd2Ppuf6Mum1pfuJOES1IYj9Lq4\nK/77WynK7MvenMLeJzhcYNDFYUWsryjmFHOfbWAQ7hExrSHZ9So1Y1z1E0zQ\nEugs3RWXqzIx8zIRUidmPz14kcpHtw6ZATuPBx/xUs3W40ABpILFYiRVCp33\n00/mW7eklb5o2WVqSe61QNNh+8FekLsUoxyYYSQPEBJS62Hz2xNgVCmK8vB4\nUXRrEz2IAD/5NpyGDpX/EbboSdbys90CtMuouPdrjbYIKx2BZ3mui1eqOf2X\n0kbazewqw4VgazWNiUjYvSaLJJMHbPeNvOMJ1RiC2btoCSK0Zpz+vdVaeUVy\nDuLb\r\n=3Pta\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.45.2","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0800860-1619615551516_1619615605873_0.4057535757324111","host":"s3://npm-registry-packages"}},"1.1.0-canary-2b7e365-1619674768808":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-2b7e365-1619674768808","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-2b7e365-1619674768808","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cdba735d7b0e5a2e420f6be3568dd12e6eee8d90","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-2b7e365-1619674768808.tgz","fileCount":7,"integrity":"sha512-5/reZhUkkY75ReP/KNdWbmzCJpHOa2iGB0nUxqqDeXxOh9JNl75LhHX/1Dut8ma/jnqX480fuZKxo4lt/r2EuQ==","signatures":[{"sig":"MEYCIQCG7hx9a5ZstzlqhRyTicUysXpK0xlGK2d0DjuDSn7cFgIhAMxaLo3q0Uf0ms/f1R2fh2DEOHTnsblVUwQ03hiWSzeF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgikbLCRA9TVsSAnZWagAA3J4P/1n3Z5D6rlL4QYAMgmRt\ntqNg5oqVrQdYiZlrE+Fuwbi11w/TSHksMd62ClcJeYXLHYh6hwFuvWg3z6Cv\nf9CYde3XERGALQi618T9D3Y2bOeles8sN4HWJAZ6kVhR9nemKNlAB6fbvpSU\naa57NVpWjeQfliJ6VOtOptAAuSX6Ic3h2EBePDx/BIGTDYhPCprQu4VYq0/k\niIoU1mONz2oo/lx3D+FwdXr9E65adqPsd+xD1Gjpb2/L4UdQkaQIRm0lpPu/\nQj/t8GjaYclB+nOPco6JMdYfsutatpLlsv6YR98+WBUJWokWT5lsfZvrrIxR\nvfoJajjvj1GVW96atAmIKzNufqpxlp0oL4hwtr00znm2Dx36PoWz5Gvu6CvW\nGEYdIttUhFJX/X51PloJldEZcPddImzAfI+uBNr65x9h8Pw98Jnzno8+hF9F\n5EXg0oXkkDSErhwuqygKhdL4vjLH47Qn+pwkK8LkS4GfrPcuPYxF0tVkg8R9\n6M57wV8p50DtPN5bJGAMMRhN9cvCwRaQjpNlrLe2dTSiUq2L76mCp018mS8h\nJEn9ZZmpHBvKCPyHcVjIQsJMRhuo0zX/75gILpGSquyucHptGGZsbZmNbN3Q\nQYAWYN3zh5bB+QOJkEnmnk9JqvcqAHb30oq214CLHIrNaho6/O0HxWfHqS9s\n2Gu3\r\n=cGfs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.46.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-2b7e365-1619674768808_1619674826947_0.4531076951443278","host":"s3://npm-registry-packages"}},"1.1.0-canary-d57c0d1-1619682849414":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d57c0d1-1619682849414","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d57c0d1-1619682849414","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e2c75857d48bace61cc4feca3724c537f94cf6eb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d57c0d1-1619682849414.tgz","fileCount":7,"integrity":"sha512-LE24ziV8c9bNanrwdQNmaImd5duVcn8CQpmKH1N8xEl31ai7OLLidqFUP7OjBNmNuH04EVzjHwOAyxcMG2FHPQ==","signatures":[{"sig":"MEYCIQDExEjAVtO230guH/MxB7jcJbETHkW9kn7cUn/D/1U0rQIhANiljRDXTW5E7VR55KAODSD4K1WTNKDobu/TwNMJPB9J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgimZbCRA9TVsSAnZWagAAk+MP/jeDdMB4kq8FL3Masn4W\nUSLVSHpNZWPasJl9vLLxnN5DFmdUHB36RJtTKyfOvfk1foHoUCAzm0NiJb5b\n4yuBkAoCctR9WwWp29I0KL9cu+czT2jBQCW1GgkxWt+ujUBvRnu+hNlwjBjw\nqTAJh0eiB2/79qs1vxSpBU2loMxACApOQM0B5T/AOaju/0XT28MldS5jpeAJ\nm9EwFC/Y0Otqth9djSyowe4Wiw8kNDwU68c2sPFsLNthk+0Q1nze7ADTZDOZ\n5B6MXtmdZQdVATqUH23T5S0F9fElrnTGU0Rc21T/Ud2CrOs6ZFQCUhOmd94p\nNmAbRTKcl09bsp0cRohQGWig+MdRG41ltm2fC8rK7bjQUHk9MGSOmY8nJBJY\nvdgIk589PHaNaViRrqMSy/ORW3ZfYIVj9zOez6G21OPv8aafmEhO4Hf8k7dC\nfOzNPnheRhZSWGUHjx76jFeGQ7Y/N7J1dr9OVR6W1KrdxInUzzLETT78gcGh\nwvMZkJq/AISUD8DreUTbV7OPPO210Gw5PVvfDdGx6rW0maQaylSVK5QWaCnV\ne6mcPyta8SObGTCOn+xydU+rMhXA0YdZRp7FUIjCy5Z9K3NwBAgBxvv0Hy1Z\nq0nQZkwRmGmKa5qfu4QOMW60H95fY7BAZSYu8eioOCsVd6PWq+524KLr1uEC\nnAo8\r\n=hhSB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.46.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d57c0d1-1619682849414_1619682906653_0.08999447263407556","host":"s3://npm-registry-packages"}},"1.1.0-canary-c0c05e5-1620027971511":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c0c05e5-1620027971511","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c0c05e5-1620027971511","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c1cf3a5f10d03fc36b1f5bb51d82f9174e96adcb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c0c05e5-1620027971511.tgz","fileCount":7,"integrity":"sha512-In68XhN7xA2Gr5TwqhaQGuZZjXuw6cUbmYGSOIWvdPk5hKd9/0nWdLogFlVhWHbnoDplOz5OkF9zDxarnGGdQQ==","signatures":[{"sig":"MEUCIA95UGI477b2nLnpYyp3Ro87Yzt2ykU02SNWNk12i0BCAiEAkC2z4KN0p3GR7W9DFFY43OFMAr1ARWNSKeXfS85TkHM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj6qACRA9TVsSAnZWagAAAF0P/2X3hSKci68FftnGzVaJ\na+XH8+QmtCVmr7BBedBYhcADX+rBA80tWXohsyrQohqGqYfbsk3T78x5iB0p\naYMpAqNMAlDpFO7/ZNoJ4/Z00nOzzzuBhXRBCpC8Ym+xtPTQpkX6n1TDDAac\nnS19eiFI6IxAvzY74BQYdY2VUtTgkhs9+XtZRudIVLVkpDe8JBMmNO9tHydb\nKi8aYlG0ZwnP4ujbwPirf0QgGE2LXdgYsDVN8N8IWFfJWOI9adVopcCcroMo\nreKS+ArO6HzQ1nNqDlbVvjAdOCS1VZhStSp1LseEAMUyxupXIZo/REZtHMta\nX9EwuKldqYEYi5B7DaCnJ8B9uSFJV6GYf8GvT6XcqHqb7uNbLOUYp6DcJJOu\nALOpZkq+HuHSX1Lj1r5wXbVlPSD4SlGIYrLKlke1z2Wm7gzdAoyoCvfo75I+\nugFtCXDJFtgHYAgFjFQ2NLw+iPSpDwe/KcecEPqhpjG26zsVWyb57ESgIuRL\nkgL0E+vHi6VqQ0YfswwN2sRMe8I3sZvBd/zAjDzlEs8jh8tQ9LyLGEQ9EIgv\nsM3rCqxr0l7jxz+VWiDRQwLgAvxissf0/vEP3/m0uyfpg1f+LZ/guq/iBVs2\nyiRoV3CJvnORRsvGX+6ZrL8EmcQ6kiwrjpTNTrnEUn4U+M6g7tChG/kwiDdI\nWtKc\r\n=0KsS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.46.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c0c05e5-1620027971511_1620028031509_0.5418446452957588","host":"s3://npm-registry-packages"}},"1.1.0-canary-3da750a-1620105661732":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3da750a-1620105661732","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3da750a-1620105661732","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5185bc25ac6b01a3785ce3dff062312d892e4a31","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3da750a-1620105661732.tgz","fileCount":7,"integrity":"sha512-ShAyMAV/eSB7hydbzXIgYEt3e1PvPl3QKuIsvU9ZFEozSzFho4hcvHcQwtyT/+2BC60GkY9hMz1TfV6lyLbi9g==","signatures":[{"sig":"MEQCIHtVaDQxNW/ypLdLO1G+Yl86i7G9aqRZfZy9hhT0GyyOAiALdDsR3/6kFo05IICRp6VaYzLfYB+eAUGjVMhLWzpLqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkNn0CRA9TVsSAnZWagAAkX8P/04ltXdKXeDw7JQEelOG\nhUCNXIYKbKZe2JjHnvDjls6SdCEH22Y8kV51UMd3vB2GnPf68HPC1LrDV+k5\nbcW3ZG5V/tzcdOMsLmEff1q0aZrzwkK4QJizex9mZU6RbuMmVRvim2we5gKD\nQj2aU0MmKsyeAtpnDVeGprbcNUGyVGy+AyvJjHME2IsgGXUj4/fjnQRA5lVW\n4zirjFwGhuJPhCQjFh97fCYynL0YXXoSxI/0VmzIFgZ+cEoSo2Cv5mzlu6mb\na7hgF1dNfEbDx3d54/m5sA/0P3KDz4pqZjho/EDMMMgkX/VyslBjffnR3wJd\nio5Mnq7ORw4LxD9oaXfe+3ttNr8++UpTdsbvcB/QuzNzGXkr0xsibX/A3xjx\nZkQXx0I5/7DI1sbhJMS3xoYqLsVJKPbNINAad8i6l5gPR89b7aTtfU2S5C9S\nn/BRH3S4D7lCyZ6tWlVEOEc5GTz1x4l2+PqHsrv1IYPd2EBtEFAHM8gutS6C\nARccFKheN2PYI7Zh5BZhNkCJz0fxEA3q+ua438EJvd0YyXZLL7Z+nYpIo5Jn\nBXurTHwzaTRc9jEhBmrA9TVNHe9ro67q9e5Uew8tIe1nFislaGW398T78mGf\nxyKMCxok445ryr8hhuAbHI7a4ql016whEjRbeIRSRzcKu6l7f8wUOu0uZBpk\nCWte\r\n=A1yK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3da750a-1620105661732_1620105715510_0.7100591681612027","host":"s3://npm-registry-packages"}},"1.1.0-canary-3da750a-1620105668153":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-3da750a-1620105668153","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-3da750a-1620105668153","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7d5369a033fca995a8dfeb48f11916372dc19f89","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-3da750a-1620105668153.tgz","fileCount":7,"integrity":"sha512-vOKaLfrELQS20O8x6iJTE/450/o9y3IzqgiOgq/HPFBCXp27k7jT+vdez3aAe7jCm2rFcu7gSJlC/FanHOdRRw==","signatures":[{"sig":"MEQCIET41wp95meqxEOnUS5P9WbgjvBU48zHB/cG7EndPFbJAiAliGdtmMX/zFYWwFs5dyIA8mHlpdRvskVZnDWWDuCt3Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkNn9CRA9TVsSAnZWagAABsEQAIEaw9o673wbETn82FUu\nR1TlkzNTbXtR7y+zL/yknc/ouvq5J8PMBiNaWLJO7eUXzp4YeO15G4NZuavK\nXp7DVf1p7bIFobtyiWxWBLIl/ClQgI9Tfs54DYXcF7iDo3DBvK7Gaw+h+/Dc\nmtxtT28QEWfwRsIC4mBj2d6/16FABcTxGdZhH4pbsnctmL3OhwYMC3X0B0rt\noDgGdSXdyMuBEWHpaTiLuEm+aFsPFTzGWorKDO0xtACMnBN1a0tpcWnGy00V\nBFJzE43bTiKAgno7EXuzsQ2+p0cCe8x1eKyznF83/bgYoyH50IjaxAN82OFE\nEO6bG6ZfRvRXsxaGD+9inH8ohIpwOKxelKqQXkUyGAlJjtpQ6RFvvG3PhIci\nNDLoxluudMJuuEzEcpRZgj9dfiIhXS6VZfxu/DttrsGWXgmXKPlVkGlRiSm9\nI5IP0towTv3rWArnFfvX7tbqbTmCZomla8Lv2lFtqYYI1NZZMUr+2+ciBMHh\nFnotlpr8slwaBfqOhbP0S6j+CYiyJVH1iuJifqMTLkb56p1UwJUJF7W7NSRl\nn4kWsCR45d5vGAkBtzqp52DylEnQJf3jvyX55TL77biJqNoZTNCjB2PLejzX\n+mVRAtGkCjqXkSANm6/uu9QC95tlV1GAOS8MBK+0ku2DW4c5829TeuDyj4ig\nagwv\r\n=MMEi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-3da750a-1620105668153_1620105724734_0.2696414360028154","host":"s3://npm-registry-packages"}},"1.1.0-canary-5c18c8f-1620137387334":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5c18c8f-1620137387334","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5c18c8f-1620137387334","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"779b18328ea793f89ef0090be6be831ab8497a57","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5c18c8f-1620137387334.tgz","fileCount":7,"integrity":"sha512-nwKHwCjNEU8Szl/7XRUUzC73qzlQUSlo+lPPGYn5kbHU0zWKSTqfQf2c4MFOwDRWdmCykyol2UM9kwneKaxE8A==","signatures":[{"sig":"MEUCIQDKOf2Ry3FCliRxKYlGZZXO6glDddAQBTo1IeQiJeOmlQIgV6PdIZ/MbTaYlCgsq145CAINCUNVVA/Oz7RF2ZkKcGY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkVXxCRA9TVsSAnZWagAAV6EQAKE2Ukwui9EoVaYznExw\n3QdU39tbanOobal1Yx2oOsmQ02KKzBsI/fYwJixiWDbvi/V0dPCYkScm7IOF\ndCdhu66sR8P8POa3hobrqZoKpXwOVjwghzgc8DZgiBuShu3Q2SwUZZLXJ/Xg\nCo2u1drsstAsr1a4ETHs2pgfsDgq4jvsIEkdL9Ntke4BSg1fFs316doYPURF\nyYBVTnKit8axKcmbTMAzhRyEIxcAPXk1ib9LlrOQV2dO2XEDbejjVitn3trc\n6ZF+6eERJ82X1TeZ/S8YaVVyTvpZ/dFMdcbo8z5c6+JJQIA4dNw1E38xEuwv\nmYfEb/uNqWrWFsBUnJ5wiXy6Dlf9GN9fJl+PpeZbmSjjp7wqeOaVOh5D11mq\n3QBTWpQDzCNPMCBjVwR8BO5j9ymOAAxLsHSLDdgSb+fCFG/fYoZZ2mrLi4bd\nhoeIOH71w9FltYvIBWkWjPVM3pJKD/FzllMrHTn7luhrilyaC5pmz1/0Tj6Z\nf5w1bvQP80/t83YddK9gX1wmnu1KRGs8FmAPK5Y3QsZe8wIfqDSZSwphjZEm\nJKYtupgxvLUd2s32FUr1j/Gbx5tC6hiydlbaQ/jmn2YX4In3q3r+S3xqlHPr\nDz3KdXT3op0wCorOFcwOkbhgImITqXjK212k8X1Wc8TsirwozfvN3F6c8tue\nxnSR\r\n=iNzf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5c18c8f-1620137387334_1620137457357_0.6073586787073217","host":"s3://npm-registry-packages"}},"1.1.0-canary-5c18c8f-1620137386037":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5c18c8f-1620137386037","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5c18c8f-1620137386037","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c9553dbd24ed092fc05e657a6f74990012c0d9d5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5c18c8f-1620137386037.tgz","fileCount":7,"integrity":"sha512-71Y/lPF3+k53YO9VGskZbqzq+6s3WwylgXt1qoXgshfRsV8p2C/TjzGAv5fE7T3ACXB3PniDSK9tDb9qgSmyJQ==","signatures":[{"sig":"MEUCIB6Ngq0VHowD6BD3MS/DtOhoRvq5PQYCnRNV+Z5pds4xAiEAicpTU6frzbAWZfLY+AWhgVausnDFDmzqgjX1gT/2lA8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkVYCCRA9TVsSAnZWagAA/+wP/jHJjpDpYx13WGG6Wo7M\nC0GaxlRb+iZZZkuUJNEosFDh9nN1ay/z3LlKSaftaq2w7A3cxE/M3ZEiSjwf\nA5n4CCMSejxCOlq8sQFYB//HfbIpZ5GDWdIrgf/Wg63aBxC3gIbHHS0uYzYl\nZGfvUbJ+1sLvYQI9iUSuisZeHFoQ73CwRQpoeIthaovXdg+C03PrGQKb9L01\nIsxdl90NyT6sVoVVeVBXxItDypPDWjv0E1zEgahmKNjkJ8Dhi4ur6XPp3IXp\nT6PV+YFljXEVzf0Gd6wib/fS75RT1q5pSWpZjpVl1eNZIXjxgRP1CubkdvjT\nrluK8CjgZa3rPD9q1zYAMDH2Ta7ur2RDY1U7BGo8UvGNFAC72blexNB5bT5e\nTc+r2ehfJUP6cShD3Ejqs6G0iWU+CqKGJaZrBbXDqP9eInFLfmiWfak0joQE\n2rSz8iqsNN2bLzjpQDqd45eFYCKmb+epAlOTYeZaM8YMEhiDTchQ4P9/5xZn\ntwjEduXmjDM5pBlNSrBCAe9ZonxHHsQChHW8oFHhGCzQY9L9oDQmyVyHT09E\nE2+Rbr+QcJnIHuhHkwQUzxz2HEt3P1wFZZyFdUuTJjgCqB6fIG+Ji0zdmi4w\n+Ha6LrgCa/IyYH9EtPDiiU+S0h+UvFyoro2w2co4cWMY/R526vUrCH0HK4PH\nop5C\r\n=twgR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5c18c8f-1620137386037_1620137474375_0.1898589741069947","host":"s3://npm-registry-packages"}},"1.1.0-canary-44c789e-1620137505277":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-44c789e-1620137505277","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-44c789e-1620137505277","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6317130ef680c94917a405e932b7e636b15bfd11","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-44c789e-1620137505277.tgz","fileCount":7,"integrity":"sha512-W0PQJUlLUwCT/8WCIiGdfUW3fB3uITsoCEB1hPmLijPlL5zXX8FfxKLsdZ6b9VMXNCe34fAzechzrNIWyzWYOw==","signatures":[{"sig":"MEYCIQCQm/oqPQxDr71yq9L98Vw766lyZHiAbi2cm6uOW0ThKQIhALOScaT7DcROwFhP1CGpROBhlX/0fZlhvJIMPYPzBZwV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkVZYCRA9TVsSAnZWagAAILAP/3At82xKpGGRVSF9C+zK\n2I7UQXosF8ZSZdv/t2GTk/8iOShQ/hhy3ULIT0kB6TzUy4mZNEJmX5yvSflg\nzUyIZVD/D2hzPfung2Po08G9RNJIXD/l/RAwG5VM+Mi+2X2gCyOzRzN5VxrN\n3DcqKiQ8A1Rsidzy7v1WNO6ePjpKIw5T+Zmi4wPQmyL7zdJnkemmoVA6NhlR\nHEriLccr+kR7lZRtGG6n3rxxzyo+3P1gN2qXTVN56fCkYJkPMwkPrC6TdmF2\nFMIoF8L6lIa4l8Ov7Jt0L81p4MIu7SMwbEzzJo3CPVAVYWfcfgX9JKC5oNVD\nJmk6l+8BKn0NDijxOz53piTIhWrF4Y4JqbJNIzoSH0tqYoZuFU1MdT8ICe8p\nNxaKZcwinfBk3zNnEJEzd9uLwGj6pEJZlzwNSLv0Ol9I5f6+X/AR6+OQaHPE\ni2luKCzG3ZPY8quTXrRSbq+5sL4xyHHAMmVJvEskqTzXL3UVSiBRoPdtXV5T\njGZXd7CavdSXX/lyapbf6ztZtx17B1pfAKHTXfkfQAJAWbelo/JQhqqBese9\n75qI9Ym88v+hwtkfvIXTh+RDGi6rtkKE9zB5780Qh4AtLHJPFsiz3YCHjL7E\n96bNKNsEsrSyNsd9rS+zJPIjFJNJeQ1AdOS5EFzOESdq3vV3iASAd2/rr1pX\n7j6w\r\n=9ZsL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-44c789e-1620137505277_1620137560459_0.15052366787823002","host":"s3://npm-registry-packages"}},"1.1.0-canary-44c789e-1620137510028":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-44c789e-1620137510028","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-44c789e-1620137510028","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8594a8c79d7739d0d5c3fb069629ca859ec2589d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-44c789e-1620137510028.tgz","fileCount":7,"integrity":"sha512-ql7d0uo5G1+JW7bMXZGsvYQ6UMEzxfP2Q9WXFlE7g44i63SPpSNLE8EAj145vSJ3D8zTYN+xK+PgD0d+pSEweA==","signatures":[{"sig":"MEUCIQDkJGrRrNSlNxlQ+5M709g/1viDaSr1eJ5fply+oBGw4wIgaafPxBOnUDtDDU/HJBuWc52ZBkNHj9J6oVbjaWzLlSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkVZgCRA9TVsSAnZWagAAwfwP/j9FHNKF7Iar89vHzKVM\nUK2em8Xhb4QzUUurn9N7mQhcy6z2YtSDR5rjGoCMzDBa5X9OCh8KLDAY2zmH\nEYZOznP2eiy/+tc7hJD92jZI2Blbq0HwFNyYE/rFx1nvniUc6APMid+E6cqD\nK2ZxLrlyzxvIhKvbiq/P2N7dpP5lF/fstkFNq8c4c+G+nFprtPBucVqzGXWC\nZbeUH9GjbtOSRXIX0nGDBqHXsxmm0fR7XJp5RrmrJsRWFkYSKe4AUWguEXuT\nBkScSQNhDk61KfozjJnRtvWukTLcy90Km7CboKZXIqaNAxfNHZeovnu1MtK8\n2qMYb6WR6eYhYlTDfDuISbaA2AT3/NMFjcYv45K5wLKRetHHsBXzaywn428p\nn7NffM45T+QA7kpFBAWdLAvC2GmVErOURLhEa2YKA9C8BcCYg4tJDuWwy/q+\nAV/HBdHfjHcQ21ar6AsB2V+DI0LIbXuXz4IvOH345LTAsNVz8f7/KwiYRIJQ\nrroz5Xlc4MpNpw9M9TpraGQVSneF5MG/+Z+a5aTbotFRFnFIPQQz7MwJaAZW\nFtQaOnmCUN1Mfn9Zo78b4e+EsruZIKahQiuQobhD6bCzkZT+RjMOtKR8WzMI\nYPlqFQWYPp/FT3hIDRGopysyQI/Di4WlDaHCBakw6IXWRY5DmxmPBcOpFF+q\nHBV5\r\n=1P9o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-44c789e-1620137510028_1620137568133_0.19799750748196687","host":"s3://npm-registry-packages"}},"1.1.0-canary-8debc30-1620166551034":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-8debc30-1620166551034","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-8debc30-1620166551034","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b2cd95b7971801b82c6c02f59424c3172bd47f76","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-8debc30-1620166551034.tgz","fileCount":7,"integrity":"sha512-xQqG4juRGezkqYI8+1wq8fRI0HXoKHBJhjKAGeak3qT7KOr5opRyInCKJ0aKdGreChV7BdWpyaJdty/fuqljuQ==","signatures":[{"sig":"MEYCIQCR9IEj+B5iVRCGUfhSIG8TMd8zBNCZBck+3dOwJsQdigIhALmzvzjhRudQ6W9xfTQGSJWvyfQ7tUiOmNkACrHrfDeq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkcfOCRA9TVsSAnZWagAAzuIP/35vJwYp3JSUl9N013hh\nGE8CXbbfPL0650l2k43kTqdfU8gn2nbfM9d+o7hh6JftEvizMABMNW1948Ds\n/+N6AyYMB2kFOOqthYS4zwYQ8QXdItmpUWNBWljP2UoGYLYHbEXk1QR8+J8u\nCyaDvL0IJUOWIALCejtuyjucwQAOfobXQ/Bad2CPFWx1ikYrm4sFjFfxekfV\n/VU4Q0EAfb8LesiIZ7z+u3Ra9HYu0D0+I3/0q7H5iE4UqnHomiZFfy/OozFd\ncDibHafAvOl/vqDxdpKEMK/gaGdV8f2REtdkGxjzopcTQje5ITLdzhUmhO0A\nMww66P1oUy07JrCG0awte7yn/2hsNCcbbu8cI2/NH9l5wHJF7mJgdzIUdzid\nVX9f8wMEAKCJ4PaZcmjBxprObCM6QKEvYaKKUAhsz5wRrwAdiHJEcxszKVdU\nr1UsI0qpd4iTYCGRURd0pJC2ImKWaRv9E5Lc8YbgY6l1OOKfLawhKN0mta03\nS/GI5yd0ukcQ97JwyiqSYOxcgNj9zqkVB0tSomSYyaommzCxcT3+oFRRvALg\nMG7KW8KrAFZFI64LqhngA0LoJQquIR927zXnDhRQ9KPs9Q4JaWwYhG5N0MOe\nKvtvKMNAv4/MecpRDB/12NI4v5r1Vl9PUF2a7qvcLS/w5rnM/5C7c94zrK0i\nT6Zq\r\n=I+JR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-8debc30-1620166551034_1620166606126_0.013210278638341011","host":"s3://npm-registry-packages"}},"1.1.0-canary-7b44cec-1620166555026":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-7b44cec-1620166555026","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-7b44cec-1620166555026","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f974e3ce731e1912c05ee5acc332fbcf92c1f117","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-7b44cec-1620166555026.tgz","fileCount":7,"integrity":"sha512-VaHv2U5ccpxmeu+TIILC1CEvn1PfYzrsojWGDEUUUm8Kj0D7D6H0yKexDY+EpOHtLR3IJEzWDEXtyqHVMD9SwQ==","signatures":[{"sig":"MEQCIEMmAtY7w1i9FRKjiQKH01GNA6Q1MJU9rNf1mxVqaYQnAiAMShOQv2cH6bF9O7NAKNmD7W0a/UEI0grHnnQ3nWFB8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkcfXCRA9TVsSAnZWagAAO7oP/jImOVP/l+esXrhgtg6A\ncTKv+Cr6kAIcejMKNhi7RBL5cOjoOeAbi2O2viKEfvHGrgHZi6xizl1MLBBh\nc4dwEDRb2lV1UzjMbOMpE3QY6zve5R6u9hg/KoC+b8jbCXSDEKaazGKR7PG0\nUj7DLih8Dz4fTf8AFzXf5SavGNMfF4QH9eWyveaZMp4OIIUmPRqhTBPBRrPg\nfMEgduscYdvrh9SphYFn4Y1OVXbvjGxvyowwTpSGTUBhQh49IgOhl6gMcOIx\ny/iOslzhl5l6P82tikRORJzX9wcaLjqvfbuBzD4JKGt9rTiKWM/OAuSWD9J3\nU0y1l7mqRBlZThPAcfcP3i/LSsg+0x9/KFSRQGnov5cpRYCKiPrjoK50hSYi\nNjMdJ7dhy6eaOunobgrpcGB+bUYLeZSCHiysjJOHLm7dTvw9g1W/NceDyA0p\nOfH0LexiPuQeqMQn+xqued2OelusymDXHC1HOMcMOIzDLvF2A6vMw/wim+Gu\nFWuMfEnYPsp2fTtGXeKa6qcbQATgfN5UMZjrvprAw/bc6NaDGJ9qXeUo62Tr\nppoRabbObLjA0AJGGf1EYBker0TuFY5Y+9yhz9nejoaoICThlMmgq9bjal1U\nwuxvVjOdMQFrRUKExSl+TmCgEqEVHzgm/umjTJZZe0EQsDEfHNirLJB1g1Yk\neNw6\r\n=ht7l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-7b44cec-1620166555026_1620166614779_0.13938342230397316","host":"s3://npm-registry-packages"}},"1.1.0-canary-a08ba9b-1620200955525":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-a08ba9b-1620200955525","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-a08ba9b-1620200955525","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5047ec3f2b32e08f3b1b9b45ad8e1a6013a4c676","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-a08ba9b-1620200955525.tgz","fileCount":7,"integrity":"sha512-fAuNYT0iJ6KGETtseTYc3BQi+0YrUcLzL3qisGqAFwIpQS80eFq8BoMCzkeW2NK+8MjGUm1+ElIjCNh29dfyTw==","signatures":[{"sig":"MEUCIACFRCFE7nBCkyOoEtiFVhhTKss+SgZsFwMg9B8F1yrvAiEA0HXUHNUbV6kX97EZCkLr1oNrEldj8tPRT2s3ZOATl9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkk4zCRA9TVsSAnZWagAA2NMP/1b4zN8kUHJwbhXRahhU\nZTEDeLivkzELtK8xPS+8dId/8S3aIjhjl5Yu3aqVOY1qdDdrSwNI2o2dCM3R\neJnx9x4DS2t5NSZaxtTzaoTJ45gwblYE+FTn5UW9aVMSKRkmis9v6cm4JvVH\nhAGXSAmYd4Yc5cN0GG4Om0rfGu+IKnCHwGcqOgvrBj7XNLBMttNQ6xESu962\nnaQMYgzJQlu80ag1k92y1T8pqHzrPplYYP4DelASvm/XkuS37QdM26tRwb4m\nAUylI5MwAVT6XP9tszUKjc6ia3dCtgffOZzDzcIq1AaDdZ0an7nHO+Pxe7F0\nOllXWeF/6nCKq+kxnMrJaw0sgyXD4IFVVq+SrCAiJdZ8zC2O/TIMn4vWPB7F\nzQwvMF17dYIPVWYBNGj5x5Uo2/u1yEeZ9qjnCQzCuYjlI1IyZj6R2Q8I+Uhq\n/lbx/VcMzzexdBTwK7voxgVpStWJWUzFE+RL6A3bxKgMMXizDRd+7V459j6P\n19A8Vz6p4TIm0HZPqqB3rqyGT5b+cHppfCNgsAb6AbYvbiODDUo3G+iOKnwm\n7G+yIsEMgCJzBY4qPdLhelRS1uIKJize4b9LYLyTCIoqmQdrgAui1aGdivOj\nhc4CQdx39VTJ+lh5YEgw3xZw6T8n2w8CjtKy6LAqkC8Lgfr7vcXeducM1y7c\n9RZp\r\n=KYC/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-a08ba9b-1620200955525_1620201010928_0.5103260881963199","host":"s3://npm-registry-packages"}},"1.1.0-canary-419efd5-1620207260494":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-419efd5-1620207260494","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-419efd5-1620207260494","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f4ee9af09df2e1827291ed3d9696d7bcb269867b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-419efd5-1620207260494.tgz","fileCount":7,"integrity":"sha512-QoTM0WNNp0Qek6QvlSBl6aWZNkCGtgGZrcsIcZeddXL9DcmlgPDa9J9XBPszv6pHvkG7AY25Vtz4l12yMBZHLQ==","signatures":[{"sig":"MEUCIQDk7T+KT+9IvdBoYzsF9zNQAQywHyWOxT+GOCDn25n5PQIgCyd8LUMnC08RykMLcza2RuRiTIlhXFchhxp2HkqOVd0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkmbXCRA9TVsSAnZWagAAujsP/0gUqhJQA2yeUkb06vpJ\nZz356+pnPUX36nMFyfgs2cye4z7eu90//WUHJcADzhQWhr3O2xvaXTuBoWog\nT3ncpzjVDo6HmAZ8B1oOCNf+dFdX4EvgD2In1d/Vbsc7KtJKrMWwVxmITult\npeDRj22GlaZGXXpmg4aybs2cEsj+SWxuTk2fVfkNCeVkxdU4XhzUQ2+hdIMe\nLO/XSYufnQCTUA0c67XlrH10OuJj/gVOoKW4iE2yHahhj34fbJ03i3NueRbu\nE91alyYc7lO3ZGf2/9UkCATxzjpwcCRXgibfBFz94EUyVHw1y2Iu8diGavdR\ngfmj5r0tGFX2vD9Kv75ujVEO4egim1IwAsGzwLCLgU/RJAVNhqXsT8d0a2dV\niss1TE8lEEvkJ58X1ycsjnc7P+cUmhS7i7chJBoiUPHWZJaaZX/w5X4WWikg\nG0UE3q9OI23RbX+MCCx+pzuydpuwUAuTnSFhdFuLuAAGhOFEnozf1Rnfm88G\nT4FYargwFTADiXTTexmpJq/ffui8eaEfEMbHgIn3rrwwZ4Cdh71YGBYsdqGM\nmUHVKLXGpZMzmyBQ22bFZh9X434RVuM/sSLWYVMQik99JAUGZjs3eRQDt5bY\n9LmBly0GsSfNgRo5QE5P8MJg5iV5OHT+Hz0Re7Y1eyuHOMm55AlusvpmUExv\nE9+t\r\n=zNZ/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.5","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-419efd5-1620207260494_1620207318608_0.162808672274237","host":"s3://npm-registry-packages"}},"1.1.0-canary-564c44f-1620252852112":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-564c44f-1620252852112","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-564c44f-1620252852112","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"221bf887e1c23c7da98b79b910a205b2afdb8477","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-564c44f-1620252852112.tgz","fileCount":7,"integrity":"sha512-5Yn5sCuuAVNE4lAIKL76rGpuh43a6EsROjmlUQwJ/TX4aUuKpAHwvFf0ZwMMWGU2tuvvfkk6W464GGyvrWFhqA==","signatures":[{"sig":"MEQCIA8dFh8TYh+XnP2qTBA5MFVCeYpKpC1DXzAbtz7tsvZXAiA1FT5+sL4KWcJqugGPCJZjdrhJ+xvsIdqdJhbBaUMN9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkxjoCRA9TVsSAnZWagAAk3EP/RndFFW/iH3k/VQHrLBQ\nADWenGxsyVF7M+wNxNeFlb4gT6DFh/suQg0MNX+fiX5bmLAgCyE7Ybi8cQIx\nAv64yAxJlbgfvLG7MMQCwPndDO0JxvYiuxxKH6EavRXTIdEgSE/S4IsCPmRh\njzh3WoshhUWy4/fT1wju+xum1+34RVKgV9OoL0K69aDINFoRHebeUNNVuqq3\nDxpHNTWdVy5oehMAKRw6NlfO6LzH/QiRfeaOobOr0gXPSBF6JCxF1RVG0ktg\nClYcrYDpWa/bGWdh6ZklJiAMhL+ufrsQcReK7XKkOCMJeZt1ZbEFsQirkz2g\n3NNzweEOYHw74a91tVSiZNQ9C8bi7bnerJDR8ViFsrdwrZZ1ZSN7NCi2VglM\nFFufzImCWQI0QvHMUnuBCiFXXhajQ9juf9+3Tz0fRRAiLjHq2ENQ894+V81+\nQyrQPZhEz0eDCp+70yjuj3uh7mJoQeDR7goij+4WsraA63Tmxn2T2EBB1VLp\nr5hO1VqVXjQIV6lfGsVXNhlbBoZ5cx8NSqp/neluCO0ukqjtMv/RWOCJnLBP\nNzBORNYXA45DV0HZKreMJljjIGY1uPDRWgYcWhM52b3/BR1WJJaDAptUwLJ0\niyH2cXeZSRKGpa/c2QOsB/iCvRcViDLOk6GzTl7eDwnb9jPtEX1k+nQp/ctr\nLbAj\r\n=GZXO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-564c44f-1620252852112_1620252903933_0.46056489708730597","host":"s3://npm-registry-packages"}},"1.1.0-canary-6418651-1620293397770":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6418651-1620293397770","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6418651-1620293397770","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"27d4a3a1b9926ca32b1b07694bf0a3c1f36c7eea","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6418651-1620293397770.tgz","fileCount":7,"integrity":"sha512-RCt+H+E3gqnQ8PEcGnoXfldAG1L53iEbhVAmJysWSRthNoLj+Z92b0wpFIFyIiMZXObReQBWYXP72CuHJUvX8A==","signatures":[{"sig":"MEUCIQDImdxVlrc/xl7qOqLB1PkgF+NP/BIPK+OncV7nZl+XlAIgfjCaPyTZfjZbjE7Gi/ARUa+HDWmtAsFUO8Wanpf8To8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgk7dICRA9TVsSAnZWagAAQM4P/jnacGJom5dcOaq68fiq\nQ4z3p4SyXiXTnHKg52IoPZEm5vtdTAbZrR7QEIxPfFrRvdSvkNC/Zw25lkZY\nx4EYyZP3G0izdy5OB/MAMsErYk4TeLhp73si7KpJDt6AoXIED9YK7kfDPvJr\nCWiCeC/rD2IGlYMLq0EujyAe89ydBP+Kxvsha+kWmVoRzsa6WGM3dpJbQSwv\ncNY42DhmxNTNCo5oAKCy4kUGGw/54T8I04ALd53+rfXkTeC0B13ocGC2Fo9c\nmtiFOyCmMtJrgzUg2jJ/D1Q8CNr1ZIFW0wgHaT4dDzopd81V6OWJFUzoEj6U\nLDoe33514bHh1dgo13koHXlA5fVcIrAKteY7t0NgmbOcmN5LGXXrHS1cbHPV\nINmeMgX5Uo3l8ppassTVhBJWrQ0GZi/gKyf09f64xbLPCnppULyRbl1OLgzJ\nAZG7R31XfLgVJYCu1gZSDJkHrUic2o2TAxKFMDpVFtNnU9M90xx363MVkc6z\n0hmAirA73lATuHlUBChLXXugfYyzl7UAAS2GX3d4T8A+O1BFus80Sl/ElYz7\nMDG08XpqeuMEZ5CRCTd9ndQ1IecyZY3BYuUcNYEaNs3Nwahw0BWHypxE5So+\nCKQySPDBqRI+Y5l8B0y19tySEU5D557DPBd8gwPhbboKN+xt6nyuX4Jl2uKG\nHM5d\r\n=K12l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^18.1.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6418651-1620293397770_1620293447783_0.6653227411388978","host":"s3://npm-registry-packages"}},"1.1.0-canary-1a9d664-1620396387059":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1a9d664-1620396387059","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1a9d664-1620396387059","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b5b6051807ac341132ac1ab95bb8f8320cc180e3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1a9d664-1620396387059.tgz","fileCount":7,"integrity":"sha512-P28IYScJiEfcUeNICkC86xrMhgM3TVVxpLnhsVLzTnRI+yh2u+7l9XcO10znN53L3QKiFfxzPyVGaSHV1aW1Sg==","signatures":[{"sig":"MEUCIEx19GkBgkE2qjZ3S5vv48zGQ52WLa5WaJQFJoh6y4NJAiEA+TyH/3DtUwL7aSFSNPGLnLEIPa7km1NJVs6+pkI6h2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglUmgCRA9TVsSAnZWagAAwqYP/je+EGGb4hfsbSO7rIst\nMxbsYJXJjo86aSOv2w/b+xNc3fxmCZ9STUsJ9UjtdLa9em2CkdnbwEz4Vgt8\nBjvQx6QrODDCMka2E+VZ+e9b62ZoJFbFX/m0KHhGPRpKjwwx53/bQUibjo9p\niyTXu5YTVSkMlPkZcjQJ1uFowigKfPEZEqWmO6gAzavergzVWeTPlHQi5GG0\n6c3S0zEynUQd6xw58aE7orvKmB6RCMmpGoqNvqG6biNemUA4z75eU/N6kMRh\nohkcj7Ic90HuyPcL870Iwg9T57Y5JWE2dtmmkCGJQRkBYSFoWDHDXSFQ6nsz\n2WuJ0sBoZ9V34B+MFgCpzCk6K11jaTQfritgYmifxolbEBlDx//PUwEvGNVk\n75adqI13C1po2ZjOvQxXr3iT9Ft+95AjyPLc4GRBj45qdxLjgIiPE7JXQQNH\nRt4ib2clA4XQ/SLlfX5MLlEz85RSRT4jrV6KF2JdCMZA1q4Yt1RuDKCd5zBe\nLzWVo8logq1tinLI+ClCAcQAydh5tUC3SYdgSpRjR3UNaPePJtOPTNQ6lA7i\nJBY+NuQiNY0ycKGbK0Di1F7qNMQIY/6AKlOCSe8yZoIBkQRgRTDRfi8N4Yq+\nFuCt4sDjxc3l+SgLSsz2lBeJehrnebkUpugSWNaXhP2/Av55oCpWxtUq6hUs\n3X/y\r\n=mBxP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1a9d664-1620396387059_1620396448226_0.6208297595986325","host":"s3://npm-registry-packages"}},"1.1.0-canary-1a9d664-1620396388861":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1a9d664-1620396388861","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1a9d664-1620396388861","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a5e8ca48fe9ff47a72567ee5c2b636f0378403a0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1a9d664-1620396388861.tgz","fileCount":7,"integrity":"sha512-Npdc/zAs4+TdyCWG5rDl2g1n6WSf9Y1byikN1RZmRfKSty+Sdaww7ApBfrKzHo+GD97Vx6OB3pgBCMyCW+T6AQ==","signatures":[{"sig":"MEYCIQD8Jwv8ub4v/4eBMsXAmNnu0gZvunSSt4zfgK0Q1dI6QgIhAM4tvjo9+CgUvOj42di8nHEv92QN9BhLcHXCmoMYGDCD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglUndCRA9TVsSAnZWagAAKTEP/ixXer3zWLQbwkJmw3q2\n8GEV116VrzvvERi2X4QmY5FQ1xep8n7rLn2P9y3wsXr5TUUvi1rKvOTjYITV\nfSYCctDURDVTQIwv4llwZwLX9KAcHIidGsyLbw6vuEuv04BHfBWyeAhOx8yc\n7VxnCjCA9BuZkeLx4K+Lb3mzczmhjR/8ct/a4NPd/p/f+W7zseTccHrxKkXz\nDKJ2PceLFkAvjoU7Xes2wgVKSKJ0WJeI71YXc1cBZyt7NeDnlAT3fXxXhShS\nQmFIdNXCfSS64V4Nv2Eo17oaYtzoJ7PQKkL/jyz+tvIDFy7NOIxvb7D3PLiU\nqtmsuGIJMTlb+YrBJpHMFyzUR2n5q2ojq4qiqjT25nVuBHYaj0MxzWblNkL8\nrmuIeNdBKeqOT2iik0FoZj3pEOniJYZApYYvJmYXDqMDiMlM2Pgx/jji2rLn\nB0vajJCcPJ9TY0aljLy8wWf50x+g5i3WaOBcLvAxfi4cqWcnNxopocuM7t2w\n5zug5AC+wPb2SYE5vTuTPcjtU1AX2q2dXs70MZNk/HNyOUB7xKnk3ImHe3z9\nJmevE3SdveYZd+QvavaoO0ROzZznSHUQ73VYwiqe2AdsAWAA9HkYREgKan6S\nWP570SPo5W34NIy3zDn6ORjsOsKAoD3wf6ilHolZixcmUhR/Kfmopg2DS4xQ\nDWJ1\r\n=BM61\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1a9d664-1620396388861_1620396508824_0.4800638765660683","host":"s3://npm-registry-packages"}},"1.1.0-canary-a4f06ff-1620399645072":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-a4f06ff-1620399645072","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-a4f06ff-1620399645072","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a833552b14883c6e2342934f16474adbac05d80e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-a4f06ff-1620399645072.tgz","fileCount":7,"integrity":"sha512-fqZwFmG6ykvSlZPtd8r9BSNHvPGwRtX5Z/IE3oA0qAt2ZtdY4rgtJzibladiqbQ9t01mQ7GqXssf6DKKipfloQ==","signatures":[{"sig":"MEYCIQDvlU0s6LgPvjoHm+2khLjzf6+5Lz66g1YhEPbTwlJHEAIhAOCJblyLgbKrw5jvykgCHQyWiCHzs+8CN4oHDMKj08d4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglVZgCRA9TVsSAnZWagAA6rEP/jh7obpaJ5WQC3+8To16\nusM67vC14YtD5wJVki9y2AzpXuNCIR4PhC/c+ThZDf5cG0Qxh86gQaAlr0fp\nBkmY1ytJlxwE8ONxNUTDi/d2hTHTf0pXlCR5dL9paf8sC8m1Nsl1QT9fYLhH\nQk3sManzTCht+y6AtTVffORoQFAOGyGPckXFqKaCxrjeftOvuCIJFyBBVw/Y\nHxhVivbE6JDzGRRX7erR8a5od7xfJy+TscE/Nfi/B/nMobMT8Jal6aqKzTl5\nnHa2HLH1ptD8v/pr9ejtG5RMxvHVKq1BZZksmWx5Yg15EBa0DuOc/Dg/ROoI\n5idl5ncmX1Hjwpq1MyCWwbVw2z/rMR+5ibvPtZSYK+yXUbFgjM6JdBH3gxBi\nXK6t7giktt2vx2uAmvSNj/JkeihTEUeYl0wdxGRKBTsw9JPBoDQoDSXAFLr/\nQZ4NdBpgr72T3ICE4hrsGpM00z+reSfeH+lOd9HXUZ+l50lN5sG6g8reXn/O\nGdI9w5GKaZvoiK6Qlih13IGZ10Na/KTkOlU4QJHS1F8K+FEPv0JANol8rHR1\nHZ+T/Gnjn/aomHegcJttbZU8FO+K0b6BBly8WZ2mfRZhtzt41RZGZX1a9ttz\noESQmSpo1USpVwwzHUwlYN62S1s6nO0EmdXeW6xz1lzENFpLyYPsY3Lmsi0c\neNl3\r\n=0HX8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.25.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-a4f06ff-1620399645072_1620399711501_0.7230669699311638","host":"s3://npm-registry-packages"}},"1.1.0-canary-8e5518a-1620442273487":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-8e5518a-1620442273487","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-8e5518a-1620442273487","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1551e683206f23f8d714acef6e3ee05d188a9a7a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-8e5518a-1620442273487.tgz","fileCount":7,"integrity":"sha512-vhjBrCLAnGm4hFKlWfpDoGXBI8xrsCCIpRGIvZ+1yjjF3GUvR5buGrymrwSHuKEOf5BKQCIbz/tdRdDdIUEpDA==","signatures":[{"sig":"MEUCIQC7UoQgmtlMcFPc+x+Obw8NgD/N8qcwVIwSdusN0HM23AIgOaOB1pR1JkU2wmeoqlodKW8NqWPxY6EvDOAx6lhAIE0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglfzZCRA9TVsSAnZWagAAukQP/1Dnuu9Rebmc/mv313LE\ny4vAPdBdAZ/ZDYLZ8/PXezvxEctKNJNpbVE8RegbIPZpXAZr3h6g1k2/eMlt\n1jvAydg6xe/9cUFzTTWDCRcVAexV24+7IcWUygTgelWOGw3QMFhKp3TEWJ9R\n1I8GLOatNkByiJcQlPJvv6rLgqK499E8frqHCIqx5elOlDcSlXeggzBVqABe\nvRv4z5xWpuK8HzmB8YDDte2QuB0MpIGv3R0Io1FzavCk5sNKlanArj8QbWRx\nJMDyE2exxwGR8nJ8+YabvhcgKMjxDS3i2xJWf+bKAmZN/q0QJ1uNY/8po1Q9\n75zajN3CLW31Ox9fkqkqk9fUoFudiH5kW2sDqQPVMqeVFgxMa2AE7D0+geQw\n59znGll0u//Xoj7gZ4PM0u55V43uwiXqq/rt92F9ofXUYGSo8Nybt4xnku62\nhR2yEllV41oyO/7Mc0wnRBQ1EHtsayj/UBh2cRkKikuMVgPWfDwyKhiYmVcG\nP65xCzW65xeEFAFxluZNhaL6FDJV99q0551h1a6pgdF/e805HQoivXjBVUYY\ni3paEbWk7Ezqp64O5OPOrSjfV/zbm4YGtjOzMZds+oFWcO6KVeDRtCjdnjpC\naEd3wZJbss7KyISn/tD+qLBBGumsyh91kuWQcoduwHn3BrYyXE1MpU5kC7y7\nNd5J\r\n=CZ6S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-8e5518a-1620442273487_1620442328564_0.15793046898444696","host":"s3://npm-registry-packages"}},"1.1.0-canary-48e3e67-1620599074633":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-48e3e67-1620599074633","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-48e3e67-1620599074633","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e7072b4caa510e4ab25634fc9ac9b4972f78d5cf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-48e3e67-1620599074633.tgz","fileCount":7,"integrity":"sha512-Qj4/Ka6g3HFRsWMR9hpKmzud9FCacVM3rTwqKICrlB+szKlvRRSvaJ1zOc5RgjgWUB4LOoHMm7T0AhRQmTwU0w==","signatures":[{"sig":"MEUCIQDdt4qkuJEETt5kBu+g+x2XYdr4IoD+yIi4MlbJ0OsK/AIgfAoyA9jazwsrfVY4zKn+VBSZMI1xQMZMHRJKXtZVwiA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmGFXCRA9TVsSAnZWagAAXW0P/jQYMeaQzE/40JSC4xG/\nyaGxuY/gY3l+8PbPki0dd0u3S4BqH53KmaVuayJlyFSXdcQqOCFFeDN2NI2L\n38+cIWA4sNGmlaB2L0pLG8VKOXoe+aJmejTlLwVn5W2LoPfPVJOHF3T8vr8H\nIsI6kjYzxi7jI+cKA8ZrK7i/qDmVjWEueHq4umxN31m5KaR/+aDFVXNIqL/o\nUgL9GtWAApkkQTBxkKwlptZa9vzMG0TKhSSDZL0z1yvUKR8wL6B7SqsMb39l\nWjdIxtltiYLIutntrq++Hvwsf6KUPQJuL72Fp6Z1+IdpdX0WymCeXTPwsOPA\n+TN5WfXaS91IXk2p8JKq7WItLjotB3IyXlsKO+0MbBo8zmIPfDtSCGcjm4Cs\ncrCXqb8Q/sb97Y5yIz6Fn1pgdPoXG3yb5MMr1waQtVifvwN3zr3UKMB24WVv\nCUqdiaviJJ/EtZwCgJAeuq+PUbvtqGeqisUBD8g/DZxu4yqUtDU71/JNfcBj\nqMV4VT2teOH/aAZ4QGcly/6AtU53pyONgHkDB3IkeyAtCg6ga18tPrxQqFwc\nuIo8TPsNaPOvRtwGlhHl8ShBU/+vyPvqaO0wMThfxrzVp0Wa/2aUiBT05n9G\nYm7+USsLkryXo0WegnnaLHtHmvTdrqtkYn9Ta/qBQLSsSMDfe1jUUUKqZKGG\nmaeI\r\n=uRUY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-48e3e67-1620599074633_1620599126898_0.18611079621185955","host":"s3://npm-registry-packages"}},"1.1.0-canary-33bb5ca-1620633625996":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-33bb5ca-1620633625996","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-33bb5ca-1620633625996","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a6ed91da31615ea17dad91058d982ec60b7d8e47","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-33bb5ca-1620633625996.tgz","fileCount":7,"integrity":"sha512-2Mq19qHeeXy+jdxDG/ovGplHq4NVO6KK0b6bvbEgVHWX9KLXcFlnNa4kfMVeJ/s01kce5tTcGbHnNfnlEkXFtA==","signatures":[{"sig":"MEUCIQDKPwZOiCPpepwC9aNJgiQ9EXwpHkoIriMJFzkhMj6Q+AIgUYmnUca1Qlwf+WKUdl1/lj4cj3d9gkc9AKFX1G+rXm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmOhZCRA9TVsSAnZWagAAWQMP+wWq3ttjBpdWYkgr5MeH\nSBOAiDPeOoq1NYj7TH6CuEhJUlsAJv6ig2RX7eSjTPE8L4hCZT1RxiKV9AK7\nZ06nawTm65lNtXU3L/6UT69OGTiA9Ts1vnSpbVxTP2iBg1Fe4cQoFIi5l1AJ\n+reLf2CxsOeQO2oItLTR4kzVayt1uaTbOSC5TYLU7cpF5oEop6fIt0xgDNUd\nt4936Mk6Nt1QU1OG7jwk94QRr07ETKj0DgvVIw9cOI+uFfPxymn6gxNxAMMA\nau8MCfhtLi0p839ExxY8os4OIBsheWXNNfWYgmJqv7qE9I1542QhHOYNhN8Y\n+vY1jIhgQe2jypqcjc28S+iL/YbIQThWNc2AalP6G9prOeZ08/PD5b6zIEv4\n9tVmg5MEmwSxbfrpXKChteJYi9WTCu5z3mt7oPVm+IrAsJZbyWg2NZDrW/It\nm+oRAMNizFeOBOIdIXSSvsN45L1oLylsqn4U8bySZzWlAOZrlK6EMvvQQ/kN\nWQvnpDuE6b8nl33BVqgJjAVgFxlM5loqwgdZM3tVQ+W+kWWYfDrf4u+ZV4Fc\nlNYwa+mjmsbRRVthV0o28JvvGoo5feTAji/9DAxZCn53K1m8xhR6xbr/9ZRN\nBbW06oGuBeF7XZSoc/vqJ1RbRDXazpEzyf8/tx3WuQjw3CJ0X/URgiQo0e4a\nCI+i\r\n=120l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.47.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-33bb5ca-1620633625996_1620633688908_0.8288815890111569","host":"s3://npm-registry-packages"}},"1.1.0-canary-1a1e884-1621054556320":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1a1e884-1621054556320","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1a1e884-1621054556320","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dfa7669696ef6e410e778f2e5ef7ff77c0f7c495","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1a1e884-1621054556320.tgz","fileCount":7,"integrity":"sha512-kZNtomEPfTUnE/YbgS1/h46C8hy3lC2QB03gMhT0aWOCytmPsebDlCvp3tJ6AaALa/0+aBw0fzFxE3lr7Pq/Iw==","signatures":[{"sig":"MEQCIGxckuq29Nfkc9OZWcB9cX9G3NHaoSamrdkFy+RfYVMdAiASJCeVZpE6g76/fdSs+oUs+vmQ+U1NlJ5kmUW+WTQxOQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgn1SoCRA9TVsSAnZWagAA9XoP/1h2BeBlsSiiydKu1zwt\niSt9SbL2eeGTto+FGGbK63X6bdMKK9rg9A6NRVCc9E45zUKWk+D69NA8SyEJ\nhQ3yeWd8YRcdmo8RVy/ScnrfKntIt/in07jedhDWKnYeaeEu7srhwS13R18J\n3i3T9wpX4PdK4CY0iRhUT0LKrf7nIgII0dfoLayeySjP4+YuefEUJnJUUyc8\n85CXiyadOzMu1Z1xOimsigdIhQsWbJWvuipjUrJp65FZkdwRVLi7CUNSqoX2\ntANLDnOD2kyI6/5JLnjVA0yuGuPPq0yS5Pfj7Ot7vbJ4giP7J6VfnOA4CEoj\nJFVYqYWC1mNsG9hIJB85f96DucLHZmBKqgf1bCRUxzox95SeZwWp3hQmJtyL\nOmc5S/Qd5a1YuMbLGIFuqJ0sCFhtSJScp+AgbKxlTZvTS6oGBVXxKQ3ttuwk\nA4R445EdwxIevxMO1GlFU/7/TUvwymzaZno34YYHue5xrWZQSIn2oj0xQDvB\nI/RNSMJq/zv1txYSm3bWSTKH1TLoxrKIjteBbKY5y22pDe3vSIO1PpDJjJRd\n67sCSM4r4VSaBgNh75xpJ5rtwevf4JXUGYscu36X7OBuTQBeZMi70DGpxAKJ\nulj5g//tyB6Bdj4fPiFcsVU2rpqOJoJCTuGHMsaqvGShtWsbR1yrwqLzFmPZ\nymCL\r\n=4754\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1a1e884-1621054556320_1621054631548_0.03170724613152354","host":"s3://npm-registry-packages"}},"1.1.0-canary-1a1e884-1621054557530":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1a1e884-1621054557530","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1a1e884-1621054557530","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1875cb86c553e98cc301b606a3ce790bfe97ec90","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1a1e884-1621054557530.tgz","fileCount":7,"integrity":"sha512-ePycYUxfVTvlAVozHTZ6i2DNIAN5H1v9bXPG53hyAIfJ7KkemOtbe2z8fzzOkZvewQJkXkGsfq8EUsOVBcElzg==","signatures":[{"sig":"MEUCIQCcSx6nLt+/y/rn+ro1elLbwGNl/QEjOFx2EygT1edeMgIgO8g8D4OIQFnttp4tB6hnomdJ8IgQdYGNtR7yutRx2K0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgn1TOCRA9TVsSAnZWagAAS+wP/34RrMLbeGGIzI2BZkk+\nvL0/siXYocQHP5F0KJt++CFpUmGkbFihLEHBMjFz/6/bt1XWUQTuvvZmU9uI\nO/N4tv12EeQen2bx/+bQVFmegslbHivX15v3QDZ7x6Emg2qBN+lVZNZmamdk\nH9DHusLXMFLrsdnTQd8wPo7Uq2SO5OItvJji/5qgoKkMLPYTfdtXgL9bVDLd\nzOrnMizC+cXDAnC9jYLNrMIB2dJkYWlHpvlHgoGoMRsP0G3e3jkPeLNmncii\nM83MMH7q1RjeVuQbtauWY+Zm0ReZR9gDepxd1u7H4NzKbfsjd4TFUflJxvcd\nPl0ptZD2pI/GJtC64QnGLBfmj+qoVqP257I2SGjwBSe9Hx/O031Vr9FF3Aoe\n+GCYp0Fv0gpCq4bKOP1CtCvS5jjfsaI5js/G9YdqgJR4z19I+v7ufdN55WbQ\nmGNCB4b1ebshCKuHRL7I5rbUnpAfoBl5auom0ZIzM1Q8s8/p8b9dhMmQB7iQ\nFDj0ThPJj2lEnDpnciNjmuTEuIZXQdBNNzgQsDzFU+JgUNWdrl4pt4g+GaIg\n0q/j3boJ2FIkAUm7yq4JNiPI1boBJdRi6iGd6h4cd9QjLqUPeDyfvu+2yIiQ\nqWjJYEK5SXoFFkQzyC68+3QsUOiXEZcDlcUPbYW4U5GTsnndyXnfqjfw+5/1\n4k5M\r\n=T8Vo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1a1e884-1621054557530_1621054670304_0.08784930683237735","host":"s3://npm-registry-packages"}},"1.1.0-canary-9897994-1621206636962":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9897994-1621206636962","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9897994-1621206636962","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3e2aaaaa85e44223a738f8a89705bad7a5c6bb3d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9897994-1621206636962.tgz","fileCount":7,"integrity":"sha512-62VQ2nJ0Gm+2JJ4wSZOQbQ6cQgXLs5/YsZV1k9P49fCegQ+hgk+1jCvyh+aQDB0kYJxzQrxjPgiHJPbBIP0O9g==","signatures":[{"sig":"MEQCIHItetswIxPjqUClgTnPomwcNSZIjhTXKoNh++9WGD9YAiAdkrhtmbaYRBQbPve5YaXFNjIDkP2Veu7Ut6OZkJtaDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgoaagCRA9TVsSAnZWagAA0zIP/j6e/QWapgi6iuJPSBfh\n2E4HDuJOGrYDZPqUGEqU2OVA4j0Dao7kHPZZiiccPU/KhWa4aN1SvZFScvUI\nsiaQUJzqNJa6mm91+DlyvyIHd3mqVWc0zn+oUkHhH7LRJHljmNGH0eanTXvR\nuF+SimHhesp7GV2cYhX4H74VFaRPkhYodQRi+swGGSAfSMKGvMlr54xEQVe5\nzUwJNlXnvzNEALSJoWzJI2yqhjEXduDZhn6fqDSH8aw5QLrBYf7FhRzQA2V1\nGT1FggHkNbegwG1kwcQqjk3rToLckH+e4GLItLuKILbTZ29b+lmXUxlzKJO8\nlm6auvXuf1pFOkvFr8CTBXcI19qtUaMdeaL5fiQx/VIevONLIAAst0mqLAN6\n+jyLkG0X0iqxKJiywtO9fsqC1+UbG9VG0dtmXCph6hfDu7LxnL7HRvkA7opz\nBhzOp31M7L8zVxUkNfGegbFkfLoQyaYM8RVqDoYkZPism0yVc/xgYVW6dOEV\nfOQlvdoIw1F/wdFlTW7NiDZbSSTuXfYvhErNDRcYKFQbTQw9qZGMvcWq0E/p\nv7Rsq/Su0KObGU27y8R+4taCCUyb5LJUytMTeE45F1560OWry1T9aNjpP3Fy\no08SY+3iXcfUvawCdCzsxPeXeG9+qVXkbcYuYRPGqjDX1rHaSqogvXgsPWoD\nudDs\r\n=2qyc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9897994-1621206636962_1621206687406_0.6672319987165227","host":"s3://npm-registry-packages"}},"1.1.0-canary-76ab417-1621237140062":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-76ab417-1621237140062","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-76ab417-1621237140062","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f18f62d4fbfff2cad1f3129896a5f6f8a75b7580","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-76ab417-1621237140062.tgz","fileCount":7,"integrity":"sha512-0PmA3czWznIN8TVMwO0GZzDq/9N0KMjmMq/zNEFH09W4mZ5+cLmKkYA5jBTBBaVHQT5Irw7BmnxI918c3+7xiw==","signatures":[{"sig":"MEUCIQDSq4p8VbGNjzQynqZwMPJ3IuDvZFcXCg9JhFpBv3ra4gIgK86x+GIgpUolBWYFXPF/HLMZKGAuIJxZIsjvyYfk6+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgoh3DCRA9TVsSAnZWagAA5JkP/jURsafqFfDqTNAVUYq7\ngGXP/SovvV/vxFdLwwQiQSrFx/vJz3lNtX7cQDc8Bl7CBd1mWWwAOZW0eG1W\na8mZmuHTRZs3H/MuYZevUJmRGAw8+Ee+W8CZ+v8TMhxburgP9Dk34VcW7mhv\n0bSUfboj255LyPygPEKFTYA4OKNP65ZznKul26nK9IS/BzMiyfPhSQy8Isnz\nDKbS3AebQ27dVB5ehJD73gREmFijAJsZ+GfRQevLrkeiWR3AX/enIyeXraAN\nX42TEOPgZ1m893TEzpXPWF5gVn42ZAmvVuHkPRQoXG++QMHdtICYP5Kh+16k\njW/XMwXe4z0RoUg1sOO+trjIEeUbatZsT4HBXTRcbWNs9FAuZCiXiUVsRuO1\nqBIC/bEzb/EIUI6T2LDLGltaXoIUo7Hcf6HgeJzr9nxBe3/e3FIRpGNnyn6T\nIEv9XztDXHjOm47GbrkPwlFG2nF/HXh1Sl6QV/2gEHB2XZvE48YV34DKFjYc\nuFZ4SENhk0ZZtwI/2tUDxhauLAwUuFvj6k6bxcWBuZXXkljK/SouUu5PV2SM\ns6Gg9uoU1qK2Fvi3lWY8+Jjk5Yd2A2envdWIIyb+4ao8ulRFlwYG6vIynX0m\nFWO4TnNsUMmB5v+GpUhPjtpaPPMKyzJH2BDZjOWSZLfAifBPhGkf99mp0XyI\nZv1P\r\n=Wi5H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.2.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-76ab417-1621237140062_1621237187273_0.4975241976845437","host":"s3://npm-registry-packages"}},"1.1.0-canary-6c16679-1621454096439":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6c16679-1621454096439","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6c16679-1621454096439","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5d7de67c181d0fce454221532fb655e1addf9d4d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6c16679-1621454096439.tgz","fileCount":7,"integrity":"sha512-I4lHyjwB79hNb8qKmMT6WIIHu/OY6/he7vSlT/0lNXbLql2cXOLQAYoTG96ptXjMUo9vIOyn+4nCCuDiwJZgCQ==","signatures":[{"sig":"MEUCIQDyEOfiMuc4hxLjCGzCoj7oa8lwhtQy1UwWt9JoAdaJuQIgaM1qPaCcHwNt0Zpm2j9/qV4phJe0xMX2W5KM/tF/HU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpW1KCRA9TVsSAnZWagAAaJ8QAI2FWedj3p8Y2VxrKSav\nT/k77DhBc6d8jypbqrHlF+X2E8TlWbKDbbDFfoFysIGmyiLc4UXNxHVSFGoD\nkhFmLjOeuOpnKj7upRv/pjPFaaI946SLG+GIVVzcDoACYop6iWa9k/AQn2Xi\nwqTkiXkMstzCqgjP+ir1n1I2EgzkfGnWdQ2xySieEPlPmsinGFfZCfNTuZ6N\n9lEGCHVp2BIKMTXBnCqesmDZHDWxc9BYnqcmWIinaqaiuh22wPQNnRWLzt2U\npmfVG1LWksj/0r7YnIUsZ399YoJ5NWQxUKhkpgDs8fG+l5fs8P2uS/6+oaBh\n/RxltTUY25JNOzgAVoPIQbE2LBbk/+BZ96Gf7Yn7TUOtXbUPyx9ke1Gukevf\nrovViuxf8P0d8nXRbByuS9n8OfDNaFt2CAJ2rREqJDZX+2AXJX64QSHGggMG\n8g8Zkeqkq47W3FT+Lc//Yksd/8ARymIHSCF2RigrVhvmokvqMRVJqT1vWOZH\nHIL5UmnwWfTXRy8/d1JpIgLXkEtcc09Nn2HNbaBtVzsNvpJ1lkwP/6WDNu6+\neklFbMeJJR3K9sIkc33OKo+tYtB2h4OkTEs3XN/TK4ueAMbInBWDauBLuJil\nQIFHaW0yQSTBhmxcZ8+bEGoqndT7o3cn8cIkdH0LAMC6+z1/RICx0hvI8vvH\n+STQ\r\n=yEUv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6c16679-1621454096439_1621454153526_0.6609455395432817","host":"s3://npm-registry-packages"}},"1.1.0-canary-6c16679-1621454100384":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6c16679-1621454100384","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6c16679-1621454100384","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7a18ed77238f0eeb0e99130147f27795500234de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6c16679-1621454100384.tgz","fileCount":7,"integrity":"sha512-4vHvWbg1Qb+UBjoSPgLVeseRwV5Z36gUaXGdG3fJoQgmboD82cTCC6RIScS+Xo/0lYsWVREF+XGwjF6QVSxwHw==","signatures":[{"sig":"MEUCID93bxzQ+0XFsn3DrmmNyKGEiRRVs93pCRTB7/OwknhVAiEAuKKuf+tMUPY1arfhULLELGMNbh9vHUzO77lw4/wjjuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpW1XCRA9TVsSAnZWagAA15cP+QGcO8WiOXI/KEeopbzr\n/SICPdVZjuMtQu5MHAWXM+/d8wowq6sG7RRplzfSe8z169KSTZ/F4rgurCTw\n8yn3w8zNlAyXCqxNNDF37XMoKmejvYAhW9AREUpWILYAnpHScWMZpU0IzgsW\nHWXIUjnHlsOkgRhnX4627FwK5hxkie8cppEAWGmXhITUeGBzgUw5HSk0IRv1\n45t+QIe/UsiwqkQtpWqhWNU1+upydDQsGOO9TARPMTk/MHhs5v/Dfwj8ICtY\n5GTFqz6CBz4k21OfRP5GDiaMdBjgA43HUX5ADYQSMQOFYuXEygbbxHV1jfaE\nKCPvVhZHpgNWIFdjjmogiUy2ZQrlk4U8B6yWNj7yygY28nKhXQl2KeCE8rcT\nePSvYY01vr0aQJecLW+uE+f1TWiheRi0e5p5Q82S8PNB072DZK6j8AxA0+o4\npUD5vFMt5mdvYRYOxizvcC7sCz2eyS7KD3ZytLW1f+YYp26IhR4wxfhLfwqO\nnfwepRJlqdUteN2pSRZyPRSS0wrDzS5P2SdrB0PoEnJXv6PtnFwsB/29yrdV\nsVPLqy+Djw438Lw3g3TU1li5BqaawZrkLVrF9E2TvvvZl6MJ5ad+RpCSdT/s\nkNl2WGZvYLw6Pkcp1x4yFsV/hmqX/c68j7BIvjlXkhhrjV/ur2DMsF9xkOCt\nJl2W\r\n=9G/f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.12","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.16.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6c16679-1621454100384_1621454167366_0.9738549576377884","host":"s3://npm-registry-packages"}},"1.1.0-canary-99c2cf1-1621548856740":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-99c2cf1-1621548856740","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-99c2cf1-1621548856740","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4e6d170be344311dfc3d1ea2b984dec70e5aeeb4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-99c2cf1-1621548856740.tgz","fileCount":7,"integrity":"sha512-/EWCZOO9SwIsIBGi8LxiFe9vvxJYjQNLWNsxZrmfP3mqs1v6LbuJn7ST/h0sOune98Avmw1Izqfxru/2oI2Ryg==","signatures":[{"sig":"MEQCIHYYcQcvnp2njEYNjo/6xQv8dugkg3yMml/g4LlDm4TrAiB0JGGXw+/F18jlwBdbszoy5kixTr2I+i8Lg7jbS0Tz+w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpt9tCRA9TVsSAnZWagAA8WsP/A2uWEV0pl5qBkyb/zYN\nyU+CQwGgryKN4gIk9IcmLFy/jnIvSp7I1i59ba4IJIW6t8bJ2LVeqEJ0jLsE\n8k+pjI6kYmvc/QhHFRArrqPxH5w4D4Y/E1vtRGYcbvCuKhs8/ygSpRZbLusi\nY4eT/hKTGbsjv3d3GHu3TBqib8/61L+nSMiXcBQdOZERpEYiBsxJWslfoto1\nfKsrrpNc05dfkW2tEuCfu6OB7ATpeqyPUlEHVWlLG3WpogA3WlEEUDLjlgaI\nmrPYPg0NDDTJF2my+0J5TNVK3/oe0k15JegZ9XCemWRYH0X3KDI1vwinXtXs\nB+/1TQyzEVoZU4cj5TbfJHMtTfhmWBynnIlgsaWMCVZ+W/v8TOpiNqm+W8/8\nbQIzNYTVL9fosxJ8NC0vV0L97No5JUAQUfFnmojple+YFyRGvFagcdNunxHS\nmwJIKnCOxEuvK70o88yupoTHb1VVzIxGpxDasp8lA5adxs0wLFfTNlP+xw/w\n2Zp/J2udZP4EW/Z4vF7D3rljkwRP2L32i+WCQeXKz/rQ41Xe/B5luyEC4wfM\ny9TTrSvdZOlXqc7if3cOpVczRlZeFUGVrKs0GU98k5vnU7qOHz8yON3bRz2H\n8RIY6fu3Kwh+lN8Z/6QT+BPtENiIlRyd5TrGSDMV3hfP/tTpTcKBfizehybM\ndZea\r\n=1Mf9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.26.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^6.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-99c2cf1-1621548856740_1621548909296_0.6444941731637579","host":"s3://npm-registry-packages"}},"1.1.0-canary-1b401c1-1621646866553":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1b401c1-1621646866553","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1b401c1-1621646866553","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"43b77202d49671a409ad5aed21f6981c383e38ad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1b401c1-1621646866553.tgz","fileCount":7,"integrity":"sha512-u2bLdBcixAuj+BWJQhPKHEK+NPR2xDG/X2SyeIMI2H9/D0A6nf6L2rLrSfgVTBmd6Nige2/cCseVk54feXCiJw==","signatures":[{"sig":"MEUCIQC7i8NOcebKA45fWb3tAdVl1fhzd0lCJeuHGEuZeNliPQIgHafOoxt7Xb73vcI8jclLyjF79lH98mViaY1Imes0JPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqF5NCRA9TVsSAnZWagAAULQP/R919IKJCYYNOfhXZuut\n3bDhmalBDuvMm9fGg1tIfn7UUwwxdQNEV7Ho+55yiZLZTJnKyRFFh/grgyMI\nRJ/vL0yrdTUSBbvnOr1Fhm1gMlVELquTjKZY+CY5TAnR5VPTZZVZyHyoPlJI\n2iYyXiN80n0TlIW5IgxCrMgG+SV2xO7hEH/jRfnq6KhRtqtSSRyZ/9iSP1si\ndTjduccFwWuVVs7rp09uZEoPQ7gwFnTF+vMxfVdSfbpy1/yp5Gh6NdxXe64x\nHKlr6CDGn/cNj8ZLSVqy82loVCQr48jlbXR9AJaWck/wC3HUx18dobmK1sPm\nswkm2T411Qi8o/sXpNBbBM0hlRgKDGx8BsCOIi5G3yNY63HNgkyVJWy3D3xa\nPriy/GGIx2uAMZkEZUQ9YjxO8scYtS4+opRKpf+Trw3XJ3F+roGq594RQ/Sk\n/97bUCKAz21oDoBjmXQ/YO/+TWDtrQChspe3vZvmPLHvyOaL3juDuU9Ot04I\n8kSmWO4qGyYFAmjrPYPQYZH8pc9nMaui9UAxWkdNTkTWdBG6BDh8XNrw5toE\ny2zYFvCVwUxbBcgLXpAHpZLyWBphHTFHhoTkWrnV+pNdB7ZBpLEuNjYN8Yt/\nYsNDr4EX+FY47c8/b0UslVA1Rlzwc+6+2SA5U2RY8l2E4uLDTQtZo3GpnP7B\nGDHO\r\n=Af6C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1b401c1-1621646866553_1621646924699_0.21826524808226644","host":"s3://npm-registry-packages"}},"1.1.0-canary-1b401c1-1621646873563":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1b401c1-1621646873563","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1b401c1-1621646873563","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"04e40c6d663df37beea6b5fc3e4d68062dba9a1f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1b401c1-1621646873563.tgz","fileCount":7,"integrity":"sha512-UPPaM/1GVQ9+XAqbCKMYcTBjv+AhYvvwD0s8JUDMErfP0zbyDi0NZVrlOOq6+QBFQTJ5Y/tnWMHO5P45XQ/0Tw==","signatures":[{"sig":"MEUCIDcDG2gr8KZLcjwjuI/lw0EOhXy3Q2iN9MtYReh8lWZZAiEAuHNqrM5/WjaM4wKn7mx7cnJ7rdpl/FaX5nY8qu5hR8Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqF5cCRA9TVsSAnZWagAADwAP/j0+c3nR2CelloYV8PnA\nlG1xSNgeZIvk1rSYTTxtbKgDUTlD3VfRO3C8ZZo9T034Q9iry7+oXgbMQfTW\nq78Ikq8X4Vt6cjROsLEJlrxuJ5UeyC07qjAv2gBPTHrMFWBC0ka+12PDGQf4\n5BFE+WoEKAfSR+Ps30nd6DwYqF4koynPRFlhMRHkk919Tuzkkay8ePSvXX2n\nvw2dYbTxvZAZvnd1ZKqSNvYVrN5n9f0oPh5VQryU8YXZr2ai3vE4stx76gpI\nWZx/uCVc8aiPh2/S3Y0yzp7uRaG1fCgH3dgclleBwj/9IB6Pvi9W71BsTigW\nR+NZamXw09OqTMUibSe2pdEe89Wy5361PYTVNVh0mjD2LzDXED83j7Wmt6j+\n4RwTxlADVevEFSwiLnjDAnsFJnUAPlYmBzGPzEfglzA7GBr4izu0xwsoU0rY\n1UTuX6tihptVfMHBK/05EOfLNMj+NZZXw2jZxGnTFeEXvWBcKms+YrwvkOkr\n3Wq+7ASPanjrmG3NrMT5r5rU15Kk4FSdMZn8HdM7en2FVkp6pmUcv1lEx/wZ\n3YkaIpawoRv6fmjH0pK2Eulnm81yWaEClpEICPY0HZqsp99pHyet9B0VGkm9\nOZtNFIqmVxoDf3umscHhq/DEL9f01+LLGznLoUs4abihUKasdB9ewfK/YacD\nX8pf\r\n=hm0b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1b401c1-1621646873563_1621646940119_0.803520582821819","host":"s3://npm-registry-packages"}},"1.1.0-canary-4ad9dd1-1621747560654":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4ad9dd1-1621747560654","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4ad9dd1-1621747560654","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"823b56115d500000679bbdb3a5161c985d9c46c5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4ad9dd1-1621747560654.tgz","fileCount":7,"integrity":"sha512-f9RkYXfMhB79j/XV3dPeZlOfP2jyQq22Lc91C0ZbARs3FwcQsBldr1B/WLJWDCGFiBPL3/B/dYWTpz5Xn9SmWQ==","signatures":[{"sig":"MEUCIQCWh5S07d0/VFo9vMLTgPOjXjStAoZ5Hj8W7gfdoqGDfwIgOKLwiRpMWfrtX1rXoXkKR9JhwpqvK+4PsceXgvby7c4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqeebCRA9TVsSAnZWagAAxuwP/04fNqKLgCV14hgHKB1F\nY5jG7T1Y3ZWx2BLU4x2f55KJ6FEo4oYvsqrLBcbrMcK9SUyBs0SX1EU9kzMb\n19EP/JPExMSuKTpwrpfCbGyA+ByNY5GiJ++/lBXge21qe8kYztTN7dkBVTl7\nmt/9BRgAE3qr6yRqtv5u3sKLEY0Ll6f2+SCmP0XcPIWB/8M7y1WgoyL3fkDY\nDi9QIr7u1rh/sZgvTF+Q8fipAjHOUNrLstQTOCss2U5lUCimQjrmnnRFnTQC\nPk5BjCfzuSm+sau1kJEMFT5u3plEzUpGpzVDrETvLPLNx9jTauN/Rbz0y97p\nSKr2JxR8koirYKP++OmL1Qta7OYZo89fGH+NNYKChIU9QY8DOeizfmRibhAh\n9MM2KNRAuCXCdOMuF6VmkP16d6suS8FmpVicQ25IlwbqSf+lB+qNnfvu5gMX\nb0A1iBL+9wCRpytaEgZ3m2KX300mlncH3By01Cpi0zmfucIgSnWrpKoP15Nz\nWnerro90hA8vlnZ8fa37Oq4aWpI5GKheYdrV9vV546qtPAMGFWBsaY5AQL7t\nScMbeaF8fHhFEyoctEnXAygbUkoa7H5y1Y7RbYp69+YIDEQrjcD7PsVeq0O9\nZWzWjlNI6TBydtEuYLoPJGxSAg4DJ7/Ebf8VMHImb5NWGAmTg9dq4WGUNDm1\nIet+\r\n=fUKX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4ad9dd1-1621747560654_1621747610841_0.0234537759293727","host":"s3://npm-registry-packages"}},"1.1.0-canary-0b5af2a-1621812201422":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-0b5af2a-1621812201422","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-0b5af2a-1621812201422","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7c7fb95ed1274545e1beb5cec29f78920737f55e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-0b5af2a-1621812201422.tgz","fileCount":7,"integrity":"sha512-ZQe0GMAWRIwGlcYoflDEVvvI0DRa1kzUIg6FPQy5lL53W4mSUnlI9zHJTYlMnSeoUhQemm9tZD95FTlLEb6jGA==","signatures":[{"sig":"MEQCIGPS3qr23jwHZjjF28BgXSlHjCsKlBf8twhiskpQeVRmAiAqeq+2Su420t+MAT3wXKRBsYL2q54CMT8zhNalY0VRIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgquQgCRA9TVsSAnZWagAAkSoP/3VTMbMTC5NH1QkY91W1\nIoYLchn5QYyWes/7HT6P9EBgkLtT8TPJC0zgQJ0JDofiNpK8Y1X+ZEaYJ0vp\nM36K1+otNsVrlifvv3U9y2EtQZ+ZvoLPXz59Z6Tg/kJzDW1g3ffyLOvIE+TK\nIRVwwfR40HAoVUxio6huGx/B+QKfrPwJM5a3a7wyYY/iYBjhgHBkWAQx44iD\nQnr1MI+P7Q70TCJnvHnJI109mAAt0GroOMLxyyWYZVbE6GopRY6U75l2nIj2\nuBVonr/UtevmTkk2MyTQE0202U2UmlK2bxggnLnG47+WhUzR9e8bnHGzXxfE\neeI1H5oCQjfh/DggWX+pl/qRWyzEXMu+B/WnKMCMr+fId8c7sKtOfE2TclBq\nLRmAosq+jyMQR6sI0hx2RhogofL4tJmzsOMcdkZWp+Z0/2Xul70y7qHXfsnl\nT7LeI3vjKvv2uwA3c30OjS+tCHyjqpKES1CI2vHCEno8AiWE8IiwQ4mjlMkQ\nhBTJdEbaIL07CaFbXlHHOBm1rggfKG2yBwfTBAHT6jEqhuA1gtQSiki+h9sY\nX9dM5ajz9p/owPNmiPL1W2dP/BbX2X6geA+s0aCQX1GZXtClU9WRVPTag1+f\nFAtOrD/6A4T8bzx73HKDiO6EzNeks62IDSbaGwdddDtK7ThucR46y3S5ozOU\nVmj1\r\n=2rxX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.48.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^6.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-0b5af2a-1621812201422_1621812255772_0.5810224389952314","host":"s3://npm-registry-packages"}},"1.1.0-canary-8180b90-1621843204320":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-8180b90-1621843204320","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-8180b90-1621843204320","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a71f83b50ecf7f261d7126c1f10863831002f311","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-8180b90-1621843204320.tgz","fileCount":7,"integrity":"sha512-QqpQMiPlB3EnaxOtrnXe9o0fK+DLuq4YGhkDVhReNIWrbYJaEY3xmD5uL/sj7QM2Aa/t8tYogRS3XPGnX1MdIw==","signatures":[{"sig":"MEYCIQDNwacYZn2391+cjZ3mXPimP4+8YpGpSHZSsxoSEzfdjQIhAONl1rroxS+a5Jih6x4qlZBCh3K+eKXpWl98n+VzI/EV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq10yCRA9TVsSAnZWagAAG9gP/1T1Xintq0n+Jb4ioQCy\noVhw0DwyT2HX2SryVWUQCw1HQz8acyUDPsbuiP0QsOBq6o9q5lxpX/pfr7rL\n/qC5+7YpTTM39aHbnBV8rnT1cmuBJMk/Vp6rnZDMmEugRBkP9GxFMf1CPzap\n+NBQ3YAfzsCeqbPHr3OZVsOY+89xqLux0jhGnJUnoHO6N3u0OO82gXLy2wPh\ngzwaHNSD+ffQ3u+nLcah8ZWFo4ouZVoUPuXVmQWQBPaUEksTILKgiJKH6eyu\ngYbHkeyLZoVgfQgfo9Hdc8gcdUXEzueW8aZi2Vo8u/SKQmxW4hbKCSqVSOKW\nYjHMzq2jw62B/lBVDMXwlOMIN1TM5jHUDhw8bNa7PdIi5S8X4HQoe6BEKXAV\nG2BHtezfC/H2310Z1KGQ5UsGpmm5NYHm2rR6er+6uHY2ITkGRJVIXS2LHc3Y\noAXXkbrVy939jS5j0zNG1kboa2eDAnsekjWwA1WLCAPu3XJf7p2kZgJuFDN6\nwAO7xLgcXhCUZwqYGlL/B0cHHwR5VckxsE5brcX9+iKH49HFVwn8kDJzx4bT\nM63hAqD+4CwmDcPGuPG6PQKBb/+Mub9dEgRnylkbGBsPg9qHXKyKO4bDzn9P\nR4gYjswzCw67enHorc/S69lvnhbVuJ9Jm4aL6jWhGpwr7p0Ciyp80Rhd2TDp\nwOqc\r\n=cnAj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^5.1.2","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-8180b90-1621843204320_1621843250137_0.7495352370991597","host":"s3://npm-registry-packages"}},"1.1.0-canary-6abc543-1621846255279":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-6abc543-1621846255279","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-6abc543-1621846255279","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8c91d936651457ed9c3cfba452174ab7beeb16ec","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-6abc543-1621846255279.tgz","fileCount":7,"integrity":"sha512-aA8pc8/Cb+fxX96Yv/z2vWuRdxCNfJtHQJnxCO/0CsEasltORm2P/iQAPSLc2hjph9sOvnoAEJbfY1JybAPNWA==","signatures":[{"sig":"MEUCIQDnvPRAWeP93XAJPjeHtg0U8gj4ruU+zDxsRsXr+6POYAIgJUyvuY+w45NgDls6rsx8X2YBGCUs5rzab2Qx1KViTV4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq2klCRA9TVsSAnZWagAASYUP+wWAi1eE02LC5Ohpzgdo\nQ3AYNVuREIZ5KpisTL7FiI7bz7NxHCOkQtKwOrS9HcIBoqXMPjRsA8ACjvBR\n+9fEF+DYBvZG8JUWQ157UzUmmr1HUtepyk7APXsXLtAy/CHiEK0jYkBoD921\n62E+NUw66lL1fE67amng7436aj/zyjqNQrVM/7i2EJm0KZOtXEdwkXgCKpCg\ng1ecZo858imfths49XJrfQqGfph9kC8PcX0/O6ekLkBvofimlVdXLpl1FyjL\nrIwhbZfwP4SWSyjdyXn0JqKqkU3DjR22vgByV6fM8YzuP+5zyCwWX2kv5XIz\neXLxvx3TZ5fStjl/Z2j4pxKqMOe/S2X3cLPdP9bHEFAdPk9tx21JYNFDDwJ5\nwzr2qevCRblO+nVs+Xh5R/DDcoeae2yyEWuGMmKdpS5TLjpD0lAto4dksspP\noigykKzpA8ll4Le2Udm09L4AR8iGk3XJM8WQeFCpIARqi+XlO+EyClM0jhiz\nleoRt4936NaAcvQjuKwCphMsFE6ff1ib9jgT4IX/9dZGWYDsVwf/N6/BKcCS\nlBklaK2ncZacfPcfv01clDNuIlmFn2YKCsUs0lwvhIvRgsdz5AITGvc+VfAp\n8tim1nrZj3X9rWFf9xeHCk9VJHPLbBtPwhCDVWR8IYimxcCuUkB/AW522Qrq\nf4vV\r\n=jGm/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^6.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-6abc543-1621846255279_1621846309119_0.6780280905030454","host":"s3://npm-registry-packages"}},"1.1.0-canary-4765b49-1621897113803":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4765b49-1621897113803","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4765b49-1621897113803","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dbfc92331437e051727f7a11e29a30a657c83d5f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4765b49-1621897113803.tgz","fileCount":7,"integrity":"sha512-tZXk3L3KCwWJlD3z+3CnftQANvbMZHOwx01XEGSAzq5UMaHpsRr/7eN4uwCRPSRWiWg6mn6IaofFznisx49+8A==","signatures":[{"sig":"MEUCIQCEWLnmWSb/JPDUnqNvdSPJl4ERUYblZCE1tyZiTVMg4AIgfPGaUen3/lsFI/GBlzeVwsWyVDtlAO/Ufo5iNL6sfMo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrC/JCRA9TVsSAnZWagAAbQIP/1rll9Gp951UHXNsEKom\nS9An8GqpgHTUrfEk9KmHqVF74yktk2fIVRDdhO3+g22kKIr+f5YzRqmFF3JJ\npI7YOHWWQA68arX/aox+9VQpw4mbA1DrgphGq7sJHDVF+w3p++keJ0gHXAnd\nE+W+Xr/pzJjrsOMJrnbfwywpLYEQXo2Un/mYVzxz+TxmBUr84K+kEzmVa2SO\nfrSI9ivsHI8QNO5JL7Sts3L8zd/S2QCldwwpEIDs1FWOLhe8WnrdmvphPtra\n/QAUdWC48usZ4C//hw0RjXWHM2AGegCI2Wvdi9zZzjx8+dabSVOpEo8oe2TR\nZRFnqAl5830kj5l+teD+cFKt0VPovpbAd4noZQde267AoWQnx73VnKby4rdK\n3hSH66IcaInwBLSRbRTLCGHY2NhFldmbpRGU4rp9L3UkGXB2R3wsCdWFaEGr\njJCyRjYpoQZwdGShBidt4AITeb9+lxtVzoK1ycRxAPreyt0WvldARK5j/8tW\nYvVRTSpA0g8q4ie5Q/2QK5bjG8jztlfTWtlD18BwZgW+GinA5jJfYLBP0Mam\n8RwhwWCX+EQcU4x5ckvvFNQKUCnhVqqnntRTtzmNG32TspxebjLTRqfsIRHo\nl2CPANvUnY+6vcHM8xYnfQEn9q3w3SiSIJq+yXlgmPbIneZkIY+BbNrmlm5r\n/Lwo\r\n=mFMy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4765b49-1621897113803_1621897160645_0.13426388845819104","host":"s3://npm-registry-packages"}},"1.1.0-canary-4765b49-1621897117809":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4765b49-1621897117809","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4765b49-1621897117809","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4d6eb9aec3b953b8abcf3edb2aa58ee6d0a10686","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4765b49-1621897117809.tgz","fileCount":7,"integrity":"sha512-TfUy+KOczLYqug7sliZPOiPRBvISVADUNVHSck8rDFePTZl7m+QYJppx7zYir8I+Ydi4pDPV/t09ihEyfZJvsA==","signatures":[{"sig":"MEQCIA6QykZsloWPf3Fm8/q/6SpzmhXqwJFcJQcrijAPu0J8AiBRDgXwKh2H1Wsqqwoe+n1UlBYtQBgCjZRAwv9amJ+Tsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrC/XCRA9TVsSAnZWagAAbxsP/2j8pOi9X/pHedlUx+o5\n7xST5Yjfl2VIlhAcbKTbgKO32n1KOwr7NRNGi/4nM2/hzVE+cubovtXltZH0\nBzOgdXEey4ESzd8VvHsesCqstiGY5XWXFEVZLfoQnl5iRjZUt9JGjf6vR6PB\nACqJpHL5k+OPJE36uo/ltXs2/cor6g71iu/nul7pcwbtMZo+p37pJMyffuyr\nQJH5R/K9NduVZR7KF0OP6xF2rPvi9d30wT1Tn3ncgfmb7yU8bPf9dnnlbKA9\nlReMZ4TvqXi8grW01d5wcLLofdyawSQ430iYfLpXYd1CjttYT6GlXaeKdyLc\nVU6M9iXK8R1juuTs4oe4SAuz3mhhJCJf8HUAM6/obuzCuuahf1VqMi4hwneD\n6J5aKsblzM0VKaMojNLsyMJPiZnEoTqNiZAjbKICml4nQvaFe6hE/ZGB0VhM\neTEfxALSnBSzHDYsBs0xhyEb/sodLuE3jW7mMCwl9y0sFyi0BdtZoHhXrH/0\ntIIWR6XeJJtcWijSaviiOCM6gzBinm86OLx0haYp3p5gngI+W8aSZyfh5I90\nHMWL2pM2wndAkTDQvNw/AQqOMIbPCwnw2V/5SFeveZD6WBBhRmeIqR/vxnbe\n9/hgVtiC7Uc51UtwQezs2a/qhFLxWbqgTso4ddbxGptsHlDcTnwMWE7yl0PX\nUZwr\r\n=WA2e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4765b49-1621897117809_1621897175287_0.8909868332316169","host":"s3://npm-registry-packages"}},"1.1.0-canary-9c25e5b-1621928750906":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-9c25e5b-1621928750906","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-9c25e5b-1621928750906","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9c4ca09291bf3296fdebd0ba48c2815d07dda7de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-9c25e5b-1621928750906.tgz","fileCount":7,"integrity":"sha512-IkdsRzEBRPOszpjOxf4/guxasc6N7BU0sTvpufvyJpMy/W+c5FW/Xt2LguTM/oZ0GZmf6oWFsBlinBG0j7jUrA==","signatures":[{"sig":"MEUCIDnR8/tzkypiEmDwKdVwm52PcqoZZ3EbN7I7VQOnc8r9AiEA6ZyTxvVMjNl0zs7BUzuzpDLwi/faw1O5OK6FtXNXoEg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrKtfCRA9TVsSAnZWagAAMacQAI6HA0gVmxjNKuhVW1R1\nxMOhlIt3mvl8f40G17zhB083Zcg0x05OwTe83iFPhE1U0zBVqrApOpMTUfqn\n3/LC+M2ziql3l86ohdr+Ei77kkbIuSbzM4LW7NSMVc3jfUIJkyNpZDKXjnNh\nEYtt4Tl2G18eSUbvYmtgJPBF+n1pV40aJlNs9bFHUPLREb82zEwjBQRCjsB5\nQCav2kO08ldTCz7gx0N0IxKMzOMI5G/jUQ4tUv5+VN++SJFzyi7oQHVjrwCm\nXMOXh1v9fdXqBdGIUAJqyYhjwjzylfe4ze7Utb9DTMBcA6ShQrsAE7+UQ3M1\nJFxTuh9gWCQJC25qmggt/b/Zrs6zd6xMIqZdt39qTJF+9yfKJneqUGm3Zb5D\n7r7NwjkQe0urNUu7vJZxNQ8PuBoe8UwXG6nyrDqiyZO1lHaSKWmO6jueCK01\n/xvsW2MPsF4DC9rQo2jtb4IeeLQ7UxmYRlAK5b6UI5PUV7ZpDy/hx/dxiIks\nqwcFhFuAUWSETMr9Z2jDPgVj9kTM7fd3lpVnYa/srL5ajPIO5xWGafqBzVEL\n+V6B+XwC/FaTYxFfn+hd0CobML7Y5tQ/GGqnetFWb4ge/wcklzSVDf5Lyfy7\njbjH6nLxElNGgWqYCLig3rEMgGMdllndns0vebEOxWKt6lrboxKjw1JSzUb2\njn5b\r\n=w8LB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-9c25e5b-1621928750906_1621928799085_0.743505430862331","host":"s3://npm-registry-packages"}},"1.1.0-canary-bfc00d6-1621933747039":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-bfc00d6-1621933747039","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-bfc00d6-1621933747039","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8b99d7174bdbbc2e8cd352e120a0d027f26c3f99","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-bfc00d6-1621933747039.tgz","fileCount":7,"integrity":"sha512-g4kJ1NbfC0RWjXu2gG+KfECtHPAFeqO2vH3YNP6o5eKdPM7Nj1r6Xijyh+EfG4y8NyjY6pjMyu8wPM45fK9hSg==","signatures":[{"sig":"MEUCICX4zgxfGe6wc7SgU/x2xHUziDmFLNFsZRvVbBOgA70YAiEAmjoHN4Y+SawFQmvZai93H5MmA+opWgwsIl+99R81BP8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrL7jCRA9TVsSAnZWagAAy48P/1DIvxUr5VVOPOx6n1sz\nQBmw6LrE/qCV1LHINEMOo1hzZba326pLij4l7czlWtnr2hIBowm7alvU9wnm\n7p1raPGW0lQdc5OKfoumoyWiW89ulHndr5Vv2bY48lhbNpO4PiomhKWnxilO\nb3cMv6PaY4siyqgyO0yTWA6smDj/PDY+l0mruOO8FS/5SWIHeijK4rwG4fhs\nKxNZLFeNbH5EJQBR/xlEVMYbj622NTOk7h3E1h6ktXMWsnz8HYnGS0HjNwO8\nBgQ6CxgLzY/df+Pu8O38S77Qloouyg+m61+AqklIuDzEvA5gTuYpUM84hOiK\nDj04dd6HhIN1p6BxB/4B4IV+/jXDmnj9OcLeMjYakAMbQBcNXrO5iTzRn/uN\nZfrHyt7OTUFNmcx9PSYDZN8QsI2PUK6AjrEpY4f7emxleByVxYpZ0rz4Xjq7\nkaybgrpaB0pqI+b3ifIl2lBkUTKmRrbpKMgRst7Ie9vW1XD7f+UWktiuS2cy\nXV3MjAllCGz/UUWegqNgsg73uDyXidVODtlr5e4zhqVkVLq1EqSTD1gO3poN\nSV9VG8ny6F7hnF0q+tgsa4pCAwRPufrBa2Z5rxH/36rFMh03YWFFnldvI0Pg\nqK63kjRZNjOTL44xzY5fJnIUxMBeCSjDRbYXP60FBtXYUwSiwvI59Gn5PPhA\nEvHC\r\n=SiUC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-bfc00d6-1621933747039_1621933795307_0.49420985086874913","host":"s3://npm-registry-packages"}},"1.1.0-canary-c20b7b2-1621937818610":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c20b7b2-1621937818610","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c20b7b2-1621937818610","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5fe036a8ad43c7c9b9fc9781f7114cf88b8ad1e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c20b7b2-1621937818610.tgz","fileCount":7,"integrity":"sha512-Xe9HtxrzYOQ3XwfBg8RZa3g9Z2aIo90FFHEfQ4t3XLyxI7miV4qTvrGlX/Zmvs/g0Oy7os3EYWq5bg3hYa9GIA==","signatures":[{"sig":"MEUCIQCkjDd8lquoEAvZYMRZPTLDJABgfxvbYGyW+xPQDIT9CgIgI9z9HB0It7fmVE0/Kh+zSkM9C4GAh92srA9AWwfuyoM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrM7NCRA9TVsSAnZWagAAj8IP/3mjIoCdtVWVcLIrgWQs\nJm2e4r3d0dsXToFwmy3QHy4gyBXi/oyXOq5BEBEwq/Vr6V1xBitvBh0+ec6K\nZ9rNh1pQCb6qrihrKRO7AGUSEwEt1NuwIMSPl8OWOpkZhrTReHCzrD0M8fAO\ngOsqVxnhmeZRFnihB5KC59ohFsppiAo2jX4IbwPA35270mFGtq8ZTgNvsXlN\n8Y7HyYeer7TjKvXjp2g/sVbUGeHpPWSCGl/tL+2+aMAKoY6aai8JRw8JjX86\nlwsW1k5EcdOvJpQMcmfIyqra87isijoJLaIQ+9C3x+bCk7WXEclyra8sd8kY\nH6JC1FUqhsl+wmoHdjGKS8OUEeXr+tPK8Im3Oqh6vQE4nsmCWfo0zwz4bm3H\ny6D952PKmmBHKImsGOV086EMlACpTu8bViskcFhKa5LPhH3JA1qeieY3VHw7\nzpjoGlK7o8f7nsiiBtqwmgsqTBTa19eriz459y6Dy8sSJNe4lBAGASnYTHtj\nb2YEuFUHNc3Lw6KnkpXY5xGuWgvRNIoBW7h1pY5sRdS/6xydvVR78PHNEPng\naR9+4nTLqJhGnX6V/9lUE4JASBiFq3TbKSFw8wP7zz//JwHa/467ZKNJYsWZ\nKXK44K10tku+l5vJ/FGD3jjooxQHmCVuO+gInEqA4hzuBauQduAZwuq7Jl8S\nki7U\r\n=kVfx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c20b7b2-1621937818610_1621937868644_0.7840815574255389","host":"s3://npm-registry-packages"}},"1.1.0-canary-b8e430b-1621940610396":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b8e430b-1621940610396","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b8e430b-1621940610396","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e0cd23858b8e991743f1194c1d3d9d39db3ff237","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b8e430b-1621940610396.tgz","fileCount":7,"integrity":"sha512-Mg2ApTpohnk1dQrV4sugxlkELKMap6TgAj+4eUVinSpwfSYbShnRU9mzkN6Bc09efA9ph6Hw3MY7H+vWnQZCqA==","signatures":[{"sig":"MEYCIQC8BDIemayKjQuK+CB9OcjklA21d1rcc0ZNeFaw9VlJjwIhAOSpIuDxoGynHISSiKtrVrQ/jIX6skkRV8e+0qMDqdaw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrNnKCRA9TVsSAnZWagAANIsP/1WHB8BZdmay5kOpfuBa\nLtxcq0dPr16vrATqOLGQOkiFtfgLr0HAzuK7GMTvlMSzUuoCy1D3U6ZjqrXm\n342+lWGN7/TTzWsto0o0seXC8cGbOROl49cxukpSoLpyVHkNNbiIm6CAn2Tf\nOOdOaEh8ELnwz3MqcZCwLHT8GL00BZPRNiCSk3soc90ep0fW5RjbyRIO1nKp\nS9KCbfGfSs3+UjWIEAWA8V4sdylhVttDHzqBeeW26JjJT9im9GDpnhUNepu4\n6XX3udGg5vIPeR6QqU0Cmpqqk1HHZJhLb3jywAeyjB79PkR1PNz8jpC+q1Jm\na4T5LA0cbPrYFXcIsa9cvWEd42NYuUcXDVUt0F/gLVh80pPmLCqZR6XEZafy\nYa9xhAe1R9ftfRrhd+/UL8sCROv2X6vUCSetXtQ5HSeI/7SRopQfKZsVtgyJ\nZwO+bjHHOyDiK1N02AZebfSfTRFk+oX99vK7axnk/d5v2tAuqdgz9HNzOhcX\nJDRtb0mJdC29ejwZuK66U5XnlDqJ831NtXxCqaOtMvQEolR2Osk52zvAKtKF\nS9H8B6taUobeFET2UCH1cehZdDnvjeWcc0yiBGUcbNNjuvNql+ALHOmLybt0\naDCIBG0Wj1eZ5xpIhE7d9Yefi5r5taKGmZHVWt6OqrDGHyTF7xHZGKQgnPJo\n+C8G\r\n=JfI1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b8e430b-1621940610396_1621940681694_0.2331892533002875","host":"s3://npm-registry-packages"}},"1.1.0-canary-1248e3f-1621958927080":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1248e3f-1621958927080","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1248e3f-1621958927080","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8cbf5ed84d1bc59b2430ff5ae9f5db74fc9f6e80","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1248e3f-1621958927080.tgz","fileCount":7,"integrity":"sha512-QvNd+4Q/gl+OYWSRGrvSS59P1yRFvlgueHVhIwjHq0Aw7LYCQPV7g8CTgVvIgTxU4j5xnaHGzWh1i3HviTNp3w==","signatures":[{"sig":"MEUCIQCOj8Gl94ZSJ77/hT9PdGP7mygSPTEFlfekCBdWB0VoRAIgZOkWy+uae2DbcGJttvzu/v3qikQkbnJEsOtLH1H5EJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrSFJCRA9TVsSAnZWagAA5jMQAIBfAiPWgcMCF77s+7Sf\nOIBARBfTTL9KfWMs5PTaW3pITmZkdsKvyUh/o3DfolG1H4UUHMZg33OyceGs\nuymhhNTSGkkNcw8idLqJxnpPG9hTL7m1cMwjyzZRJLNIflgviT2VQ1zB5Z7c\nxoRaiAaUocqXzO3LPcW1CIVbf4IUv7byvn0+rwQmZ9SzXF/iFFFC8X2vwmvz\n+L3e7S4qkeoyOBP4NFw2qsoFyJ8q/keuS3L2knzrnVgWQtlnNiP+xIEPrWdp\n83PC5iqAL26ULJHncWr/y4C69KFmJZcYACyEU5LaUtS6mLFVZPt8aIUTnnpj\nHrpxJDtBK3BKFxthDZ47cp+G4L4GwQLM/PUEWV/YH9l5hpwwf2Qg+/TUU+lb\n6OMt+xQc06W5zoS0a+/oVsjwJiApBzSBo+xASk5O89SYY64xKEZZWDbOE7LJ\nDyn1M5e3EMVHcwZSiONCapDi2wG17JcXtvD/lkKPRvq12kYKSap4iJatI53E\n7NOrlcpJFNExkZzghPsqa2OyZ3+F8ubwcbJ0PuxK1PJ29z/Or+TlYf6uwKDq\nKYYsyYYssKgn8WVbJ62QmKE4J95+My0+SNTnp8+/VdwsTvvsagJAs7Qy4xnL\n5LLnA4xOzaazIF1iqkh6q6uP0Na9gVm/LYsMKUSvIFKPJgVYtX0pEL1iuIPL\nttZp\r\n=5rhx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1248e3f-1621958927080_1621958985312_0.9279339359527885","host":"s3://npm-registry-packages"}},"1.1.0-canary-f3c5b88-1621960368938":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-f3c5b88-1621960368938","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-f3c5b88-1621960368938","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2cde3117f8dece95cac263b36ed0a18154cfce78","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-f3c5b88-1621960368938.tgz","fileCount":7,"integrity":"sha512-aT7XRWkBi3lTUbWNHdN23Eo+Mkf8+Uk8tb1a3xG02s9/ULuK4IR4yu1d6d2tYn8zJgcX9FuefoWuyZ4VkIB5Nw==","signatures":[{"sig":"MEUCIQD/o9TXiGFJ3qE84/DD+fYaAftJQ/6+6u2mm2sIMlI15AIgJwuuZRhvOLnYl+ba1M3v/CsYqpKyIaelkKhIqd2RS34=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrSbnCRA9TVsSAnZWagAAyYAP/12kakbIT6IVSF3++XuX\n+hHSU2PMuMcHjIeCmWxUNwnHxfErYor9cFy0K3gOVKN4MuZZnOs10kEr3ccP\nTKnrV4hlDEyKyKXl7qr0jWNGIKwzEHeTOpLPNLsPcTuISk/1wCZgE1Riba8o\ntJbofEIjV3Ecdk4FmM7/IlKyyLZQyKoYT7Q9SGIX4eN9X0RaHiCbpmXsmQ+n\nWCB7PwrODR10iyueQv9ef73FYjHNxGO720Ah2zWyzoQ0fkbR9bvK15j/DCcg\n90joGywDoeOxQ2+GV/Pm4FoluVgx/t9V+BbTTFXYPTT2g3e2PymY+D0Q8a+v\nQ8JbSOYi5ye6mfHMMUZCgLNYfqRGMZh/0lnU7T4cCdvz4fUNkqIZVmAXWIRQ\n02fqkdlBt3SKXepbG+9NgzDaImxwVzu8Rkr5g5mIGtjoEsMAjQYUWdQ58l3d\nQD7y167pR8uIJRsE4HkFxWVGxomTUwQQAODyyxCRIZVbx6TfwjedUfsXpKm0\nz1S+raeZMl6v27T5NFXJmD7iLHxiE2H+FaAm72KF1o4RRhpQJzCllETGSzfR\nXx8fJRuk6Ov9Nl60/SIsdxTYIZY58UeVuTOHfLHtJuKsKc+kAhoxuEHWic2W\n9jSZb3eUS1JD/A6qhFws9K7po1Id1seq2gr3a+jhq1LTGWPrOdZWRyv/nD6j\n/ago\r\n=HLPX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-f3c5b88-1621960368938_1621960422502_0.3007363521168258","host":"s3://npm-registry-packages"}},"1.1.0-canary-462d438-1621981219492":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-462d438-1621981219492","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-462d438-1621981219492","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3be3d54f9d9bf343df2c25da6f20392b2fc17d57","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-462d438-1621981219492.tgz","fileCount":7,"integrity":"sha512-fW3imm2JrqTH+CYuHvags9thPOJjQY85zr21onc4lXpuu8Sz6VecO3GDCmfMJwWTofy5S90BOJE+DXbsUf6huA==","signatures":[{"sig":"MEQCIGb+GY3IUgHSbye/JU0vpUQ49rEuQGaxI5jyUC0CQOyaAiAkVNQt3Ezb/VE933kuMTz+Fsumiupjpcu+YrLRyOYqaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrXhYCRA9TVsSAnZWagAAEB4P/RACMkdzoCxjVmb1BwsU\nVQY8J6bZiCjloldPmjowmt/L/WIiieaYpHnMVHcALMXQ2Cfp8L4KkRmjCg5j\n1TxuW7iIwSHDY4J4BxqeUJZYaueFdeatI/B3eAI0ajvutHb+gNb4jzUn+WG/\n9vf1kOub6A1envxidb4YkC2WlMLmNtMPMIEHJ+MqlSvNpZSL2WwdMdsf2Ged\noCVTP0mRpTMLosgszRyoFK8PxJcxZHYCLMCOTbxDT25uO0c80Wp9cf5T18IO\n3ekk7/Xs6bCf6LbWGLl3BJHx15l8LoozITbAFCv+QKHXprMdfqCe8lsDIa8D\njdqBpWI+XwIQdSPGmnHoYOxatZ++l0D0FJm79iCL8k1JELA2RaDaJSiwpfY4\nB/LuLvV1vy3734v21WWfPbejIANLbViTWoBjbclA7yzFNm5+6hMWqt5bSqle\nFJNH1UA4WwTtNnf4D16zr09Mijpfkgv8a2+EdOKQmvROne6PRBfGRZu5HMum\nii1N5ZenFmmH2dNSyoci7TJLZJjcGl1+nV1ZNtTBGKJf8j/nMQNvPx2hvBKX\nA18uBYwexrpJyYCvf7QVZvGX7GO/SOmZVajxTOTyBUKLjaxvNRCOhcS0UMQw\nuPDHLesvTbLuh1GXwoIe6PWO6zPDSc5GaXHRiWt6SMB591tBWl5eZF6tLCBK\nOLSk\r\n=ftQg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^27.0.0","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-462d438-1621981219492_1621981271653_0.7082708952550503","host":"s3://npm-registry-packages"}},"1.1.0-canary-1693d37-1622019003871":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-1693d37-1622019003871","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-1693d37-1622019003871","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9f06b69315673a2e0ce2811621553e763d5d9c25","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-1693d37-1622019003871.tgz","fileCount":7,"integrity":"sha512-EvRXUeWV+FIjFiXjdgYtsdAFo1XIYOOaybBtZ4J0fWjrrNG2ZpRWUv0uNJ9JDNBwkEDxZUuNdUNaL7N4MDONRQ==","signatures":[{"sig":"MEYCIQDisr/dUTcOU6rHvKZ1YjrTxshw2U74o7GWSydNC/9BIAIhAJ3l8382W1lS6ZybLSZJfgxYr8EPqW2EDyhbNAFPrXxX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrgvxCRA9TVsSAnZWagAAFkQP/AxtHmZq+8jSZTRmd6AF\nReG9yZl+skFVjhVyA3sKo2zEgI1/xJJC6Z47qeyyMNECIf2zYhHTcsdHzrdK\ntG1PH69CAN/WCE+X9DumgLgRkvQr82AbaOTxSJX0T8hwuKUR6IdXbA3imypo\nq/HLviO6rvOVa4bXng6mHU/IUEDAVulub6Xuv9+7cYHwBm1WymL/u5L9d8/y\n9IfphemroqsKXgAwDrWkEVw1xnCv5mSsFOsFxeq20VkRGBIfbgqR0InSR3Rj\nRBwMch6q6usJekeBvj7IYsxIsT+ePHfkzm13rvtRpYyyZGRzQbRTokLn5k1J\nfa+i0z32sjdXumZcsCdF+VsyrfZj4b/QWm3L7/BGGcF5NFOtWcNSHXOICgV+\nUFNooKWGmybF0NmxO9m78kSfINr2AzrY78BMVN++9geNNtQ8yFFPyU+s6Mvo\n8zcLkMA7asjQpyNGxK8OZOYd4R8/U4YueCNnYv0Xob8Xp7WPZC45CLeFceCC\ngKczXEdg7NAW4Ns4nDJvIKlE3Tgv05NCN+L4zTKSpvwyKr+nTeFPBnJurrIE\nIWDhU664AKNo2yILmOlCIfh1+ncLh9WU6TnTzc4WLS/+eV0XhRPkAW3vCuow\nmgAz/NFZinc58DmtXYW3sp+V4Inp6VwR3UZc9ZDj3q0w8CIYWWmb8X1xua9M\n7Sdg\r\n=OJn/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.1","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-1693d37-1622019003871_1622019056860_0.8656924692930796","host":"s3://npm-registry-packages"}},"1.1.0-canary-d9a2d90-1622050591966":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d9a2d90-1622050591966","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d9a2d90-1622050591966","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e6d43626e4ca7dd33d7e4b4cd380e0d9c02e7c47","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d9a2d90-1622050591966.tgz","fileCount":7,"integrity":"sha512-cCYn7oqWvO9prdAFTk/My1JSFQnHf6Tcg/IhFNY3cSpfhYRpjPmsPhJ9ZSwgFDQuxfY4ryWfprHhybSu8pKUlQ==","signatures":[{"sig":"MEUCIQDWGCn4yhc6mAkQZCqpl06oO4jP9LpeGg8i4X2k+iWs7QIgZysPwUHVII6NsSNW2iijU2p+2cFEV4+YPauI3I90Zhk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrodZCRA9TVsSAnZWagAAr7cP/iGOVU8C+HNcZFJbudET\nQPfzQxqye6X4Sa87CvZfkMvVUhKLj368oTwzEE6tbHeRh/s2UOPlB5cv+gsW\nT8PUOLnStHxq3HGhn13gMLAHNqopw+UhbuaHpoNF5fVqzvyj1CJm9N0uvmBE\nKIN814wDfcoMxMtgyAAnb3YhmDnnm2ez4pC4ch0zWIbU3QaIDcdZGKV0EcTH\naOlo65npbNlrNbrHGOm9Y+pmkrIhUIRoEfBVeoKKcG9ySKaOWeh7RnJorSho\nBuFbcVL/wPv8a0JsBgJhToZlHoyoUf7iZknezenFeN4V/2m8ENMONfOcAOca\noZ6ATVi0d9IKJHL0HPx2V+v2CGAbKPA1mteXkaYPu+zAmMvVoVJaUW0GlnUF\ndYRrmd+DX/0EFee3eaZ3uqP2G32rpvEekUMgdHAfQKA0pn0I05KtzhlF4nU9\na115ROOV8OE+lk1itV/Z6EXT/yIhlyp4IqMfxaYDKDXCDLYU0rep04nYE86B\nkd7ZjKnWWTLRWgZ1Q8oeX92OrPEcqiNOpKUuUQV7ekj01ZUTZrjCgHhcpUFE\nJWin6RTNsqy1nW51UGxNWUa2Qd5vBOUApzz7P61twtMDZ7U5e3k7TzGcQp9d\nIADfaY1Sp20XXxWdYaKvcUxv1Tgz9XWwiu2Q87BWOyNDQOtjTlFSDc1BQuPi\nMGMW\r\n=h5hV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.3.2","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d9a2d90-1622050591966_1622050648798_0.5449906562114637","host":"s3://npm-registry-packages"}},"1.1.0-canary-d9a2d90-1622050597707":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-d9a2d90-1622050597707","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-d9a2d90-1622050597707","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"291dad035f5ba0211d760849e47df672ccc49f8c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-d9a2d90-1622050597707.tgz","fileCount":7,"integrity":"sha512-bQbvfhH1lOIKrLR6iyH9YjD/dPrK5SsAP4FpQ1w1Wn73/bBFE/RKgRrzYHfjmcaxFnpEa1ZGee0/K4JN2+77TA==","signatures":[{"sig":"MEYCIQDR3kX/HBhcrHHwr/PWP6fbjoR+vdJ3X+3xzwOz8XzV5AIhAMzRzyGysqJQIyqraOB5SwaU4cNucobVPgdEnrgPzfT9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrodeCRA9TVsSAnZWagAAicYQAIyx8tpSnJO76/ySP9LL\nGo1zNazZ02f951SUsq/Y3gBZYT+CGPHUKJyl5bUjTJ835XOhVy9PpAA2M6BC\nJOnFp6+BHmZ3ZeOrWJ7A8CTOai95omYHAOmr/iLxmF6k+RGilNeOChF/qbjC\neq+BUhcC6p7BW3jS+GA7y1EQQ8cQu0cIoLv0S2HiWOy1CsXjNRO6sM2HYomp\nVDpYrNouw/kMtuLW6WnQNcYbkrg7ETXqXlKFEijZu94u3laWE2+jJOTSvAjm\ngDU4FyzA3pEQ1kcuZ7OhccFUxAtVT+5OD4PIzWzeJdCqH71VoBgVlP5icDTi\n2mxsjQUGgpm5ywmFlJ0wOrC2T/JmbdJMGiu4gd1aUwhoQCQhkYfXb5TngPoE\nSOOyKweWZ49HI2mNyu33Mh9wIdryyeNZH5EJcSiThA4p6MrbcgI8Lqnee5pO\nzEpYWypgOfdFsW0Spk9IOFNogaS/gJ4rmwfCNRWTyFvZyAyFBPm2XY3cG/S4\nlSe3ZT9nUxxGh/XYw8k5d7tCBPJVBMIBVlDa+EaRQR5a2hoKHnFh5sAzwPfJ\n23MAqUtTx0gqSqS7Nx/lSI0TlEqPxIoI8wZ5X8X/6rouVJ+AaWB7cwGVXqI8\niDkx9us5RfCCdDDesds00JHW00LAdX5OaN+6sfDEuESkSfWSEPQYPvtfmjqm\nNzQB\r\n=95Gn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.3.2","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-d9a2d90-1622050597707_1622050654443_0.3039858198527221","host":"s3://npm-registry-packages"}},"1.1.0-canary-15ecfd8-1622070646121":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-15ecfd8-1622070646121","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-15ecfd8-1622070646121","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"021d65c304b46d041a84ef3305ae43976937289a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-15ecfd8-1622070646121.tgz","fileCount":7,"integrity":"sha512-lPVYunxSb0b5CMSyjkia1YyGBKhN1NoTuWjMghaVuhEM9PLhXQHBcITH/3RetLdHJB5a/uiMbwx40U9S1BzfRA==","signatures":[{"sig":"MEQCIG5wJZWRURTRYhBNguPXBuOpOljZJnRfTLKCoumGGemgAiAbIsd/vctnx0PCOx2+38VMG/rIpmANMONJstlnsbyjAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrtWmCRA9TVsSAnZWagAAryAP/1e/wRYwdbgPklt/wnXK\nzH+BXInZGupMRfab7dNdy3ONKdHeoSThFABxE2H+FqariENcAJyEee/GTWit\n2BEJHNkanYsB6DaUrYTg/TceKHLqbR/2r8SAzE1dgsGazCwsuNSagauXopxX\nE+94ehGPP09KjYBX8uWl965T7Cm7hK9H7Rco9fDSkKFkF8+av5shwQp9wz59\npioldeeF/zEdc5eK95fz2oGQyzbbyJenknoO7lCOG13L2S7rOKJbdknjj505\ner0shqIMtJrRW6dVrT8iVSlXsh4ZPylcoUAkKGCfXb4rNRFqm6GlS8ioMhZg\nn+S4xVCR20My1FUbvJUMyoUMEUbTYSufKFRUMhkRCa2CJcf1miBqasftxlP+\nY+lLlsTwvKtNMnYafabxB4irYIht1p5nzLDw/X4viLPBnvbo6nETqtPzSJxh\n0wfJNRbdRhBL/xqzriA5J5YFJix/NnyK45obT1aCpqCPNz20ftePnJ6XoiFr\nMD92a4yt//drkI65a2uwpvFI8XYAFgoovPLFgvh64a/VR4FKjg9SCjJyAnMc\nKBxt6/h9FdH1k01pubybWTkuZHQE/SnN/Kn8R0BefcAjn1QROHpy3nRQ77ps\nrlk82xgDjmcX1zko5qEi5rV1Yuy0RChYVNsLMf58lG7B1HGTYo4fnuNzDvzG\n06Vr\r\n=XVvO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^27.0.1","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-15ecfd8-1622070646121_1622070694497_0.25780903253042453","host":"s3://npm-registry-packages"}},"1.1.0-canary-15ecfd8-1622070645055":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-15ecfd8-1622070645055","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-15ecfd8-1622070645055","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bcedec8cc4a96a788dbb914eef23ac1b3e512a4a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-15ecfd8-1622070645055.tgz","fileCount":7,"integrity":"sha512-FiuVGcLRUcXSwQKMwCu4L9zG/BJEynDMECk54NdJJtpXUDN7VG+IICR8W+Ms8j5DsAqMz1Ns3pdB+eHpvLP3Fw==","signatures":[{"sig":"MEUCICZF2Qtb5knvclSlevJsGF55eEoUCFv52sFcdTFaT+z1AiEAhDLWVi+b3ZFcfdoniexyT1G1ewnHz4xW58kdqL3KUiw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrtWtCRA9TVsSAnZWagAAN9YQAJtyh4+oWedCWafFZxjA\nyNojZQDp6Fp6bGVmi3qtipLxeaq0/ims3kWEOdYHnvCcRG9ourAc31lqe9jV\nrd1614TcfcIxO0Nd/+0E+iESJHPZSAAVjmkMmqy+ZCSSZBfjZ/sT2aJisyl4\ndQEa1aCyrtQpnTpXOU0ocsFJSQUBRfKq/5AVcDjuy3fwVbQRzG/5Fza0bPCN\nDiTIvEUvZ/zhRduJ/UWz7kFKX5wXh16BrtMzZ3LUeCJ5CCb2Ev63bzfPN92F\nI4t8HMIjnviTzKKW3jhUjMbHpgTBhPm69Da7UR9NvDPVqHrbxpG9xAZrS+CK\n18BzIA5cFDIT8w12foOdvh9p/XtwDQfi5NNU0gw520EQGSF7DP8Q/OpEko2H\nJqmHmo6Kxbg7CC2s/v+PVv493GILNDXj6anP0tNmKCH7TsU419Ge/1nDkEz/\nfjJgaEMDfXEbDX+BpFLTq/QedxNMPcOaRoBZHfUruV7oxaInZdEHUSBmsMmh\nw5P6NU57KJORAcoNUyJ4PcdRLg7DpfFKyBR85RZBwCXvxkSTu6thgINeNlsN\n7byCAhiAvUBFudjqrUrjBqc+/MyeQHuXlb6vJGWEQb2obHP4BtZLFPX5EFrM\n0LGJkniZqQTQmGky/1KIG1BCjgW3ymIXQcLkQmOpbg/lr31VzrPToVTS0hZS\nnQ5W\r\n=b3ZL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^27.0.1","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-15ecfd8-1622070645055_1622070700727_0.36286543523042347","host":"s3://npm-registry-packages"}},"1.1.0-canary-4a8d6c2-1622108084943":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4a8d6c2-1622108084943","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4a8d6c2-1622108084943","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e54c8dc46013f701ee8d9856add7af81710930be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4a8d6c2-1622108084943.tgz","fileCount":7,"integrity":"sha512-KCMq4R6SsVL6YF3b/N7W57h7/th1V2ZuzCA4Lz0rlONh1wMLIZanzfrboaY0fyDF5aXnq6k7h75o6Mv/vMrMaA==","signatures":[{"sig":"MEQCIDUDzGmXPMHY5aVajwnkDTEFkidKGfjsBDEv93WHBI/lAiA4xAzKet4Y8b+niRIrAi9OZm07ArTpJkZVV5eoWPGMpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr2gGCRA9TVsSAnZWagAA3nwP/3qxc8VpspW6koior2px\nyOYxJOVbtXAdjR46nWBehG95zCYNQlE1aP24ARV+reZqqdgXS9l2zQgjPHe4\nyYWsgHmXcWajFb1BL2Kkj6Juo/mjAdwQ1G0Dnex2CCQaUHFYcgh+ZzYGzGpi\nMXhica/CbWZWmEn9KSev2D9Wi/yeMFXbgqO9bCoyKgRzeGiYzlIGE2q5xH65\nW2rjLfS7RyB02tiKX/j+T8ucq9fQ/irv1ejZGNcGVV0mYld8uAk55VVog9n3\nmObKAyJXNawYAcKZoNsAnCD3ZasGJDwnGj7BoGxPWBkpnQisIR6B+l5qvYmP\nTDQc8J7fKpoTKCLpBZ2uFh34C98SH4PTVTYC+WF5T3nIoRLMS/LlxQ/K8END\njqSYhOaWwyaEZAyBbFwOaUvpo8iGk0DXKQCaE/tli7C+WG2YIWqMgLc5TjJn\n6sHT2ojqEBllYUkwEF964O71EOVzPF9TPZDDLgtPEpuNCE6qGIKswAI4dT92\nZmt6bHMjao6hX5VsXwhhcCs19sts78ibgZe2ErSLawIGD3DzkbMc57uyLd4K\n5SqwW3HJ7JisYiKSx7qimrUw1GGj3VzbgpFAfpt1X48WA8vAKDN0MU5H3Pz0\nlDV/T9bJrYHW8T0sdgdl66KueW8RC0SdoE58+e9L4Yt86hOhyZuf9cVl4W34\ntn/7\r\n=g+Er\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4a8d6c2-1622108084943_1622108166221_0.4232515616087693","host":"s3://npm-registry-packages"}},"1.1.0-canary-4a8d6c2-1622108088041":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4a8d6c2-1622108088041","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4a8d6c2-1622108088041","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ab21823d0da7be838a45dd369f672f86b0958593","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4a8d6c2-1622108088041.tgz","fileCount":7,"integrity":"sha512-TI3M8/2SDXFSI5IMYI76K4XsgCVCa90M+lTw48fIiDBcpDjh57mxRW5CeKuBno8WE2XUh/sroKKsILVgAXXN1g==","signatures":[{"sig":"MEUCIGZxsWDi69thQiCsnkJmT5BpDi1+g0V79bT0Ma18gcA5AiEAgSRvgXyUby5sIabHAiWYees0vW/DD602nxTZQkfnLf0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr2g1CRA9TVsSAnZWagAATXoP/0maTrlsOPIo9HbsEuOP\nzAyNFsDRLvgemsh+QuBvsqmh0J0KtcK5P4K6XymgNtd8Ya4FdMnz/4S61GP4\n3jSCyGjGPFjj3AM3dsTuhN7ZnnOOLZOob5Q/C8OBsx5md5n6SjLqY3nkw1p/\ntQu/PyursD73yYaku8FVm56agFMtNVJjOK0UW58QjY1YDnIMyLaMtd5/pKOe\nl0tNsXhmn9UKNVei3QWLZbN09GoxOtvBJRXoR0zWLvN2W/BtX2+Fel/kuuOB\nKY3xccgR1n6+VPEMSekgoA82KdGjZrD0xKuG8zZOd0u7Dg1F6Jz+hhWM77Wc\nurCMvgLQV56WtFI4+/HKGfi9An4i0Pr9LkmP2Uieq8k0XJAxX1NpVxDQFu/E\n9YwzUZGEEQ+kfDXd+w2R0OlHBukyk9QKsOQUENVrNeRPhBbqH1AHefWO9yju\nL6Ig64ZAFsWkXAhtlZrecHa1lXQygYgRtfBpB/+gyiZgz1ZubZR0RW1Yse7W\nLHG66KIMtMci2PUrKKpIiYRSYW7b7tpENB++JGOLNlQgBnD6pQuQ1NEq4wgv\nHVKGr1DbteOdc/wehfH88FKsAaTJm4ONFuucUt074xEquv/rBUkfz0532oAX\neBnHyhYJT/fer1Z+Mwoa6HkTL69NSisaw1VQ2bknCvsZkISe0D6VToviNYMO\njHNq\r\n=F7uF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4a8d6c2-1622108088041_1622108212733_0.4216268426477294","host":"s3://npm-registry-packages"}},"1.1.0-canary-769cd86-1622114990127":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-769cd86-1622114990127","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-769cd86-1622114990127","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"824f00d7b6498d7767130f98c06e77e57b68cfcb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-769cd86-1622114990127.tgz","fileCount":7,"integrity":"sha512-y16nfKh4EHqb99TxfpzAGSRWoP6VxUD8GjKYiZ1YwF6DBp773fwc7qK7PdZ1fE3sQ+gAGi6m6/j6SPkD5vKegg==","signatures":[{"sig":"MEYCIQDHj8Geu+dKQqouXu+2d/lt0SUPjMJ01ebu097egboSpwIhAPZq0yeyEDM9sn7D3nChdyjXEvziNfHTHnBPAFCjGQ3t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr4LvCRA9TVsSAnZWagAAFQ8P/2GdOuy5eAiPl+6wOvbF\nd33FOgdNlluho+ff/lJq4Z/Me7aubSonVurPDDA4NMGEg5KOiZ+iixEcXcIi\nxAcnEx9RSVFiIuVZwZTGmRsCoBkgIycxlNvyubrGVsu0kD0l7UPNLPe0YvJe\nU/s6EEXcGAiOBQevxpWchef3/CQ5bI5FrpvYk9PSwt0PyTImeA+fTc2jsLpw\nwkmBjle54XINql9GSLXe+H2YCvncDfsxXY4xCkvaTcXuNuAkT60r4rzQYF05\n9ZpU+2fZdvxk3JKkeN5/nTeXbFZhO9OCSv6Clxdb7I7gqA+CRHKvqH874dGQ\n0aiTybfiX8oHeyEqjEE59FPeAMEg/XAxiAm1s+xdhexLC4X4zVQ7fFxnO/yH\nphp91S6pixkQp9kgOMEXPoiFDEbOsaHwqvdgik1Qk0ydzpl0NELP2O57noIC\nc1e4v6X1q/K0sxxO32rEGreHe1vWPSNOJrCSA6E8SnJINyg93Z+DR7KJKKBP\nfm1/U41S7AQ3/Ubf7hevMnC3lRfoHDpI5x4YVsACdqYcAzh0GIG1gBMJpTRh\ne4Kmm1S8s+XY3MvxkPbbWWj+OEP0fSNyjSGkPUD+qBUQ07sevIbAcOjH+CCH\no7oaaaT/6RFQ+tcjn+wN2tS0SrTrVEEt2Lxb7buMSMI3IZLQHsnG+XzdsZft\nRFbQ\r\n=+98H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.2","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-769cd86-1622114990127_1622115054771_0.02634907822272048","host":"s3://npm-registry-packages"}},"1.1.0-canary-4a6cefa-1622194836799":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4a6cefa-1622194836799","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4a6cefa-1622194836799","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7051f77e7b9043a16e97cf1cb43a1abd3620f84b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4a6cefa-1622194836799.tgz","fileCount":7,"integrity":"sha512-kjGbWAiPEGmK8ZkwsGTvjR/e+CKSYf+5h8JF9C85sZWVD1HjX+jTfidNGd6P3KGBbyXIlhHNjP+QdDNdqBTeBg==","signatures":[{"sig":"MEQCIAQCcRTXHvmRB463W2mndLe2Luwi0rQSPDBVCpYqg4MrAiAPOpv+VyTgEvbOvWY85TR8Lym5rjdDFdDO7l9A6rmw4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsLrVCRA9TVsSAnZWagAAysQQAKPwSsEcpepdQsFyXBUE\nCc9QvzWV42x0vzOli4lQwcc8N6HrIlY6RCfOW559gPPrGV0rWBLFVT5wODsX\nPKCFKxdpSMwsuStDavGj9GdF64gpW7C40/HwBsW6jdfX8ntM+nQFLKkBPjBx\n9eibdGhouvbF8ARlRWHvj3XIzjxww63srpZINJBjEqpaQahwdrEJnpdhU3eE\n8nQyJr/oICrFJ7KVBpTgJ/AxQA5ryD5rzhkeE2E+ECnnf8blyWIcQ18LQMgo\nTHKBlHjHQ+6bcIr/xCe4z0HYlpqTlWcJfyzNM83cpx7gEag6Yvt7dvjBc5Fl\nsuROJRVGQuP1ICA80W9Os+INkvOlcnvGMxm7jo7xIURw9mTsMXW/2ZkjBf09\n3bb7IqsoauGbS/kbi6P+RSPerbE20AakA5v5ALr6oGg2iwHwdEmiAMD2uhK3\nErwUNsJ0WoufuY3+cBpUBQclKiqLRrcMpFccZ6rv02SNju8aOydwr6lIh7NG\nZoGpafFg2zMjVIuBsE6KShGJSfHcJ8zMbA/1R0s6th7/sn13gsjfObeaqPxm\nEz6ozA8L/VUnST5oaKDXT/PfZNZusnJhnO35/Or2kEOHi1eOWa8eoh2Ah7GA\njDJiDGa/OjEen+blN0+fnVIa0DYvcyRtEuR9M7M34EGgCb3mY+G8+6QaD9G9\nIlOr\r\n=Mkjm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4a6cefa-1622194836799_1622194901167_0.3127048824653136","host":"s3://npm-registry-packages"}},"1.1.0-canary-133b5dc-1622214069469":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-133b5dc-1622214069469","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-133b5dc-1622214069469","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f9264387dcc5f00fe43a1d60fd10bf0910503da0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-133b5dc-1622214069469.tgz","fileCount":7,"integrity":"sha512-alfvKzQM0J2c3oALPhE1DsmX74VVH9lw+5DedAazIovONhkoqVyyR5F5uuH+OaT+0a2MMk1Xcrbbb4iUTNXLdA==","signatures":[{"sig":"MEYCIQCWFkdnup46/klV2ODGLqNQgEktOsMkB/DK6gQoZa6MsAIhAP2Sv4Ayd8Zu7JHapmC4xuxTjY1YypZcyRAm3+mLrWvD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsQXrCRA9TVsSAnZWagAAoIwP+wRhC+2gqmZo7NQMifxQ\nPsGdqtfkj1J4zbo1B788IFFW6JS2e8PHxKSJx0JlSV/9wXGpCgV+0ocLN5vd\ncBQTcp3bWPxvyz4sTTkq3sDvYmVMQo+0dvcqk9RqCYNYy0D8qT34iZdty8zn\nkrM+uWZl0I+5g8OsjqVmTRikyg1IBpVpER9w+lQ3Kh8TgkZSwSMoCS81iXLY\nzQTvtdjEjXL1M2N1OiL6GqQNLp1jQVuSKwCE+QTbNbOpWIO0Jcb6eBu2l2xo\nuV+H2mVFJH7NWtstGU8RT8k1oWP1uyYDG1yBJzcMRD3h6pONpiaKoEGhTlkO\nNthbVZF4L7TVvwlm9k9nNuU8tjTvdF+7SRgrPeOjGpITVsVjqxJEYcJ5hvX6\nfshJlrJV6n1h/vo+v2ZTaFTHLa9nR9viRHLbSKcuitf48/j1B6d0MPELPmxi\nUD9plnPwDqaK3cMjV2EY3q55DEh5VClGZkaZ+/YD+9reWApNibH/RbGZAABl\nuWDEcVcnT9pkovKqBxgXK2jn39EkYIgkmq+ECUPvpt25JmcUy7v3IaGt0vUr\nTHq8Q07k4mmaAvspvtfVP8QJ1tTqnDEsY9CQ88P/Oassnu3BhSxdt32c8y9o\n13pGnDGJmr804CsqSWlgfrn7vKjgqZJKMckyLLgvSOp6lDRGsK0AkHiT8qFT\n4GG1\r\n=ShSh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-133b5dc-1622214069469_1622214122651_0.4645234725505054","host":"s3://npm-registry-packages"}},"1.1.0-canary-834045c-1622263617865":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-834045c-1622263617865","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-834045c-1622263617865","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bae1979e4e828f57a3bdd278fb3bdf33a161905e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-834045c-1622263617865.tgz","fileCount":7,"integrity":"sha512-20vi2Aucp5NKUn7wYAUhUW9cxg4BsudhsITiQOsKbvviKLY2cRX1RZBnLZ61TOPNZ2NrA9MF1XT7OCL9WKsatA==","signatures":[{"sig":"MEYCIQCHB2pYoADT9FQIV0r4umUX56HBaKGGZXNJJTpyxN19BAIhAP+/vEdm8ea8hYLVEhp1vXKw3l9hZPIAP3xW6awzem0A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgscd1CRA9TVsSAnZWagAAsy8P/R7qGOA8GlDNjv/jJNeo\nhPMaOKk5T5vBeN/2gpso68LIolDI7gY97mLaU6Xa1QKkuSpwCNzpxxnve23i\nE9OpaAR+Z4Ycb2EdlyImqiZusBSy0pMEjHVUbnMy88DSo4dVlRRNe/H/7OD2\n8JNm3modTrHfpxMA6hAgAusVuU64TXD/ovSbYUdbB7QWrFT/7lHb/QGB34hk\n9AMzBo9SJahiVa9NV2ciuZy+tG3pFBaI398q1BMEpMrP4mvojepctPk9N5au\niQsbsFC1H6r9MOeubBdIepc0PWr4i3u+dYjrl0QGSFez7XyjFaqpgdlnNnhf\n3kROT+DBzzBM8oFhfmLaSo+YImGRVMvxnJPw5SYXcXSHwg9quz9v2KuUGXPc\nPSvlp/10huN8fuJgG6UtKv5LPc6QjWDeX8Km8NiRo88vPpOzlo+1TecEm+zD\njq21zCOLQWXXJTfHAn52ay6fYIq/N9f4HR5lcvqFexHrPxKEebWyUmw8cBHd\nvnI47/DxDwaosJJTqoQjh7n3/Ol4R8/OAj+JyABltJJUwumcGKNRNh1CqvR/\ndU4vA9apBX2jqmd+KF4CH6ANPG7wVBeyZCyH6b031jpagd1wuH6l5dVUin3F\nyM8U+EkL/7hoXowDxxgZStarXhiEYSZKFAIMxBsTFH0+lXIyKqN7w87D2NOF\nrIjh\r\n=zWzC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.4","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-834045c-1622263617865_1622263669376_0.74609776825533","host":"s3://npm-registry-packages"}},"1.1.0-canary-834045c-1622263620329":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-834045c-1622263620329","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-834045c-1622263620329","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d3f9eb708768a6c689a3e12e0bd031bc99779510","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-834045c-1622263620329.tgz","fileCount":7,"integrity":"sha512-ErUkyW5KXvZ2t+P5QR8x1ADQDwuyeIYCmORPU7enMiKUr7CJBtHRezUKvUwxGCj0JQ7Knvhyo4KrXbtMdQJkww==","signatures":[{"sig":"MEYCIQCpB5440C9noAm09yjpAOszxi2sPxz88RbmsN2cH9hc6AIhAMxZTBKyz1w0MlYScziBbkKkgdP8F0Iu/wjZQ0nqlk5l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgscd9CRA9TVsSAnZWagAAyUEP/1yvwrJfCSQqqgW92B5U\n+hhg8msN1+AYCCH1Xs4Zx+/ksG04x80hxoOn0omnKtyeaTpYYAyovjhS17D1\nfdQuyMm9DK51YGJ5o4+bf6tkr7DWVtqDwaObX+3SOOQnzpcRcG8k+10p7VEj\nsXMgw1oh3576ZmK94jBpB1f68iNQn3KNFILiPpxKkin4DZzhMYacnPQNrrYx\nkn6PiB8WdYqMQiZ/8BcP60jMcab351iZBAzFszfkuIRoVgrvzi4S2egQyc1+\nM/l17nyYyW2YC0wvdGG/mhzGq2W78I+Q+baBV7cK1qOb3TB1dy1U3XPRdKG8\nXuwAQwJCXBpKUAixRCXjWNNdC2CexVcFMtah36nJD9roWcQ6+vTjP2lGwIXd\n4+3vSFvViv34RP8b7F11KKMDNAalYIxK83K2Wv7HzH7UgQlkEwL232zlHxfI\n46LOXUd5pn51S2n/Q9araNFLamldGmQcp7qA5KWgtdp7savSwKIJNCQunPRX\nf0SgefcS7NVoI0HjTR04E6iuiEijMt2p98ybtBAUYivxM2k+hX7k9ERJ03PL\n3/SdvruSiGe6U7DtEYcG7tt+RAFKxMpnbilKHU3w2oOnlc4/2IG+G4T7BPm+\nokSOxO/S4Yx3JFebghB4McMxayIRzJXNRxl2YpXFmKhPkuYgTW5YgQLEuHfn\nibrN\r\n=LTz+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.4","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-834045c-1622263620329_1622263676793_0.05882159425541911","host":"s3://npm-registry-packages"}},"1.1.0-canary-ccfedc4-1622292694988":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-ccfedc4-1622292694988","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-ccfedc4-1622292694988","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d146042b4fd6b135ba845a921e514b97ada1f005","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-ccfedc4-1622292694988.tgz","fileCount":7,"integrity":"sha512-7YZ2rfHja8Mlc1cYwQN5dlexnIUOw8FUOICFtDT+JtRyGH5WkSOtzz3kZBlrHoYmJt3i6mGURHWT3PEJYiYTRQ==","signatures":[{"sig":"MEUCIDYWMEedSQENVu/Wz/tBdb5LXiZiWd9wJXDHGFa/t3Q4AiEAvnUG93jzBnlEyVKhiGXnT9hIBYQmAz0ar6+Lx6LhMWs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsjkMCRA9TVsSAnZWagAAmc8P/ijKiYx2nD+OUrGKxDbA\nWZGABRanfE6qMDKLcX/oyAk9dMqFQo52n4UmJHIxYb6i73H8lyiif5BYvmHv\nqQZZgjxyCyhpohc5RfxwUsLnwsZVY/s+juctt256inGzTVw1Ft6WyOQXJmNK\nkuVpS0Ocx6nrmAZl8cU1GhgLWUlYDxUaSyG4yOhiejd7vayOoWp2B3H9Mr0F\nIqvd45bo1gtpJ/0+vieET3UaCyYaNTHwXui8nfBZWMdXCWekvRwx0RSWu3ZM\nd6/kN9O7zfbcGX7kFCY0TK0xqh2NnfO0+NjZWez21Z365OiIKEm0+QOEseAa\nFPoNzfMXPwXV2d+NHnSfeYOOZyLv3IOVF2ypCgGzCSKC/FdLlHwraqWBnVjo\nFeoONNFlere2OCcsjK+OpxK12gWS6fXbKhCUeX7JwF4ipFfLPsBPdBu4sd5k\nVhvvxwmTrApEaB7/agegKiEN9cDBCY7i0ilx1Q/uS0kcXasTKG6FkYZpjjQ2\n2EWWCS8F8KIwg/53SDbCd/omPW6t9uyTyjK0ml1Nb1SBfL3HTl4+w1XJuIJA\nWPLhnjUexoJaVZRwftwPcLu/MZGFp5DmdSbSonvXHsMRsyEn5USsYwYv9I4K\n9xlmU0n97oVKlFuzIsj/rVYSYV1IL+wXsawwpxAj+FJ/sEzLcqCMLKdT3soL\n7og2\r\n=gzYg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.2","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-ccfedc4-1622292694988_1622292747976_0.8714513181998016","host":"s3://npm-registry-packages"}},"1.1.0-canary-c299acf-1622312686306":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-c299acf-1622312686306","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-c299acf-1622312686306","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1b8f0d7c33c93136df210099825bb5da38b155de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-c299acf-1622312686306.tgz","fileCount":7,"integrity":"sha512-o9BQA7cQ6B/TydJxlfSbvS46a9bWzqh37tJzSnVEJm01hVCC/bQZhQF+N0ifPJnKoufMxvh2c0I93zUAetsMbg==","signatures":[{"sig":"MEUCIQCZcvbVRD8xV1Hryu5BY5rlRDDAQjMx3sVgOjNdIrZ7VgIgHByepV6NWwFYEdHR41CYL/k15b/HXcOPbzte/5tWcKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsocoCRA9TVsSAnZWagAA7WQP/0mk4zHC4dSFoUuwWjeR\n+sEmNTgO5srrSYuCHDo6wtfbmzqC9yACqWi4324IGkmPUJCNU+QTTt6QYEeE\n5r+G5zZUujPR9ssJIa8E+Dk9MRLEGWLv5j5wq+sv9Lm36sM05myNOvRCG9ir\nKFVF+fGnTIgGpWCQHcAO312sJbYIrG/2E9Kd8mrmQGYN4ChqDfdWWTZ+oXRo\n/o30iMI1NAg136bP27H2wF8HwEZ6LDSkCTV2vPN6US6HfwN8ZZz/CnQ5Gvx5\ny/no4LLqb/Z1ZvXOA+JqKg0C23gLQLKCVhgpCUDhMyo74FtEOp7Fr0QN4CSk\n93BA6oGl4R1yhtNaR8DbwB30wBYH5jSeHMBMYF278mJWqvJuuXUr4S+RfToc\nNfd6yI7IxhGV2tWdsacxponwe7jzCJ3Wr84ynPAqepxU9nnCAPBr1mQufmCm\nC7JW9oo/fe6YaeLUFKusOyeQOxWVAD6IxEyIJefy0Je5xhg4rRCMvA4r3dpR\nORmscRaNXiBtCQdgxmfRFIkjgEn8eDDTYue709IOxqKb5y6nzui8lHc77qbB\nP3xnouIxqyGHJY+Cah7EAN52/CAWtoQgkAAqARYcwkRWHLTnZL7+BVGdHJQL\nb3O+Cxmh3S2/0eAifTWqJV3fz/I6duuOZuoockWeEfyeSt96JVKeYywMMjRy\nAJN4\r\n=8GAD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-c299acf-1622312686306_1622312743715_0.654342474580202","host":"s3://npm-registry-packages"}},"1.1.0-canary-a877b25-1622401403811":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-a877b25-1622401403811","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-a877b25-1622401403811","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"160e1bf0fedd6e70e7adf448b70e1acd963872b9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-a877b25-1622401403811.tgz","fileCount":7,"integrity":"sha512-Ps1PXuT0AS7VxZD7plI9+HXVfB3k58NwZJqotuGA/gII3kum8nBbY28tXLIuhKM74F/LIuwXBkjvcPcFno2O0Q==","signatures":[{"sig":"MEUCIQCGsia0ne87SdLmhsJCe6XD67x1nWH2Z+M22PxrbqhBagIgUZjVTaRa1DfM1VN2znWEplvWRTev6paWnQQSQJM9qYs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgs+GvCRA9TVsSAnZWagAALx4P/RuLw2lfa/dFd5afAs9q\n+zhi4i1iWKhzeYGAR6ON69IKmyvavkqlM6Hwm+5FA9XgN+5xgTVYQFd/V+BE\n1rZGMy2IrvmBPHmX7599JQ6sYuUuy1kOTnFpwJrRAahhks3FPy4rd+xUOr0x\nQnkYEvY4zZkY8CAEgBaMEQShk6xiqUXM/g3QJFzGFA7V4QAj9M12jTCtjKjR\nELsUR1u6Kgig7vIbd/hNd98hDWTSDWGejO6+6pOxlQIf2Jym6i4QOHpJv+3Y\n/odqi/N4eIyMScpjOg/409FF8t9oej3JHgqohnbY8EMa2uQq97aB1p0bTYfo\neeHEQVM6+9/+lM3+6eEhGdsPn23GpCzX0eFGq+YKTgY0fYdj6I+JCLow7rfP\nqEoOSv2yTC+tJav4HKlfkSQCu6Cfn1KWal2+PUB2/lE24BgQmXCK3ZN/pE+Q\njGn0+PxcCWrvyWtaTzmi/WLps95/ppgTUVZHyUORcUQWcIgzghWJYVasYj70\naj6V+23+c4V8kIH4irr5E5ahdta5QfNBlu+/Mpv0NBwBIM4O09Z0OQBOGfff\n/6UUL4JDR2vOwhAZ6wt+XvmFbq2ReIEAiPnlEI7x/fE35XZB61swbw6y6SU+\nyXMAgBy0wTRc6n0rlQuBqBzTpLsDfpxSDzFENf4HmwIuqNy7gNSe9CldIQfU\n+Puy\r\n=yQVR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-a877b25-1622401403811_1622401454447_0.26951050497643414","host":"s3://npm-registry-packages"}},"1.1.0-canary-a877b25-1622401401565":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-a877b25-1622401401565","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-a877b25-1622401401565","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e09b00fd5a4b66da9daafd969d416492702fd572","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-a877b25-1622401401565.tgz","fileCount":7,"integrity":"sha512-dTgCY4qaTYoF3LIewOtGnAfh+i02T4pEUtoUamYNIESw2nkIM3BqHqY4xyCcF14i1M05n7oLdn7HmRNtKq4CIA==","signatures":[{"sig":"MEQCIBcpqfJ8q7xyaMSAX5HmzCddalAtvHTy+ZZ/PjK8I7eCAiB/WQb+0H0X6Zeq5NXJXSnPRorwrg/mn5+oNtcfEwpqWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgs+G2CRA9TVsSAnZWagAAn5cP/ivJj7xQKfJO3DUvX9sZ\nPCuIJyhts8oB2LnGtl8sGItwvMZwTQ6iRLCxzLGF9z0te7lX0cs6h6qiGt1P\nPzz/oNo7reb0umZigPjRzLQn8sCNSKY/hMtGNlN36fE7echqmLh+KkXxMMiV\n5RyPuMuUeWmvE1/DpUEDfln4KbH3xiH0hbg/WmMmV0ymwIBjr/TDtC0Qp8pi\n8eaUcs0n6Xy8lgkTm7v7KpyF/su52O8eBf+58EcMZ1O3SF+2EzTMQ1pfOHre\nZKuAZ1pJlRReD66xmPBLKDq4K6vHv42UxFmvoteYr3ijTaCIwu3hpgQzN7kD\nxZn0qzAGWSyrAvISUAg0ygvTX1u/Qo/s9D2zSs9TfHI4ViHUiZ9USzeQ+CT2\nqK9irgSQZXnh7iH9jK2ZkEj2qFb0oVm7BsBryRV+yC1nFT7Yp+NfL/DlDp4L\n5zv9OkJbjIgJqKcR/xvC3fTdi44qMdcJP0RZPgIBz2JFI6B/MegMMOqFfZsQ\n8dVbGQgBoP2HBU6tlsq00kVt7Od90KA/VnBvFV+xgMOPBjvtuh1Dss6Oa60o\n/fYLy4NePJ1R6p37IV2G4rkQdxtyZo/B44RD6q1/KJOYA6B9Jf14El5qGNbg\ncHMgBvWkAbQhMzC/UU/YtjLDRMRvjAjzBaO/6fPjtVcLPsp5c96Szf135GwY\nBWRU\r\n=Fzo/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-a877b25-1622401401565_1622401462022_0.3555921843820846","host":"s3://npm-registry-packages"}},"1.1.0-canary-b88e904-1622414498314":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-b88e904-1622414498314","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-b88e904-1622414498314","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"68449190bf08b59124f581296605600ac2d0ebcc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-b88e904-1622414498314.tgz","fileCount":7,"integrity":"sha512-tSA88cguKbkreL5BB7enrrSQygikIyep4S7J4qPuykcr/fHzXp86lLClT1nWMaje20g+6ZSM5U1C+/X9InmF2w==","signatures":[{"sig":"MEUCIBAAt+MHPiVW8CWvXluiHtiyGwadeVbBltv5O9hBxVQdAiEA0ybxsD8zhXZpP1b9W6SYC6se22CwcQl45AmSr3JiOb4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtBTcCRA9TVsSAnZWagAAwykP/A6Zr/z5KD4TCPjQrDDy\nUy4Zyyx9qv968ZCikoByWb4Lt8d4xP+ZCWLb1HV8rt4oqN32Fp6Dj3s6mO9U\nTqGFppVt2Qz4ZPSx/gaK0TJIlJAiPe6pJmiDlgAxBDsl1aLZnMnNqVMN+J77\nUBNpSAtzopH3KJj/4qzS3e+oAFoX/tnho0wBgvrc2FkR2d2a1Wk7RroFHhm9\nfY2OnkMW5WB0WhTQO/tOTVeQZpJj+YhhYN3K7WnKq/YlVJsRwtHfgoKoLLF9\n9zBtusAVNvtLnY6Bn8k1X7Ri2Q1ZqlJHzKJLAuHx4GBJGOCAP7s7mcr+mJNb\n5jPgaj1+5ZRLRI/G8xxCq+Ii485d0xDJzrB+NvYZ8No3BqUFc21DwbvE0gU+\n/PGFEfCd/YOJetJ1S8z+XPzAdnxBMyq06zGK4oFJp02zO59Ow3j0sCueKVt9\nFyY9FxjWLZ6RIsfyAsMpLdo7F2noD3SRO8Lh/Da5lhJU+vLehmtsIrGfqJbq\n7KqKaC+vnks3eS77T5GgAawrRqLI7L9hSf3g0ECC9IYseYmrfq1gRDMHNsad\nym5WTnJOy8mgjw70zj5+32lYPWiddfUxvcbOskJ0rZNnVvHIZFoeRJzjHFRS\nleYjKxmUyVK3/Oj6oR/8/d0INGvkXWIrSxVbA8PSS3KqAVkPE2YKD3sKN64j\n2CGB\r\n=9qR1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^26.5.6","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-b88e904-1622414498314_1622414555833_0.4085397915630107","host":"s3://npm-registry-packages"}},"1.1.0-canary-4f77dbf-1622439560390":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-4f77dbf-1622439560390","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-4f77dbf-1622439560390","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"da8a3662942da7770410e961542cd7a6f678f1cd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-4f77dbf-1622439560390.tgz","fileCount":7,"integrity":"sha512-m0qpgGzqqlF58ss8cq3iSVpnG0UxGHwSzL/b3xrWt9OTZACHlEv75G5/xSDNKWWAZaxpYB9atqMJs2bW4/urow==","signatures":[{"sig":"MEYCIQDU4I6ASIsNWadhVma0tpllDWOJY0HdZez408Nd3QFjSwIhAJPhAx1Yy1i98esSbP+iamAhPfx0dCKiOEZatZfK5qFW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtHbCCRA9TVsSAnZWagAA7LkP/3W6pzBPt0rMNTJJrdhh\naUcy6fXUMi2P8sX0+I/T5dG1UZGf8/gVArjbMO4hwn7UzzkLtExv4uwT0QPE\n/Ilpm6ikSEmdEcY9McGqhZlEr03tcTpHzBECv1RE6DPXGI57fRRted5y4Dqr\nJPRWTrHFNyLUavK5+dyMyfFhXasL+rq7NTbjv440loVcfeEvocE3uKAsrOxx\nfMRITxBKtqRQB0TD9N5lFcvtp2YmVB0NnIDtBKH1w8fjKNDXEuCyGq5ivFe0\nhE78m1v35jHrKbgZQbS+4C/BvbyIUZN69o6OIoVhJQNNQkFRD0u0laFIevLU\nLtdjUu6zpMT9JJwelJtfOAnvak0BDhMywFBfweYKajELh5Q8RjOPg+YfdieK\ne8unZDT2C5lzxoIfMAmeruShgGroweoSwMUlwe14NkPStDhtNe0xDEO82JqY\nzoV+5u9yurbOeCejL87SHqHwqhQ0GC3IEI8Rk6xTLWi6HojF9lwcrcJpmQvM\nCLSpMXIaD4jWGhEkMRtS1wvWyKo/t2Wjs3TI3OaFn2/RG/HAdhiNqTzn6czS\nad9JCpxRtvC91MJ3CtPCL9cI0fo2E2SghMR3mvmIumfbiQUntpswKPS3DRg7\nbK2t6J8M0rJrmcSpjlr07MmFdosqfzh7JZIZ9fGalhmfODdhVQvqnoASICsI\n3pow\r\n=mUz4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.49.0","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"^4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-4f77dbf-1622439560390_1622439618183_0.6268815189744121","host":"s3://npm-registry-packages"}},"1.1.0-canary-5cb9e47-1622466189602":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5cb9e47-1622466189602","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5cb9e47-1622466189602","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f809f0099bc1ded6a4463358f33a3589e23254a3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5cb9e47-1622466189602.tgz","fileCount":7,"integrity":"sha512-+7pOjqrEgC1TJqSHbzOTCAOw53mjykF3Cch5t21ZiSDt8datgi6zAuJTdQclPmHWg2Bz5XhlHUjiOTyiLLiBjg==","signatures":[{"sig":"MEUCIHw0OMlqeun9Yvks18b4KUacsl6oCAG4tZ2bBMkw8k/7AiEA+xlwzsr+SJVVzASyZMSPFJwI3wfH9d7wGtCc28a5T28=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtN69CRA9TVsSAnZWagAAWaYP/R1oGeb8QQx+7StT6HDX\naPsEceTydefWp70j/HdmIeXw5XdFJj8/3noCpoiCZSE06d7wvQg6OEd4Kdhx\nMWYiiyLeUo+6SGTQ5q53Z6ha0jupsQf+A7q02vfiKUsp/m9DbhPA8ixUhoHF\nfxtFwnyzu5TjtZ7VjhyK4ryU49xbOdl9de8PhR3oNeNZWGCLoNfMR1/+txrX\n3yNC8xfeaIfoUx292b0EFKFhn3m2273ct9Z9sTwFpnlYqorGU0LZ7vGgJrsn\nhLbH3s46Jda9T8XY2s4sOSO+HG5IkTi/sVRd+foIR4VStRFds5pFH3wnOA0+\nVZriEhTzIrllKpsWeYPmRE7TofLJ790NXVtk0MyZW0nmFhrKOsLWKkIoONUH\ncn6liLdZCCnHjq1niWVlpdCh7zhyGgaix86kA92Py/zspus7aFHrVxw/uEzQ\n6QEAH2pLTI1dMJqYZIGxPlxgL7b76oankoMjYosizfsQruSXpCpXppVxA35Z\nhfzko/FQtekrMbgOIgwj2svOulw3ptSbLyV1Fn1LtsRqmQ123Ly/2/zr5JJs\nu1YXDOBFQVYDVD3E6i1aYwgQQXdqLr0O1c8l92a+in60TJodxNX2rV0dh5qg\nVD57hzhC3epttdG8WEZZuvuLb/sNOJAb+QvMH0KsaaoolZikrxNdkB6lrkN+\n3+uJ\r\n=cSto\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.0","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5cb9e47-1622466189602_1622466236475_0.8490445446482318","host":"s3://npm-registry-packages"}},"1.1.0-canary-5cb9e47-1622466189263":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-5cb9e47-1622466189263","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-5cb9e47-1622466189263","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5c9ef092e33f9a6edc18fe9a1ca6d59be5a23e69","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-5cb9e47-1622466189263.tgz","fileCount":7,"integrity":"sha512-8Nig8lmob67tUmGGAoiFAFSTAMgdWC3PiS08JocX3gsn8lcfI232O/oDDrZnLUbbr5rKVyPJLb7JoJBb9nrTRw==","signatures":[{"sig":"MEUCIQDbWExYKPKEIOXFBT6nLWEJwBHdWi7069GClMSYINoMLQIgXdySrK8qv6LXuRTjhagmRzMNNJtUoCvGP/wIYBlG8NQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtN7CCRA9TVsSAnZWagAAOIUP/RQGCPAusGsbpJKjMbbq\nbm7Mz0LCkSObtzWm1lQ7vGYeDefaVcdoxQPz96vvHJBsKvLrZk0xaFOlKCuP\ni0/kcrFn3+LIIuyVu//h7JKCoceNOB5CpJRKtWDzsAUAcIyqNAncIYWj3YVR\nT0UzIVKr3yrKVSbOrQ+/gHWIy6+6AR/NrziTXE9lH+dVR1Wyy9lBD3MmDAPR\nQBCqEQ7RkPfpJFvTqDmB4VSXHBrHz3kRITetMMaqDAVDCVhjct+v1umUejW+\npde6llZCTWNVshwpywEsMZ0H2v50zt/VHpg07C9Hungg3otRt9AANIJrXcAX\nqelcBKlUKIGlysuBiaA+pAdiANrHyZFjlKPd7UOCTfMISh/NNgZ4D9RLh8Gh\njHSX6qOY09OLxoLlEq72HDLW6OoMoOXeLvtopG0FtTUFD1pOFL8peMh70v+4\njl48JHt4/Kj84pjtw6fl0oGRGL4MvdN7FTHlrQ7WX6lckxCacOqnaNgN1UKn\nJx02ELL3uC92fMDg4OhICkUUHKgC0Y6kVoW3KlNJN1MnxVkkEneWdMNu3Cn9\n4UpyTaxZl8rNXM/xxv901MhPoqdFo/d06MNpt6BoOOPhNjna0+61PV87uqNS\nwMO/YzzShtaIATHu0mbmLPjqDvt07qqAbncgeIXS5BArCW3qBtK1gR3QjGgs\nK8eb\r\n=7aV/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.0","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-5cb9e47-1622466189263_1622466242015_0.19983295379001276","host":"s3://npm-registry-packages"}},"1.1.0-canary-df42448-1622466297044":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-df42448-1622466297044","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-df42448-1622466297044","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"385f5eeb687b2e2073c037db21bb95e2715730b6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-df42448-1622466297044.tgz","fileCount":7,"integrity":"sha512-6QYjz4Ya8pWILt7OkNRKofktV2inuX7ubnri6gr5lo3ZBL8R4UKKsh7KRRLnEvXMDKj9l6vbwZrTTrJNY9x35Q==","signatures":[{"sig":"MEQCIF1ns0Gq7vLco15fMa4V7Yi9WAul3Z2+33FDFCPNzvqAAiB1HBYw2v3sKI79h2WhNtpp7H/fOv+6k7gUMN0o2tN9SA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtN8nCRA9TVsSAnZWagAA+Q8P/R84un7AvVYdr1bCQQ/k\nyz2/c3iUd4tQzYJT88hN57gJMVG0eO4I6vKNMbKMwRfKz3RZvpKNGOEiqkbX\nUtO74eco2mWblY1FY5dd7vA5m+MH0oEWLf6/s5XIk7iO9n81HBdyquWid73k\nd4pWhYf0p8lhH8Mt7Ryi2rFNH0U8xy9BjQspLy+QxdVFdWwCIiHkX4NXbNQa\n3Awf5C//w7iGBxT63qOHVRm1RxH4uyeXeZQl/lCdj2SvMqQuBrtoNxEFXpTl\no7Sqmc5Hu9d774xCv1uXV8E47o6vHVu1LZsbvMWrH5zdPT4ZCMfzb0/y1Bso\nL54HmEU7ecnnWNhwXLQI4QvAH7GZ/JFz/TMeNey0f13ZkTUvtFnahJziN1lI\nAW898ozlyVe4Q0euYERDiVaMxyTBscZBTddHxAr337m7I0pCU3IJ1AljaQy0\nXKVHBCaVQ38ii9KXeVSs/O1HQNkVybrXkccdjNWaOX3pO7pIEAEiw76sfdkf\n5uKyiEaV0hIYEo8DqATEU+umnsxs0GnrDeggbjDy7y7TFo8WxkTC6eM02Gkj\npm7zF/IdlGX3BYMYPwsehyycosgVtmts6o0fMQidyGXyzfz61rze1KfWlDla\n7JNZzmBSPrpTHG+1B3UQzHsAC/YUG2iggSArAfxtAeE3llQnY5NweX8CLfsD\n1NCy\r\n=40el\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.0","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.0","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-df42448-1622466297044_1622466342924_0.5112891538235314","host":"s3://npm-registry-packages"}},"1.1.0-canary-06c0443-1622471289299":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-06c0443-1622471289299","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-06c0443-1622471289299","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4a7e2edb90788a653a29d14e22a132501122dcde","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-06c0443-1622471289299.tgz","fileCount":7,"integrity":"sha512-QHsAPiMa7RMd/EyalNMUD7Ql/Oj/gBPkw3NjbHIHqj8ZaDLgxCZ8MCoX9ZZA80frqWOG9xvPhgeKqP1G4o9Q5Q==","signatures":[{"sig":"MEQCICDXP1m6TtbyFCZfaI762Vd5zI4FMZEUjqE5+VBTkE9IAiB/g/Xs7emYb1tlc5jZshFRp135DAnBqqgk04M4so7jzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtPKwCRA9TVsSAnZWagAAcewP/2Pk7BRjF+CzKSQt/1Ps\n22+acxVBuWMAbFzCR2bZAPlR9zqbfHVw2ygem1P4X9kY/XMRkKyitf99p0Rw\npIZ5TzP23+fdmqZPqVJMxFTU7JGP0GBIgIp9oBx9MsfZKB+B5pTR68I53b1Q\ngJimcqZH0GcZcGJsXmNJ8CZBtaDofa38dkJMyizPMlQmWNMKKRBDogN2ji8J\nt8/H70GbRRFdlPoI11nDezy+cZKAlF3jz4Q4j0jcwvkWauhmexCAcp1hLvXw\nOnrhW82vODktx6G6pGbQrTML4ABq7ecn19r046U0lPGL+2Vj7RDgyzNMKtYl\nJ54mt9oFtk/ubKGOUgA1P3uYfj1XFN9zv2ssi2Ka8gampA4+1l2j2ZUS8mzT\n8r0TMsyZ2eHpA6RP30ZGnMjoMhu3MT2CTkKmGijb9uUMCSTjXiWbNEBOf6Ie\ntOdiPqK22zkmAXu+BBzqmNdGPfH6kWdGZJ991ymWTAhbcN1ufdtJQr52BbRf\nAW8CPIQvW7/3WR5CgJbS/MAHxYMeVJ+FfHX7Hre+Z7qFHtrR0lA014GcDmqY\nYLEb9BGTwnaf0ppKiPfm1Am7/valiNQhHBqaPWiPlQYFf/V/0Cjs+Ut+HNfx\nBEaPVv9lktaIA2LwWY1JCYdmgD8uOoh6wfpF+sNClFMRY1E5i6zCIAc4Jd9t\n9bqv\r\n=Q1r3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-06c0443-1622471289299_1622471344067_0.6830743995731192","host":"s3://npm-registry-packages"}},"1.1.0-canary-e80e333-1622471332788":{"name":"@iadvize-oss/store-react","version":"1.1.0-canary-e80e333-1622471332788","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.0-canary-e80e333-1622471332788","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4797606372c4d9ddef9efbac7f8f9b1bb2e30e57","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.0-canary-e80e333-1622471332788.tgz","fileCount":7,"integrity":"sha512-pzf90a6+fHknMV8BMIxGsONaCuFCNPpJ4TcMIZEfPbzT0XyxE3aSp4pf+xibPf17Auk6HJJP9xa1inMt6j0IGA==","signatures":[{"sig":"MEYCIQChAqPDoBul0E82SugdVU4d1zWTRivN4e2cPRGnFdVt7wIhANGpunc5ftMp8URkubQhRqRoy2dXkILJjcaKA39g9+o8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtPLYCRA9TVsSAnZWagAAjRAP/jmQSVUG3sn/TKesGr/8\nRwkezDcPVkj5sAS3IDfqK8Nc/+DycxyMcFAN6r16almpxD7ye5hU8acbqKfu\nPDFOOsMIyqy9nPDW/A2sDrADqLXkIhOo3DKfwScyy1BG1L9lsfn5D4KzjJ4H\ni3NT/18hsUBoIPDwrnsignv1fiJSxsdkh2ztVlsTdFIG+5FHeobPUAzNa+gg\nYQEjMzQzAMO8Z0oVByO1VlFH0gqljVlxTGfSEwTy/4bK8J5KsbQB3kkwWPds\nLr2/fPIniW9+QqMgEfcW+nmqE5ulOsDEqXcbLAl7cMd8iurWqjOUi0mUAwp3\nhJrUQnV+QKx/eDeWlgnEVCJHUCtpFiylRONJMLhwsZImyWz8jno10hb15pKO\n5jgTN2tDOSN6Zebbga9/zAinhqRELY0k6TcjL6p4tvch6jiW9r5vfF/mioqy\n0IssiYY8Pfx1h2hhAPhpgozzpnRrAz9mvK3SssEIhbDTJ1tYcITR9o2S+s9E\nmzjLsSxmOG2O2TzWtyy8L1P2o6bx2X83wNEVJa+4S+jjkP9D5XsBQ63BmA7Q\nYlA545k+dOsN3BzXxsJk5Ll8in5J3F/V1ssEJ2WQ09XiH6q1P5c9UcrX3BFR\np6rSuhspDtwCoDzULK7GU73NyaFw9LALXXV9VwUSCB5P5/jTf2wHAQoV0J0L\nh8wS\r\n=AJHU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.0-canary-e80e333-1622471332788_1622471384230_0.3635273014018481","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@iadvize-oss/store-react","version":"1.1.1","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.1","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0b251959ab65665b99d7e87cac0ce1027522edf1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.1.tgz","fileCount":7,"integrity":"sha512-SrRBfn9nolj0nEGdHWhSq11o/mSjd+QpRd5IlTTeUt9LrafqKrCnvc5fONlIkI1m31+g2nUWPP4N6V5dhbIpmw==","signatures":[{"sig":"MEQCIBkhJeVT9hKRycL2o49wrx3Sjw/Js9Cqo8CHPF+jYpg2AiAsVNoiKMEs69xLXAcDifEAQSrRDUnoQQDhZXnCYh45xg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtPOfCRA9TVsSAnZWagAACQ8P/iUE5qopO75/HbdQPrCW\ng5/0lDDzWwwbEayp1fKQ2kQhmfrU4B1w+D7/2Vr/UfaqavYp9etjnZx/o3fl\nW8GugC08nyS9z0IOxplecxPu4C6f5FmJcZBFLwtBVvsKtnHuH3WQhRiHGdvS\n1pU29lTqwsPUu4MHbguKuXc8hIpN1ulASlY9hn+e5msVrs8+roWT7FEeHn8u\nvSKf7O7YhUyRcpDNZdgfmHJAyFaqHh7kUQEL6yegUVRxIhYFU1BB6V6QsJPv\nDnS+dEF2CBKtX5cYv52PdWfb4/azopOdf8YSJWR/WMORDMbnzJdRCXfRatx3\n7sGwlv8x6N23K/I5PrJgGVT2Ak1VRQkUSYJ/s2xLfcQuf3gfDoYRwiO1tGIP\n8pHcFDQ9964Zszapm7eSpX+QUmd1ozRQNTTyLmQGEBw7qOOJg4kts7G/9067\nN+CebI4axI19NFNtXaEz1gXD/HqgWc1abB9u2KLVDhYwtQEW7Z7DpAqZgqXz\nSoZEkwO2UqzP4rwYCbFF2Oyx27H/ovCreeNPy3+RKDsiYAECK9pAqPBrE42G\nyY3N/Kk572JCmaFEsxD0G2pM6nNqU9vqkwA7otJ2jXWe1i0WK/vMQcmZbwUT\n+n0EHDfASOUifNrKaOHfsd810DnrDjx6jpfi24dFubKqBcg+PyuqeRsNY29p\nygKu\r\n=lR3t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.0","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.1_1622471583207_0.330156304118155","host":"s3://npm-registry-packages"}},"1.1.1-canary-5dd39c6-1622474067435":{"name":"@iadvize-oss/store-react","version":"1.1.1-canary-5dd39c6-1622474067435","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.1-canary-5dd39c6-1622474067435","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0e8cf9b59507299dd8e3211b603adea813ec5347","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.1-canary-5dd39c6-1622474067435.tgz","fileCount":7,"integrity":"sha512-UmLYEtgSVukl/mXF+UtHeahKURqAcUaHlEdojObpKTPDTtqLRQf1SyX4azj4kIyYUywpXv2czuwzfRiUzM2Yug==","signatures":[{"sig":"MEYCIQCs8K2x8uEtKLqeqjcCZbYcJUbSAZj6/0kTN29hx/pMKwIhANu7dX3nMZRKp4zzoTMiEEyFypyfnqdCxH2qmw5Eg4cM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtP19CRA9TVsSAnZWagAAnEkP/jAXNPdfo1fubEy/9IH7\nMUETfwa0AclQaPzEXZ3awk6uRxAAXhG65YV9xadUdmi+C95a20evAme76tKN\nVXxBp3QJdHO9Ps7TTfLlOH81cI4sMG1RzP5lAIaf4tMP1C2hoj3Q5v9l31ry\nSa4uBEupFz2LNGEoQZkCZRs/cS777dUC5fsuknoCHQWp+dtUW/x8v8z7QMbI\nSiaw1fOHZtjb37GbVuL/1Hp7/g659c2vOizxa1AZvzUFQVy3+gqddwY1hat3\n01tLvOq81bpqH6C9nwhM3BR6SJjfIJb0Bzkshlnh/wF4lKBARINTDmkSCVgN\nasnUCdXY6YufgQ7UqJCYYAYMrRZPzhYFHbmBEejb3wY6dvsokKujA3KHn0sX\nETlrjNr5AStn85JYSKIWKQfvUCkRdTZJkoq+HvLOXPvkosgqAudja7KS78zt\narSYJNOly5E4bgxBQr2TH3txjzLZdCNxpPoCJ6FkKLuQogfVVqCpw/veYlVe\n1MoVQgfZoHsTHDwJpEtf8mLsGQfnX9tICeULggMAqwHNVjfATF96mkNJs8Th\nQDlo2lo/DQGCa/4WK9y1MsG719dqllnOFgK/h3AcnPFjh5GtVQ8zGUieRn1R\n57PEt7vWWk7YEMp9kiOCodtXNCmqZSbvoAYIhtkhFfYOD0SXKu9h5/++YgBn\nogmy\r\n=WFht\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.1-canary-5dd39c6-1622474067435_1622474108360_0.6583594317287318","host":"s3://npm-registry-packages"}},"1.1.1-canary-5dd39c6-1622474068265":{"name":"@iadvize-oss/store-react","version":"1.1.1-canary-5dd39c6-1622474068265","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.1-canary-5dd39c6-1622474068265","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5553c028c44b8ca67ac07baf3566d9ad8342b9a9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.1-canary-5dd39c6-1622474068265.tgz","fileCount":7,"integrity":"sha512-SA+LZN/nYfulshsbfIe0/OXoeQLE+Z6q4N1ikq27clR2wKqqdam0RAKHwgqBFhelLBahNzRDPcqOlksY+OA04Q==","signatures":[{"sig":"MEUCIF6aewhL6qf68TxhIA1GrCWTdGxiTmtE3Hw1LbqWWF/tAiEAofakov0vLqSAdHhducp75zrt4GAaC6zykelmZxnkJ8U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtP2TCRA9TVsSAnZWagAANCgP/RrUtz+hTQr4YinI4pHA\nnIn+UH6kO3sovgwCnvIRWUEYd2QP3KwhXoA9s1IyaTljeMQDbV3BEtO9FS6Q\ncsUmwka9SeSvY5RsB4h7fEXPM2GOQ/UiK03UkdbOaj83XZc4CooRlXAqgmL+\nQ0feRkpnNcIfgjOU9UUnKbW6kBnLFI/82JRf19Z2QFhVzuxFGjz+he1u6MyG\nrVJQBu4c8AcbIkzY1Mk34juhQGhQFd64ZR2tuBOkBl1fH5GskMEzcGFr9Mgg\nxHmDdWksNEZahTNjscTt9OokJcqKmHVlML7j835bzLBtqOj7koXrePSjZYz2\noxwHCCch/ELv0IQAaVKaO2qmH3wvBGJRqD6xaAt0fSqYzKkEFuc1BlEQ7Hs5\nA5ns68vWUrtka1Sae7LTX9fK97rshxRZ1xUzYJihqIdu+PtQHUGqQfwHmKNQ\nTjzxwgU5wk2H8IsFqUlM20KvA19sJx7wiAoui1DqWhoiRxJgs9yyOTNLxVfw\nOra344J1xERqHVuliDYMX06YyMnOkEfozXrz5SOUBVhQI6x3cFA5F8MYTd5U\nJYNZUeQTwDpZvkt0zjbefoGxw7Z1KLpSo7fYK1SDUJMlm34l+Uwm1Elwk0wE\nSd9sm8ay4nkeV6ASZwGlIVBeaNtEs2Tlh3Q7KC8XwC2xp7iXx/6t/h6C73PR\nmF21\r\n=x9IQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.1-canary-5dd39c6-1622474068265_1622474131411_0.7643632342937108","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@iadvize-oss/store-react","version":"1.1.2","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9f0e1ea351abcaeb9df41ccf03f0d34093114ccf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2.tgz","fileCount":7,"integrity":"sha512-AHj9wb6pp62X9WkAYn0qr2Y1iRL6AkJvqaEHuw7zKSjYOhzcbYzNxxsbcnY3cC/Wk0dPgIOElyfZ6cuE+Zlsgw==","signatures":[{"sig":"MEYCIQDW6XtXm1okprKM6zF88O3QiPGAKjg2jYBWB5Q5U7ezHgIhAMWQMjPQP/zCljfi4dIkeVShPng0goCyQ6W4rdWVOJzb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtP7dCRA9TVsSAnZWagAASa8P/iGKd+uIf6/0bLImaXym\nRcMytP36haggtLjzMwVIt6yInMZnyuCkxbuKGLpuoEHMTYmd4xfPrpSIoJsN\nsEUPx+R5t7VjNuXEPYU24HuBHlFPrazP44JiZk5tWjM/RzKojfiX1QoCO8PF\nD8MshCM2dHisv72aGshtBaLAiIXiQNYd42q8XMh/SnpI1vjbWe8gOIVUv8D3\ndbRkhK5w/n+OjV3bAFBaEsSqjuWcWzlEWUi8t5NZOUHllp4Xomc2Ov8w8IuW\n1XkKhamxsdiJA32w7BH1r5X3aujtbnDJSvNx2boljcZNfOy1zSxjM4hNuop5\nY4iBsB6uqqYGH08iyB7nUeaVwX+JLGYrcCi2qA/o/QcYRaq9LzZV6VHaSvsf\n6FuIos8/+2Rc8dERSzbiBfbplKYarMJvPlwcGU0nzMceAsJbaJ527kidBnaE\noRra8npYpOWutPO7Jx+syhkvxnQ5FCB1JunjBNwuMaUwXyD3Be9buYlKgCry\nAwyZAWptAB/zv0RqdmecvCQszEiagusEHrIA76rrml8FprpheTDmnFASKwkk\nDI4/LSzBYGfmaQ3ILiTHI2rEtRnx+CMTTusWlwhaWqUOyzX7pmuLv+mMCO94\n+LidYF31eYt5mux+3iuCef6z55xYlJpoKEG2fn4KGMdpNvJqfAbok+J33fZn\nUo5y\r\n=BBPz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2_1622474460773_0.07705332080263427","host":"s3://npm-registry-packages"}},"1.1.2-canary-dd97712-1622772308109":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dd97712-1622772308109","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dd97712-1622772308109","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e5df937e462caa15c4b5f8fa96de1d1f2e3167eb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dd97712-1622772308109.tgz","fileCount":7,"integrity":"sha512-8m8OhvTMJ1reu7esTXFdY5NJf8foGhhh0V0Jq/3CsAXNB/E7fV110FzcMVTnr1eEbNe816A4S3zsL1gvqBMvVg==","signatures":[{"sig":"MEQCIDfUWa8mmvMwpn4al221UF9DYbkFQY77qjd9v63IWEaRAiA7TJ6dVm64ZuyLTBJrlJbw2oYP3oDlj0PtuSHpNhl2Fw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguYqGCRA9TVsSAnZWagAAO/oP/05ewWwtct4m2BlWCik/\neGll7OY/r3LlV646SDxF4/JZBIr+nSg3p6nnX8ZQJ/HDRnlGuercjhKw4IK7\nNIkGBZtGC6r1wGW120uhjAkj56GD+0u+dDyfu2cj6POSCSq2WSMTpptbT9AW\nQIjF5Nq7FOd+L9Fc5xHO9CqKTOJJdCyDyA3107JvYxNl6D30Bb1b6/y7ryux\nzvyf4QDAcshy9YTHVwu/hu1NLKZk1ctJgaofo/rDLnQOtC0VS9SFsLfu2JNU\n/nz7FG1A3faP+kghLHhdUNxSFr5fW20YJCVGVQwQtReM1WBXFZsigAVs2C2F\ndc0eSO9AsJZV8x551wt3A9nHtC69GKKXZOZtllc0AQsfR2fTiwUZC2zXBkwq\nnhDCelTSm8AIGrPRyMLNQko1N9ul5o6zOlG1q9Y/8qpF1Gt/XZ5EwDheNFa9\nKSbxROxWCUki9fTWVLhWOnpBmPc0BiUVuV3mVD6woW+LdY8LZIYoOthtNtp/\niXvp+aT5wtqclqROxVYeVSskRa7pM+adgRxeWRA1U0G+jdEuj5MUhZBYYSjn\n+ydc14c5LgEzVw4lu0NqxLxUOg6L03uwUbulIZs66BmLShLYuPKpYicE7UZL\nEo9etNn4adzpkVQ4s790YbBe/BwOS9aSwFUcxa2wunkhWSJw8ydsoYoK8rsb\nbfVQ\r\n=fkTo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dd97712-1622772308109_1622772357880_0.36269458635402496","host":"s3://npm-registry-packages"}},"1.1.2-canary-dd97712-1622772311621":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dd97712-1622772311621","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dd97712-1622772311621","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4dd93ab4e1b4f512bad2a0e8e0fc8e8abe316326","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dd97712-1622772311621.tgz","fileCount":7,"integrity":"sha512-AI9GHaEqe3PNhvIrsmxI40XWRzT+9vQBVV81Zuk9LDN75DoYRzKsknTnmSU9wxRJWStjbMrXKSFDnTgaGh7eig==","signatures":[{"sig":"MEYCIQDZ14DRqzvvkh+8UW1Dc3slxT5Y0o+NvyhoNslArgaRVwIhAI2UJUjlFaX6jH9UVpfyYUTyu2TIcAjHYnn1OMELwxvr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguYqRCRA9TVsSAnZWagAAqdoP/1jknSFooABrxDELxW4T\nzivnrA0h6rmPGke6nmL6PMsAkKq8ZMfJCoWB0B7AxD+RhJLTKXVZVSLNipBW\n4PxOc0iBcHIcQAir53M4X5w6clDgJZnxsB5UH30klkWQz9kYYVhlJDBfc1F5\nUrAV/hX5GT6AAtZymIURbnBfp+F0i6X0874ONEFhIr/lN+FVGH0ER12TQ/ZB\nVXrkXXN2CcCxntfK0BcQ151XkvKujCXDbvbQQwpnhxgFa3EnFzPwcCAF7DzO\nmhNX63hZPXamK0ijgSJq9x+BHe/dPLnyY2tqR2OVv9YJi2OX3cwhfzccvr5A\njiA9Rz5wo6jYB8W3s50EtfeEz+TOtxgGmt/cFsQz3hJjm9a8phON/h3/4lH4\n4ppw1eUqZVjXMPvTjtO7nF/+TOev/Xr/Zs+zLPRw7Z1qDS/SXIrrUjRyeZb8\nrHF1p2BeqmZn7U+Accy/JUPyIyE3zNLw4ZtuwPcMH9KkHYat7JOvb1Mgk0TU\nF3V7LkibYP8IGnv3OQQYUgyhDs3WujqQIsU0gK+sB112bMKw0MaTnTV9s5KA\nW8szK/h6OCdN4jPTpFmsv5g07P88T124BpnnB9zsda8bb70ncPAyMpx79Y9c\nyzbi4WTolhBV7zSdnMpoql85qKgX9B19/nFAfzfBy+T9HIse6RQ17iaXANgy\nLNnV\r\n=WCeT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dd97712-1622772311621_1622772369476_0.033573441142526805","host":"s3://npm-registry-packages"}},"1.1.2-canary-dd97712-1622772331390":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dd97712-1622772331390","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dd97712-1622772331390","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e4c7f373e51cb2f6ead06a01b8e415dc66cb992c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dd97712-1622772331390.tgz","fileCount":7,"integrity":"sha512-Xp/p/364fD8ofQB15VGWjyw+H0F0C8GWmdzF++3Z/vRdnIILh1BH0jwfdGTIZeZrDyL11itTEtqFpdzLA7wTjg==","signatures":[{"sig":"MEQCIDF+MtK+CYVPJxqlva3Jx3qBV+xb8poeGHnYhWr5ZQOoAiB+La4GcxY1m5o20EwjKHNmLXEmSq+HDOYCcU+lPk+QVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguYqiCRA9TVsSAnZWagAAZq8P/Asa0Avt2+f9WwB6IEn1\nD1CxNIK3M+lpz5/JikcD/x/9vhyUNVGSLr7FNtgi/6xmfM2iJlt9aCS6Xqho\nOsxHo/O+WM4SkybahhveoQs1I9LlxqFVEg6alaUnIX3xh/+VzwqhqDiVhBXz\nNQcP7j2MFpLq1tSdrlowcoy1BmOVrxh9e+KUUKyIYr9Vz5cXdkJRLuHQqaR7\nR960c2RmBDqJ0k2ikFXdyCM5SB5xhUWetfEcChJtzPP+BRwRUmAfeH040f6J\nLWzBY35V5F9SeqHyahv60l5LLmYWGq4QzPgqY93M2pkI0gBK61h8oGfDQOog\nul6PPpHRSvfeUzetle3mWBBssEhSPF8aqq84nJn50OgytjOL1F9tuPiuro3v\nOMBJvHCECYbdMjADDYKx8W2u8MQZZMfIUIyYDC+guMn497998ywggLozyz7d\nhpL9RThDjPn0Dwp9pyueQOYxc5uV7w0tSRLdtqAjC2Dt8zoZiDYxU+8NIn6u\n+3t88R/0Qmqu/nveRWHxPdmbj6f5lHwVtu1E48feMdQIhvo8G08c98qbxxTk\nTsPf0ogE4Cfo4NjtFsx9S6d6K+KwYJKXnrDqCf6TyyYe8Rijqky50HfUyX3b\nfpExLf+8FrMeVL3X1V4le3NAnrnqMF8Nsaki7KpWskQ6VjWouBPp822u7/cu\nK5I+\r\n=Qy1F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dd97712-1622772331390_1622772386556_0.9100346664148693","host":"s3://npm-registry-packages"}},"1.1.2-canary-dd97712-1622772335459":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dd97712-1622772335459","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dd97712-1622772335459","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1a72d4539f2d2a93412bb8efbe0c156e20dc0e9b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dd97712-1622772335459.tgz","fileCount":7,"integrity":"sha512-GDsUv68InTDLo1KgZnsWOD2LI+/9lhlPI6jyEqg4ZvpBefeS4MGRTdBtAQeT55BbmznQGC/zHrbiLoVl9dYcBQ==","signatures":[{"sig":"MEQCIGUCapQPb9Iur8SF1UWdGimLt/ArthlOkzmBo3XjWsrGAiBCaJd9WWz1RaeJg+UDnXlxMAKOdBU0bIltpDq3dfPlqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguYqoCRA9TVsSAnZWagAAOW8P/2P/8RTwjdSg9RmnDOMW\nCI5pQ6JakO+hyZSJThPG9QKVwSongKE7q1OC4DBKhNO0Eexqrmnia+HBjXcH\nJTbNLkFActI0cR5Yz7N8sP9W2f8pZ72PZDNUwJnVDdOfjaJvotrOjJk/2yb6\nStVn63tmJRcYMU1cZMC12o1I2GUomAMz0Ac2BEE/nENI618FLaJ+8OPZO+9Z\njz53IzOsZojidpRw2P75VjgUKHVmUFfV1Ww1sc9OgvqAXwQldLeLL/AQ6VfT\nleE1G6GA/gYHfU7m5SZaO3U6lYcDUyPh6dQhJpr7hiIP1CjD+QmNFyH8WaeL\nLHibdyTlEzLt8xFx/dFO6ReHeF9NzZhOBjL91nIhlspHH6QQLZdWKCNHnLbu\nG84+OsG/4iI5vv6Mn2safghUfm+Qb4nd4kAT8msVNG+yALdubUa4rbp0583q\ngCHVJBvq8DQWIH1igoikM88y7CQDaM5D8OJ7tUfeREmrLS3vjrQ63gZKreGq\n0GnZWrkVGCaQyPQNVV/VcvDABA+hKReF5psYHwSJAJSRXh1NXoMpQRa3HDeH\n2q3GEQOQdfz9tKrWNAS47x6HjA3gon49b5LNLtzR9saRg7yIlJuFfxf/QWP/\nMUDIb2zztztLMZGqr/xmNjAtWSgmccEMT6GORRkBPT5Q8DIEFDW8dV/sfLzY\nkV6k\r\n=PfYc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dd97712-1622772335459_1622772392861_0.34950171939347463","host":"s3://npm-registry-packages"}},"1.1.2-canary-fd48f71-1622793441147":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-fd48f71-1622793441147","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-fd48f71-1622793441147","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e5a355ebed725a514489140ad17d867c5f8b9113","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-fd48f71-1622793441147.tgz","fileCount":7,"integrity":"sha512-RmHdGvWTmClZKwT7MF5aNMvz6v/IIMD+dqNPdUACicRZr11iZYqtpf0WLag4kqHvvGrQT1Xn8gEFmCl8L8WBkw==","signatures":[{"sig":"MEQCIH7wcZd2jBdc15/L65GM8rSHDXzqlPcCjTRjfoiA3q9PAiB9CQMmK8KXhBgStf4VQH6Lz0c/rtW0jHgMSh5n3bczMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgud0WCRA9TVsSAnZWagAADJIP/0a2ljcbKswWVGyeV0ph\ndIyHwtWDcOyeOH/1jhHkbAoCWEKdFng2Op90QH6fSdtvePnfspbbkxyLkUwc\nUZPmYzAjl0n6dvoBvSLFA6cNFATCFmflqlx/gUmOeRRQMbx31P6Aey+nZ9Aw\nBxVJjKu+iTzuKH51ljI5RUlbpe3drtmIJ6inAvVvVxaWWRU8ImZ1khv++ySk\naxUsMDduHU75LimyVkT1fuAtGPDm6zx7y+HJpVVtvVVut/M4EC/3vHDqkko+\nIJaA2r4SSSpH73KUaGpGEvhMRMdhw1WAeklve8AJrhIa7fLKnhk8YlhfDL84\nwGU0eKxbIeKoVaNPRswNyS3pg4R5tQ0htpy0p930kEF54+hhhTvGTXISyQ2+\nLvKgtVHis6Eu+ilgkBfKsen6CUgq3L7To46qCLqefJn0BbUzqrlH1Md02hBB\nkrhGgblRuuHVnJOsw+Q0yI+zgrlAn0KZ4IT+8F24dUqoDexTZsHj/gGI+Hcl\nOu45IZpcuC7Fz+HZ5EAgN+d47ikio6QiGEBuxr7HspHOz6UtXq8SThxOi2p/\n9nwlB3FdfmyS8iSdvqSPAXOdd5WGHQ5gwfcRqre3oGnvgk5YlZ6kYoaZxHOX\nM3bb6mzuy2U9CEnmhq0LIW7+FuJTmvTBLSCUI9V33TiSwlCC5kHhc9ODEpGA\nlX4d\r\n=McMj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-fd48f71-1622793441147_1622793494743_0.7686150211678182","host":"s3://npm-registry-packages"}},"1.1.2-canary-fd48f71-1622793482356":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-fd48f71-1622793482356","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-fd48f71-1622793482356","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5e40152e58324f101686f0ec06d4887dacfacfba","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-fd48f71-1622793482356.tgz","fileCount":7,"integrity":"sha512-lGx3Sq75lhQPnxhEVtEbDP1POgvQ7q30Dd/L29vjzAvpjHsW/EP1imsOGbMScYFvzzP2c5CEBD3Xe202eDlWnQ==","signatures":[{"sig":"MEYCIQDkiAtdw8ATfJOXV0UFeZE2D9IoALHl1s9MDY72rI5LSAIhAO/jupmcbgCMW692lR/aK5c49I+OKk4dIhb6i7VPglAo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgud04CRA9TVsSAnZWagAANtMP/0nsmdZ1DA7pe+rwEi3f\nm9A07wJXQJNoqnbKmY2wMuBfWDlTJaRTz8DEM/2jMeKxkCH9x/wpEPMwdhiE\nK6K9qIEurCEvM6u646pLHbkMz4InE4IYILRrQ7XcBUgwtYt7PMrQb/7Jp3W1\nkq4WoyX8Ckg1IvTAPpF0vvOt+6Z62t65qqD1n7qVzHkti2Tf9CZ5z+s6MTeL\navRONfNNDRR84TlLEopeexHfxp8LWVQZAXN6M6zWW0MbaOOZPM4lZTY1NfOo\n3+m1FZBt+2luj1MzTts1MPzzr7bl4U1YekGllyTTcuqeiOGXDkoPDHUunauv\nev+qWWBH3WSNVdor+VKE1AgeuWMpAxr/BbzYE6trMnc0cbfupSyYDZ3n/WnB\n+PixHgj80MbcfdD6nq9aNqo15LCXaASoHwtsuR9+EcVgxqJR64+ATaa8Aq1M\n0KW8b0oKu7xvwc3xbtzVgzL5TU3IBpkl5/1WD/g5aApCfMVgo4SVA4UJV9Io\nWdaYzuQfgUuKClgjyjXoWhY/QxrItXMHSgWKTgjOvC+zi4ymUyrCrXFFbUKL\nHLxSQohlLNczAc648+GCMPV6beG5S66QD9Tjo9+AlA7SV/tDqFlj+bgs6Q1F\nYlluRBmeNuv/CQg0ck7froasknJHf21zQWAuAgnHPQFvn2qCVXGmrmTvL7a5\nYDPv\r\n=nuU0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-fd48f71-1622793482356_1622793528529_0.06622639838356603","host":"s3://npm-registry-packages"}},"1.1.2-canary-be8acdc-1622793795686":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-be8acdc-1622793795686","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-be8acdc-1622793795686","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e3e0c6484d11a839b56d5ab37c980b1b696e99ad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-be8acdc-1622793795686.tgz","fileCount":7,"integrity":"sha512-sCSflnmIIx1mVn+TESNPeUhXkZrXsCKH6dVWVOpE4cQmw7Qhg/yiNHSqTZ2mVa7QO3rqk30EOmXI9p/mH7wj5g==","signatures":[{"sig":"MEUCIQCQI7rHyYQMkjWiKGhW/1f4VhLwAM/tZNd2TxDRBlFl9wIgRAs3Of623ow2Apea1xgBxSExWXF786bqp6DwkNI8k98=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgud5yCRA9TVsSAnZWagAAhvAP/1RAnqLaE7n5TzcIYJqD\nj9/cSDpNVM/Ja6wgpoluWlWabipkY78/h/jknaXpJHsDZz0ZtkI/iN5mVQmu\nRpapmK5BT3JkRQub7dhnVH/WSKt6/CX8/shHnST4De5joZa62ed6GjMjI0Tq\n1vpEIE02mKwufH/aSM8FQVWF/u3eeknMDubRrTR2LTBibCB2KwW7LdEo0ufR\nxw0XiW8MY5hDIJf2DhWrVp1mIpD1OCGrxzy8K4q/Un6DkxezAbb0fOlaHmRW\nuHBd8VBwtWk7EC5L/Bb1YmBmN06bkECDOAyu/hr2v9fswX3LRIUCxa3fTWCZ\na1WijrVET9G9ZpTcSURx0a65bttcd7hruWhCj8vqJPgva8PVVXRiHYk32aRb\nor6WJWiZ1V0F0XUWH7yOEw539giy6rZWLk/ziyCsIGu5TxQZJQOivne+tpXU\nG1yFJap1/7RqoSrp2cZVDa63+9KyboLK+GGcoOen7YSoItNMH48hfTYgaQ+S\nFu/IYA/qMDo7sqVaZAEO3twZdpgaK3cst+slgnqkAB7llab2ufSo0IoAcVgS\nHvrAb0MtvR1Wlfd/N4HyQ7dOd0i87sBisy8oLahqLb+Fe5VM2w/YLRErPrL6\nKUY2JxIbhRH3lxsNYgHt59Ufs4uB7Iy6DtkfZ1kVpn2lxa6RszkOg+irxATV\n67sw\r\n=jHa1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-be8acdc-1622793795686_1622793842354_0.9568728957249586","host":"s3://npm-registry-packages"}},"1.1.2-canary-be8acdc-1622793794952":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-be8acdc-1622793794952","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-be8acdc-1622793794952","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0230d9b9e960a966023c27b171060768ec4863a0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-be8acdc-1622793794952.tgz","fileCount":7,"integrity":"sha512-LcjacUJOvZIWo8UkVqQgOtqRZEsa4viWKBBH7SVWkk/rzE3gQ0fyiCbg0j9pu/i/dHINrsoAgAQsOafWZBUFew==","signatures":[{"sig":"MEQCIA7HV2RGgPxb57/hP6Nb/BwKSO/TsuscoCsXXX9263IyAiBa/n/VLT++xfsoVz2NDPtRhNGY1oBHxaVdsPXlDx2gSQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgud5+CRA9TVsSAnZWagAAlAIP/iLshamYAvamxUQaI4jA\np9P9jS5u5mObdt1oBRWuz3+wjHNDBcrpG6gAF+L2CGjS9Z61Qx/DRJHCS+dD\ncxyTX3w4YHVE3vzs0fGGPt+yk8bLJt2KBSaxXATGVGHFEAhip5rxrL0mDQyx\nwiyy28LLaXF+f1Exs3OfDdroEnSSU1lpt/fIhNc4poCn661eFjWxZ1/2f0y1\nVo/d23drMAMU9KudQuGB4Lnola3EJpwffbLGMX6ub5xdO6Jq9RE2EwjZ723m\nLjAygphglj1IyOkTJmrJiprv76KPLczmfYy5WJop9LyIzW/P6fM/P+zHhOc0\nFeDuu8SbIvKp4RBU5BmvN7UADOTtv5KfpJ01PgzrH3aSAVtHx8EVGC4+niq6\nuWLjRonhLXW5FhgZAgLF8KhP2ZzWyVKQBOa2JF/jCxOlCLX7RkfLcWZgdMU5\nojzfC849bcf6vJ3e59n9at3/t76CgimQci6P1Kmo3/8OT6MOF6e1omgb/9P0\nYcBtS7KwVv6UI2+kXkqC6/rZfcPAFKx5oVqL8WavNpQ6oXZfr/6wn4jkjHhm\nTZaxwR8sEDtaGbM2UAvz6Fn10l/F3NTLJZ4OuyoydgaJCFI0FrvOTdY5V5Jn\nUCDAz/ORZnqIu2DTVG9uuM4pTD5BpChnAO6ShODj5kuvnSefmKaJK2pqBX4e\nzsUa\r\n=HCXB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-be8acdc-1622793794952_1622793854693_0.34883525406056926","host":"s3://npm-registry-packages"}},"1.1.2-canary-1ef0af5-1622793969534":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-1ef0af5-1622793969534","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-1ef0af5-1622793969534","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5eb404990ec57be210cac9c582f60f4d0d1aa1c8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-1ef0af5-1622793969534.tgz","fileCount":7,"integrity":"sha512-y0TfpUHBsS57sUHDgU4JEk8Jljh5oVuuq8512K9uqBDV314sk9e1/0x8vZE1MkJzQrXo7OcuWn5UR2wDd+UvKQ==","signatures":[{"sig":"MEQCIEH35m0HQffV9A2AQG+W6/GPduFBHRsH6UmFjnfoRndYAiAs6Nxekh4Z2lm8lwvcLXQogR5/zBcVtjoXL+PRxM3FGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgud8mCRA9TVsSAnZWagAAmv8QAJRLolDy9BFqlf3yNHoa\nyGYbzfNO6UYndRQpHI8rVrkt9HS3udmYV6wlhCXvRJJmU3X8IF2GHRD//74d\nV4+fzYEqvmd/K/NIFwrE1NC8pVN84DRDntDU837yjNzvkA3SDJOdI8dVB8jK\nj+y682Ca8m9wtdkItBex0fAJ2uc8mIr2LDmffAa3GHtr4R7SUfSGIXeh0A+A\n9sN9Be5HoKoexr3aJphmyGS6YH8fiWLpBsnHUZXfRtSd/o44dH+bfnGPKuyh\nt6decwP7KpAS/I4oU4nV+S8ouZQdoJoeQidYi/mqYOYJgeCnGFGcT1kNYaPl\n4n/UuypBUqJaR5smKlCXhnrB27VEtm1dX9h7CJT98dUIK1xD9db5XNnUKM8p\nungD6zEr0Ui161arU84cjZw+iNrGJREikph1j1eizdjcJ68551p1G8noBZu+\n0tKzQ5Wyax/Z6GfRRB9q8JmEJ7DA5ssBatww/IN7a+8SueI/tlWBY4gNCsoz\nLN0ao8gxmhpZDdl++E8qVys2o0EP403Sy/ZwNaysM45q3yLkxFnbXK7dpb1z\n3rM3FWxb7gzgRaANW0EhPOeqHUMm1icSjiCOfsTzT8ptngwFm9PDA1Q/thrq\nXDX4Si/mAI2incIFSNIkTqeC02QcmG3y3Jpe0sWLmdDZC8zFXpLfFNfXtfrK\nogtl\r\n=Dviq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-1ef0af5-1622793969534_1622794021916_0.5377313826249086","host":"s3://npm-registry-packages"}},"1.1.2-canary-3dde23e-1622794345872":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3dde23e-1622794345872","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3dde23e-1622794345872","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"88385686d2993a89741e4e75fa94a5958f762adc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3dde23e-1622794345872.tgz","fileCount":7,"integrity":"sha512-Lk50yYD8tOjei+AuAK3iaKXp9iilYVAwqVwR3YAwR6wZMkT3J/YXSBuItwcvenAWpeHAUujJZuYfbAwp/KLEoA==","signatures":[{"sig":"MEQCIHNgz96MHeDBPEaLQ2eBJ8cOCRW8jV7w6ZRiMUACKsVbAiAiyeLWU9hajvfz2/kqtXsQwQrcTKnqA05vkffE/m1psA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgueCfCRA9TVsSAnZWagAA5wMQAKNWzFOnleJzggiQogS2\n4e08RJFARSuel3PPuqD5eBOlhqpxnN72uTZ/LwTwSNvGwi88u0wtELuCwfCY\nl8kTolyNqpkfRhnA+wWZmI9jdSaCs+HnFgC+1c1EJTlZ5EQ6qK5TqLo2Z0FA\nOJZ/pjJ/0TZfgOo5hyFSJGcK+yaKI51A+X5eLgqXg6aRoGY9Pgg02H19ZMZ5\nmVSIZxgT4Nn0rh3cQ31wysvrPkLe4z19rvrnpX7Z5a6Y/jBwJm5U/2UPWtJs\nliehErsQXA4IpXp/YpMGm+o3psC66GjgWhvVrD1RCMciFF5NPiB7s5rgzSoR\nEA7KWr5kydaOBreehUbSJHpESCz32r/63DgUbN5gFs/9lj7u+M66hUeKOesY\nneHyluAIpg9h7an9DWC/poyHCRDsDFBeUwLJbrEBOrXd79DeoCPxMeTQHk2w\n41ctgZHkiKawZpJfGbd/4Oxcp6AchK2Tq8a60QYwLRikqdcSXpVXC8H/3gBk\n6cBas4frSbbaDNXccqXZ5RpSkTpkpbNh/iJ6Aj+xirAzD1iliuyusc8gQL5G\nf0igE76fgFFAfEqpCzQ102A8zvyFhFtN2nMcd5Pbm25xW80iFPKREvVIYoCP\n53dPi97PPFw1djhOh/+cQW+Vc3gYBnhbounHibjCF2oeIJ9IZaUUC9OcDvom\nCWr1\r\n=m6/N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3dde23e-1622794345872_1622794398961_0.6365316224605824","host":"s3://npm-registry-packages"}},"1.1.2-canary-3dde23e-1622794358468":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3dde23e-1622794358468","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3dde23e-1622794358468","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5a9dbe7a0af382e28bade077f5b2022c49aff659","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3dde23e-1622794358468.tgz","fileCount":7,"integrity":"sha512-Y5QEuEwTAmqKly2A/4Q7ieXRhLWiyEbLJSDBxfLY8bUMotp7AtSZxfJYEB5m305lsGuIogkcMSpbL10FLhFV6A==","signatures":[{"sig":"MEUCIA726eFgW6iMTWSI6Fqk4PU9y8NlmMlXw2/gAp70rD4UAiEAin9/hK/KEsxF44am8NGO8sZXjT2soJg8nCeDCnEZMcA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgueCqCRA9TVsSAnZWagAAtPAP/1X3YP1eC39+ffCDdlDi\nj9xOv+K2Zz7T/XKDZisbrNgyluNnF/+G5UWWCMaHb9AbL1PrY5ypdHK1Zypn\n8MX+bCrTJVsDi/2qoTBAwN5OGzjv3mR669mmevuE3nngQ62FQZbrvZDi6wkh\nAnZWYmrLWmIMyOXSuGoxW2q4001HJqxtrRQixauCz2uBku+KmlNQ81ZgPgws\nx5Rzu2tOPfuMZu+rYOmcg6r8xHenTa9qJhZflB2pVuL4mvg1VNynAMrHkJj5\nznFDD1NDlcqsRbPQNFchz1YBqnGn7RrfsERJK7+wAiDCHkp+GkDX7inJU74L\ndqiExev75idhC6EfmSKTc00PHT1INKeJpRT7aEpRBoPAgv+GtyPtGJ2GUnSi\nJhIjmixvjyoOh5M8vI9+T/2xxEfb5a0QeZurxIcwAr8IC6C285etNSSBrcKQ\nzli3lUMv3JlO77dsEkLMog50Ty2rswyF7kaSj6J6gaVad8CDCdJ8yOlagD4q\nw41aZ8CE72Qf9ZneUdulUvS2ePhW8Em+CvSWTHHRZipFlWiL5NWyclx5Vmpm\nzZ0lX/xJS7NI+pN6gE87dvVv30UnlIApTrPCvA0QyG1xR5kVoHHYdXTf4ttQ\nfo6ofRWjCUuUfe4nEcqJ8Wr4Na8Drwb+dBU34+2ZVFMTyVsxgShwJCO6a8PT\nFE/8\r\n=mYnp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3dde23e-1622794358468_1622794410411_0.5136072099343043","host":"s3://npm-registry-packages"}},"1.1.2-canary-96c3822-1622794580892":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-96c3822-1622794580892","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-96c3822-1622794580892","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"988db2742816484bee2284d11fde3a5947d37808","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-96c3822-1622794580892.tgz","fileCount":7,"integrity":"sha512-eKiHT4f/G7oRWGC1ow4DXu74Pzuh0ClunLDaWoHdmATDfZsLjabsLo+gkxpucHh+bK9emZL9UFCcsZRNZkM9mw==","signatures":[{"sig":"MEYCIQCye7OopuOmDlJPryWdHPjAZi1AFtdlPo1xq8i0aKG4rAIhAKEljTHVwmPAgnh1c7DPcComm0kDmuyEEQo+nkFS5l3N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgueGBCRA9TVsSAnZWagAAPL8P/jbDdCwctoorC/AJTyTh\nuEB55zuesrEDkif6VzXMynv/5wSkPCSTckgvwpIzI/u0SAwwgUq/gZEy+3F0\nCgV53Wbwxu11/jiEDEwE7y7r+7axSSKZPbt1jNRlZhU8J9YQc7yJ1rrZjuEI\nsrlPMZdHna2cKsNtDyl/Bo3zr8Yqgs8kuaiXC9ofKg+Kp121/VRE0mSr0UU0\nA8ad452F9Epc64uAWpO9OySEnSGSUgMQ39Ny9b5jWD+3taKELLXD6bheLEDz\nvSp9mfcKcHohIeyYv16tIJzjwQG3/AxrBDy1xrwX2quYAnNshQNtjTDVWECp\np7RoEMZKdNUJAptXuoHcL5w4C09jo3iQTeukemeGRLDfEmpDHyzXFNMtmGti\nJHnbA52n+xGUGZizK9vGN6E5lhl9EnDMquIUBTzVGbOU4r/8F3E65qyJYzex\nTx3lyAAclIYQ4IeNWGDo0q+hw+qx6Cbyb0V/+46Rwt5bAb+acyxJxykDKBWw\n5XOV9FQgRUu+JqVS4X00RyemMenprGw0gqBWO1Fwqu+/1KpSMfAEYbV/OgoK\ntpFvQnYqiwDr9u6932ur910hJN2eo6mFNnjvA4ZJ/TEcuNy2F1pa0HelVCWg\nMQfXNKjuaCNSRgRCzYqkVovn4tWI4U3qBX+qGK4XzXTeqxlhmaIQfyxoLzWA\n1kuy\r\n=WHxQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-96c3822-1622794580892_1622794625335_0.11090933309215711","host":"s3://npm-registry-packages"}},"1.1.2-canary-14c1474-1623031483764":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-14c1474-1623031483764","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-14c1474-1623031483764","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"69fac28630a417c7775f03be87d0d37b4373559e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-14c1474-1623031483764.tgz","fileCount":7,"integrity":"sha512-Z83NEkWaGOatSoYwGSz1+UbWdNtlI1tAZDyJn7Q1Zt223t9C9EfS6qk3gUjfGHJttc68eQp9jT2T9VZhTX3cKQ==","signatures":[{"sig":"MEUCIQDQyFcvl00LiUFkbyojBg7FU4f3gyc5TK/+ppzeD4KWyAIgeXHema9fvdYNBYwZj1M9x0LDu+Ri/nRxww4ubixozz8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvX8GCRA9TVsSAnZWagAAXwcQAIeML2lNAddUYbxT1Xqx\nON8qIdecp6WDjyPO4PgdJ4FfKuTLeVxD/leJD3A25R3Bj4/gcTdbd+aFMGFD\nN+13WJjcWwJNHS54usYTXvupi2SMgh6jeOG7MpDhcn45vcCRGqgvmwOr5SeC\nIlE/DXCJqrXZsVWhyz76qA4Z88+G8iJoLvBgSILNbWnw2d1hXiy0ql1CHFOu\nce1/K+7FBOyRBsWh2xtvTj1vtcIPqFa3QIFbnLfOB2YOitLm47CNGU6LzEui\ntnypopVXMjKv1zwis/bCRuAI3z6uK/mfRI5iDd97Ct7xrVVTD0+kRQfqG+98\nw12sacXzzYaRcji20Qic1n/2ouJ92XV0rHg9tnzmGpXXtp0S74i5Q3r451qY\n5hrdFWlqq4L1+fBWNpB5o3fJHTYi7VYr1XzFnwbdjPsO/HZ86ZEQH29FSJ1t\n/1fuHdz3Syg23FfAJxMuPQxVHGF1LKtU5U/Hm9Vx3TQ7WaO6rIpRDCz3Un+O\ntWq3mBeWLypHbD2zqSL9uC7D/WnJBSa41UGbrvd11xq7/NrQo2SufCjxOIrV\ncQX1bE6xbjchl2j5O5BMnUQ51r+UpIv1CFLaqj1lWTYtNx0FFV09tNQBVDRx\n99AAXqh7D4fGuNC6nHv7ZgRQcAhqekw9Lglpx4L4HgpfDrTmouM5A+DUNzPa\n2tD9\r\n=YrDT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-14c1474-1623031483764_1623031558848_0.1460122513694515","host":"s3://npm-registry-packages"}},"1.1.2-canary-14c1474-1623031484989":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-14c1474-1623031484989","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-14c1474-1623031484989","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7b1d0736ae4a2bad1cf0c54681ca76f2ab555dfc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-14c1474-1623031484989.tgz","fileCount":7,"integrity":"sha512-blBDQgg3C5RC7OhmOurSUisPpfVu5/M7gg6Sp+sMJKf4HMwwMD9yn+rHXP7KLFcuctQpbLm9PRXtADX/5mZ4LA==","signatures":[{"sig":"MEUCIQDbRRlmWBhGOjGU5rUErE4kHczYGOeQqN+3wkArkpBmnQIgVQqyqHEKCcTnTCVEmomKVonnVwvYNLlcH8KlamOQJZg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvX8MCRA9TVsSAnZWagAAdNUP/1BguUevzU0G0WXRxWyh\nKsu3lNimUKYidxN0mz9RMFkpnaagqUsenT40wmAaRsp9iI0WXNkHO1qt7Vz1\nNEuiML1jOX8cRI047iECpmP8UOFCeWN2HLnUVLHSMaKuD/A/qNf4VddXn5DN\nHTcepbbiVkGAm/GY6GmzMJEOXbuVLYIQGNXAEQ41UyCLPZZ9cWcg98bex+ov\n2WPvCs7nACNFVlGtWpwbiR0vnwBgHEqkDbxB0w6gQ9VnqrKch7wtnu4Ua+sQ\n3aMCKo1ilr0SGKqB0T2LXvo3ovLIIyvXjop7vfYwaiXtsEWfHOXXyxf1PdXL\nQIdmCFoAmCh80QN1ggF1ximJTcEohDffDEGMLHp4UGiyuiVBXTcpOK8v+6Kz\n4SiKWeufMviqHVoRvGmj8o3Rh3qt7eefcAyhpgGb103qVOgh7chobTPDNqU6\nIyo9JRMNeudign3pkBLtzzXIlZaQL40fWSIb2pXVZtAn/F1pIwWpvtBLXCiB\nSYgP6+RvjTnjmHfnvGAOMx1R0wDv49iXs8Rn5dB/xEVGJ+2EspmNMb85Z/Jo\nZrGzg7SuRRFLx9YLYQVYf4oYYPzwhLdcstFOQL1fKbU4PQnBS8dlbjBEnDMQ\nxBN8RenSjxfM6HWRhNYV7n1x5OccS9YDJfgy9T3O98QK/la0XhiOR1DI77Bw\nmf8h\r\n=0yeY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-14c1474-1623031484989_1623031564673_0.7851494226745903","host":"s3://npm-registry-packages"}},"1.1.2-canary-14c1474-1623031516094":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-14c1474-1623031516094","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-14c1474-1623031516094","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a97263179b916a70439ad4f0942c1c8ac58dbed4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-14c1474-1623031516094.tgz","fileCount":7,"integrity":"sha512-2MgQNeVplZOb5xIlyoyqu5rnwcmLlC3J6FRHgXHPu5888MUL+NQADUdy4B6bCgsVkDfmNVnI3SZqhIIo4PLPGw==","signatures":[{"sig":"MEUCIHGE5RASfoeYXl0BZjTSnE/LopkEExmcqqdBBvPd6bnAAiEAuKD4XevWYjMwhBru388NQ91a2IfD+E4Q0P0ATE6Krzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvX8YCRA9TVsSAnZWagAABIcP/iLEIQzh79QFtk+m1mpT\nWU3oJ416N9IdC4lZXUCP+gQG6aPybnYi+wJDymbF9Z68TYsg3A1yrlmo6EQ/\n/luiJrluFnuUn+2QKgl4KIfeyH7asaj/j6GqFHkrjxGKZPwp+yU9KRBdv9xm\nAfuzMx+CYoea5VUe+2TjHKsaF7gS6G1XUq7gQ3Dw2Us4pG9QVizE+W20tz8m\n9vYLel2J3jj/spfyFTD0yLH5Cwv5eR/geYupgioNIdBciTgFSQx/KSPLeZth\nKPvV0b8S0ZpDLEXO/POPm5tETJEIFUuXLnQHIaXiAKIKqaPZOw0CCwR/plh+\n0ls73KS19VRk6qlLoVAsQS6Aj5KXfBzYhEE1IkuqvzFkpkolx68cAd5k07BL\nEVQ+q4+sGJJ1T3FK68eqWqMVEja0VVsJuQBBX/zwASFw1HE8x9bKCosYh3cn\nfbwVo3k4awq1VCXR6JLOagSTVUYwDgZu18nLUCSPHjgEZYKeB+TlRnyXNws6\nR6FEx7s6xghIBvs/M5I8/iLLhH6gjZFpTEYQN/1qmAYSE3cY/L3ZRJyHphOo\nVQhNlmbOu/9un6QtxXP4lj2oNyZUuAQQVCKJSobaOpiIgKMvnDg6iID3WmWX\nJn+C13gqkzLIPbBPlMgsV3rDa7adHZZE21eOq1VTmrbyhcQeuyrZxQ9vHii7\nDz/z\r\n=KOxt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-14c1474-1623031516094_1623031576669_0.008218650101398106","host":"s3://npm-registry-packages"}},"1.1.2-canary-14c1474-1623031545642":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-14c1474-1623031545642","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-14c1474-1623031545642","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"25acb2120cd136d5102cdd3f58ecbb0d9816cbbf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-14c1474-1623031545642.tgz","fileCount":7,"integrity":"sha512-b8QECQvddTQ7Stt293NJaMVLTmIJuTixVSmLBDU9G4gLmR9pvf1iH1Hb0g1zDJ8yz+3uG9CsaflVdWmLOIx0cg==","signatures":[{"sig":"MEQCICNiJtP2T0Zd6iRIAUViumqn5mmHlnYxPtzsxEpG9OuLAiBmRsLpEwCLDKLyFppLDZOnwypL4CItnv6FwiONN2OLVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvX8pCRA9TVsSAnZWagAA46wP/2tpkozqdorxyd+wLwLi\ny3fNMwRIkuTOYk75taCIgm2vVgVKNycG2ScSjsNk7Xsk9MF3Eh7pU5Nsduhq\neC8K6DQA35e+OctZmSf4r1qYVTBewCM89YEGGRXq8dBA5NnPth6NtamMMuhR\ngnYt5xLzC4iNBPB2KJOteUniRPtHcHBMA3yRAsF2zYxyJP1HEFQb/z3nHaws\nUHWoBw/eINLthQ8SyoXzJERsv4UkF/Z3yFBFinnrTKAfou9UkyCZisSfj7AC\nFA32M1hR1STAw5GAy7iVIRalxEuEUGAZoCXt/xrHlMYMio3jhPKZmMubzxmJ\nE+oQk1idcV/k/vCsD/p2HEF+VwD9V0jXA88JwVuzRlCvjSMN3igKH3q7fiTk\nX6a6P2z3IwKyxN1qh7111KL3hbuQhwARZfeRsxK+OWyGE/l7OMwvw7f+OSBJ\nX/cxn9CDDijsBAJZqrqyzsW3XvhZj+EkfET46FrgP46XAuorsKMxH7Yrb9hb\nyDPo/WMyrWn+c1ZaqjEBv9jL/wD5G04pyE18lgRToOFmhA6M3K0GnF/Oh+Jb\nr+fx428kEEV3a/p5PUmGpIfi90F8OFvRS3b7BP89yb2nreu0LDCKr2VUiqwO\noukVEit+kB2K6iv45AJslqStGXCTD8Ef/pq9dR5P5e8Cr39OJ/kgT7AupZbt\nnyBb\r\n=GGvZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-14c1474-1623031545642_1623031593575_0.987991453756415","host":"s3://npm-registry-packages"}},"1.1.2-canary-15a216a-1623055422549":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-15a216a-1623055422549","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-15a216a-1623055422549","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e88720140a9b615dc91322776cfc09d93c196d7d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-15a216a-1623055422549.tgz","fileCount":7,"integrity":"sha512-HhjEGOQX+n6853QJ/lqh85LUDqzR/CHNL8vZjIq6hj0oUs63tktWQtQqPE+XtRDRDwv7NcOzGKDT54Bczptaug==","signatures":[{"sig":"MEUCIFqRTmVu3uQm3m/H3b28c7CFO5LdDZz43mzO2C1NhVoJAiEA4aLGViFd1qoIwNstRL0Ush+O4QIAFWXbjuAm5jm7jj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvdyUCRA9TVsSAnZWagAAETEQAJS07ZUh/wwm3Ogna/7g\npQkcoxKd9/znUIIVGtjT7cQrv3ccYm16tzBsFIlHd4QI1WuBcT8mLUDMeL87\nWzmraEBGwNe7Pw5JYBA6IHMlAgfwszDk8AavkCaosHnn8JB24YGjUhc3kcQm\n/+QrsNuVTWdBMGXbqGHf/OS7Zy0rM7HP/7GCeYAtfwc699fmUtxyCStynUBg\nlEItFfPilm8cgu4Bo3dR1iHRnSq7ud14Gz062gY+Ib4jRUGZ2KPs4dL1rUJZ\npPz96NRo18AJmsQe2P283+6VUSJ2mzPtzY/t94DN/jMSjZeJTzoDWh9Ucrv0\ngf5qqhlsJEnaRWUgEa/Z+uBtlPfHZb5Rhc9JRqUJQzY9hyOXUsSj9NFhnqU6\nRJ7L5etETMRViIIbliRrHI0QM6RbiyS01n/KqFKkrxaBOBzp/i1PdQf/GyhW\nuiKbbPWwiddYeJLjY/w7NLQ7YSnEvJ/ORCeP3WG8i0Nj1Bklzbdk5TwYQcMY\noNIh3MXM9Au5YHOiOJKi3H/L/tvmWxCHhgmbnqEt4+9XCArmyQjEL6Y45YTR\nliK24IN56h7ie5fqBFWIioVhMxJbqVJrl45R3hkmo4vsU6U7jhY3Pslt9nhS\nmCp1gAahRKsWWxirZHWYQGPljMtDul8+W9FrQP+DN2a29tuBNuD8hQM5yzjf\n9m8t\r\n=r0pt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-15a216a-1623055422549_1623055507891_0.33657252095935","host":"s3://npm-registry-packages"}},"1.1.2-canary-15a216a-1623055539074":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-15a216a-1623055539074","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-15a216a-1623055539074","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"da12b61f0ca88f10bdbc4b668017bc95f14ba28b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-15a216a-1623055539074.tgz","fileCount":7,"integrity":"sha512-a8kIWjgBJ3jwtXnJcuodSL5egaAr2nuDY3LNCBspqau1tiZTSUfG8b5vaHfm381PghZ4WLCbT9Rkb8GJykpCcA==","signatures":[{"sig":"MEUCIQD5VPUcgRR87toy/ETEccdExbDpwDseNrrZmwwM0sk78wIgQfzRG4/v9WEbArKRAJQ1aD6+ZIHfD9b1ENkJFNZeCV8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvdzjCRA9TVsSAnZWagAACW8QAIa0kmXalhsswg36bCsx\nDxoa4oYwxSygBbvzHGkiGvrVevuqQbtVkjhwlx7FjU/DLSCk2u1T3VDJPF0h\nL3IcXi+D/02KzrGnS79H1snaWttzz0lQBXmq+A6TzmagmcZqmiVEp53JcMOm\nIXJRXRpst+ogxv2u2GFk6x3P/m2wSo9xQgaT7b6LZhblTdwaQfioBf7rLird\nYY5g3Ipu0rhllaSkevYjf4B99R63b0skNjcKgWV4lIgz/p3mNbeKDdGTiL4p\n+9LR5qgIBYKFFo/4MqYDIjRAHK3DEAANTffpn6gHb2q5aGNxk1whHMWkCnGG\nn7ryXTJ7GbNNHfPyeN+Z1GS230csWM43/QJKcWRBlrdQLJeq4CtqcsVuEPLg\nfAZ3E8i32tw1hFTVnov4BeLBCkV/yAkBszTtGjzj75ekWKdaqPfkHvm5b5+D\nMW01V7PIoV1dBpEvUAgzuNnWGRqeamOqh9zMJMWQhp5cKaWPa3tW3t7ZIcmg\nsP2Z3jV7WmCcEkA6zLoAkReNAuP1S98W3/8Nk0yO7Elly/1Gmv5b8thrnq+0\nK9+ZEovU1OGBCB2cmRrbS337FY4MLxv3AMROacnCcfZPGpxmoQqF0CfIVOzp\npP2qhc71DCmAZSqFb58j3Qz9ys8+NyNpmiHCSv9bxAoBPVcft9Se+ijLEFTx\n2ic9\r\n=PbjN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-15a216a-1623055539074_1623055586938_0.5230531948398285","host":"s3://npm-registry-packages"}},"1.1.2-canary-15a216a-1623055647477":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-15a216a-1623055647477","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-15a216a-1623055647477","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"51634b34e4cad7a9d36c436ae4738206a79334f4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-15a216a-1623055647477.tgz","fileCount":7,"integrity":"sha512-12SNKsEIcw2TojThGA2xC+b/KfqZgu3PV8inPjPeJpisw1SAeY4a0hU0Y3wDnwtaFZJXPqw3vlSqdQgN8ZgO4g==","signatures":[{"sig":"MEUCIHMqvG0yLO9ylxok89ZSFhLuF9J8Fb2A3AEkh9mEe/A2AiEA4J5aeS04XvjgQWxffEOUt2m4DazRtc4yfzTWzjV1WQ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvd1aCRA9TVsSAnZWagAA1g8P/Rujvl0ixHbWyTyZMnAa\nKS8MWdAQEbyaoamH/RAWT5sX+Vik3hW0R4OG1sa19Ja8CPCeDqeTub0EyBsa\nupBubRbYMdtyFIPHY4iWQrGaFH+n/DD0mo2jY7kfBN++Xx7E22j8xoQQuJra\nDzf72YK9Qf1bOQEvOE6cUEnY2HArzt4v8M+GmtpL0UPPOWfwvLKHmpZjiRv9\nTJGoL2Xkc+WNM0uJg4BpG+diurarnycwtMwpix7TkoSmQinGWNewHrES9ASy\ndH3+kQLsq+7JI1Jd2CoTQjdkjmHppF1RovxeJq+FwvDAhqMcRtxrVDmFeK78\nnJb5wkcNhwxqOejPpX1+mIEJNGOE/NjzcRcfuW+DyhgIzDjHjO2/q7yXl1/+\nNd68J0OlqrydfgeTWUqI7UuuA84Of933LF8HKwOIEOLOORw4G1JiPyg4KFtE\nkiKsfK1F1rDfn0bCC8yOPQHKfGBULMbUxFHX87+iG43DUAIWT8ajTGcJhI2N\ntV+zbYrT23i8UuP6FVl3vsJGEttxzGkO2kWqnWBOsiktXqOZN4h9Ibsp88Zi\nVYGA2RQjU8yLw3xVC3mzah8KiAfX3Q0Ph3SCH4btbq8k8Po84Sh7kdgYAqfP\nJhfQsSl2lESBtS/kEBmtH74ZhqYmsWk8oGtveLrgbvwgAVnVq8NWJ+QCgc2L\niVbC\r\n=OgKo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-15a216a-1623055647477_1623055706247_0.42388793240517697","host":"s3://npm-registry-packages"}},"1.1.2-canary-f70971b-1623055777703":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f70971b-1623055777703","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f70971b-1623055777703","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"09fd1908d796b877ceb8981f6582b7e498dd5c32","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f70971b-1623055777703.tgz","fileCount":7,"integrity":"sha512-arKPgMA60/AJHt4/OBBI0IWogrz0e3njC/JDOUE/8jc85AQUMFrHFieOzx6c+fxowZgqv67yKm7hsbaf8SU3tA==","signatures":[{"sig":"MEUCIHuaDOZx08fHsobTbEI9hnCfBLfT90XXrg1bqR6AEaKNAiEA4M4CQTSNk1Q11hRsC03ktosYOonuYEkt/RnnUKOCt74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvd3oCRA9TVsSAnZWagAAwmsP/39v5zXdA43S6GqaBk6Y\nTgC4CdkOoF9ehlMoccYvEc+noXCoCerMSlkPGlhGahmA91q7v9SHO2ZI0yw9\nX/8hUJ6wnb9OajkzARLkENwRluf97BLAg5AIB9Mjs5QAs+9Y8R+30Kpeqiqe\n+UxRD41khYaEqo/4Xoa1WRkmNyTp48A/A4BWpJhvmfWpmcu1ogSrXTViG5I5\n5kwWdyEOx2D7LCnpnbycsVwybk1EHPMNmPWyar6354HcFv51y/pZ3+yHxOaq\np0yX55jtAUorZGHdJSOjiaE0K0dWvgyZUgFDlP/j6tefKMDZ68ZlcHAGCwll\nSHpujOa4Ozp+H32QqI0kn5dfdS8GdLM1MEoLIIQ+3fCmo2C6/g0edp0gWJ31\nLrcaE65v7bbrqVr4npOANj9KC39xdiN6e3ZJNej5ziHHur1D2OI52Y4zjZsR\n1nMuSd2bFlSq/GE1wmspA9aIUKsTRZt2g4e8yMPtvtcYOE5fo6uRcvQ0sMML\nzaPSpJQ7YyqHgz153ZchPukpEvIC/DDX3fk3BF4tOoXRH70nGmEdO6ShdYIe\n3lKfNLSdewl6ZXi111qF4JcTwvAcRlwxBEoxyCmXvZZVRlYLvB16QwdN3xt/\n39oBmisflOSqtmD9s9XEX6kSSlTC1QdQ1glLIaX3/VQvO3fNam+PTLYUmajZ\nGdcl\r\n=tGXB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f70971b-1623055777703_1623055847924_0.08563889681060455","host":"s3://npm-registry-packages"}},"1.1.2-canary-f70971b-1623055782417":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f70971b-1623055782417","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f70971b-1623055782417","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"156b33ecfd04dfc4dafae437f1b0c925c7257e54","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f70971b-1623055782417.tgz","fileCount":7,"integrity":"sha512-LVmpWfrQYQnmSpbuviel2xJUkVi0MUNyOKELyKi7FVnbrudVlqXArGH8QRiRC7xajdStDrllzPkHQkDqYUiWbg==","signatures":[{"sig":"MEQCIARDyDtEwjjkcPPIHNKhszb+iOZHKg+bbWIJWblY8cPMAiAXEfaDkFDugJ0DIHtR3yCcW4ee6PUup6ARsM7BvEM9Ag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvd3wCRA9TVsSAnZWagAADqEQAJPtsLJqV7BUvmVfVita\nyOnp3j8MWi0tUGJJ0N9d27AFdFR6nV8m32jL8gDdaDGqMx7KV/QMVnB266E4\nySMx0Yq0pMizKKdCJQa3j/lSi4YGAv43w1NXmThPmvl9pL7+mD747G0T2XB7\n+iKmD3AzbBubHzrxw9hCLp/Fr+bi8sSTSgxRCWgmW85D3FQVKLwA1opxmurl\n3k815BsI3Olvk6422cWoJWEa7zq+hjf3i3RYzUcdduacIJ4JETk0dgJc97nl\ndV+ZnvfdXIZd8DA+S4FQd3Vlur/H2hBptfKBTIBvEvQj+Uwvhh8FeRnMOBW8\naA+UjKzkzH8VKp0alE8OXnJj0R8gTz4pDzdCnj0P15QH4WQepWU6HyisVdOq\nikQQxZcj/0yyKxhOjaiDYVT9wuws8p0FImP0j3QYCkOI68LXRhETio7b8ZKf\nUjUXo0DVwTtaANRb7E9Lwx8xGrYOKgVuYzWaITNK3+oRnrDxsW6bflwo4VZJ\ntJyQdTbuSiwYHKiv6bunT1pXFpA7/oCFNWLBZwIbunkrZIIUqqJj5ozMjH+Q\nrOxmAyqP3r5LVZkXFTZav/ALJT0eSBsBx8wqLW42ybpFlVyLk/pfY/apkCdT\ngg6QrubCxDnKQVlmo5hKbVhGM57n+gXLvjfxRqcB61BDNfl9rGdMFZB2Lc8t\n+/Us\r\n=5l9J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f70971b-1623055782417_1623055856532_0.6542029070191091","host":"s3://npm-registry-packages"}},"1.1.2-canary-f70971b-1623055806010":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f70971b-1623055806010","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f70971b-1623055806010","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f1a26a4f6568407b41e078b37874826bf2633cb6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f70971b-1623055806010.tgz","fileCount":7,"integrity":"sha512-WZC/dTvSvMctZJH9rOP/p01eJGdVPXrFYjEIeK2Rdo5jfJrspOsJjql4rmxzorc3Nrqp52TGAoddhZMSEAIS7A==","signatures":[{"sig":"MEUCIFBk1fXJd8pBtJ/npsHtAeKkM+gwsV8EI6T3ofmjeO14AiEAm+tHyVDUeInobX9ZjgQXJFdNp/QAUiuMkXkyXme+B44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvd38CRA9TVsSAnZWagAAikIP/jWMCCefAfhX5jcZJ4T5\nxheOWXxYAHCfeGOWV7T8m+2OzXIFPX69H6x8TxRpwVGtN2m/ZSu8zKxgqX7F\nzUeu7DGgtpkj3uGDUE7/zV7iqyplox8PCGW79UtmHkyeHQ9zX4Gg5TfiQ8sY\nit/jaOyU6RMHWMCzOis7bJ6nCZtck1+xSqa4lw4csdmdd1whRVyEi2qxGWxY\nllqis0rWgdBvuSH970saPLVDBAjkj6FbDSfYO19t6zjABaiELREJ2JRbRftA\nU17rUJ4fkFaLCyZ6bonAL6PCqnsHZ544HoBWJHQElZ31rtIHDG23AQX/Ts7s\npnbI8YATVGYBtG5aWarqq1ng9FTZzvRPO8LBpZUtMaF15D8JtxygdnmcC6kT\n3BepepZhUla039tznAVevizyIZ7XWKiudtYVKr9ys3ywNYLS5vx9CUM6EflZ\n9EqBluVXqjsJlvfiIt8s+PcWvpmxsc/MNBBCSQZS5WqfYDSC7eOLoENZz0cr\nq4fRF+Z17yiP5ignCE8PJ+4+pnvr8VNxAo1sz4L3zuLve3UOqldlmjiSlJX1\nQuIlcaVzR0jpOIXYlsMkfNjVuiZ421B2csnQSjU/R0RZogvbwgSlv9D/p3fT\ncmdu5uryLHpgw7WctDo+V3ml7yV9Zp4mhTVTpGVeHeg0LVsPOTU8ctbx3e2N\nkPzS\r\n=CLVa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f70971b-1623055806010_1623055868543_0.148758079477588","host":"s3://npm-registry-packages"}},"1.1.2-canary-f06a303-1623056807006":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f06a303-1623056807006","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f06a303-1623056807006","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"62af5061fcd770b5eb95ecf154fa39694a4269cd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f06a303-1623056807006.tgz","fileCount":7,"integrity":"sha512-yk2gU2hzAhPAHnC9+cY1L8bIs4JOcZ5uIIzHio/cwH+kVlUD+Mj0Bzj73dS3tiGHarAH5ExZR+sP7FXtsTOLLQ==","signatures":[{"sig":"MEQCIHXc44yIr/OHcbCIK9btvB9LxDAaYa14D6xTnEGDMWa4AiA3CnVYVsNyM6aLnmgL/W0NWgpARSVDZay/Z49z6iCuGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgveHuCRA9TVsSAnZWagAADtoP/idoy4MIhdaOl/Mlo009\n7Gr+3D8A+L8l4k19JWFWZapSZkZ0mxeeNAxE8SaH7nu20lMzx1Yxyfysz2OY\nRVbF9iwRY17nxiIaI287CcnwNTxDAOesPgmk04ilEyauXsxbpQYMoOtEpYgz\nG2A8fpN8lxK+jq9bhyIqkNkDEf+k5nWrVpU9dK1YfCrZi3aYeXUzIvvnnbEY\nO0G6Cgl4OYoDbNfMMBca4drL43GrGOfRBquF8Hp1lU94dDbyL4orP9zCxKni\neF7gjbpJ0/Xr0NshekXqR9fg6fL0Dkxs45VTuVkK3itzRe7M72DEzjekY94S\nobT441Cv/P+lb8VajaVggTu7VFRoDDeOZM/pGgBsyQPai56OcFoa8Vy5D4Af\nnKUgp4ynv/wyEf3DLj2lKzxV6VfeSjaD4gz+/ECgyHHYB6ClyybgFqOHVSs8\nC2a2NUhLMTcfuOk8SP8s/Vfr1uyEYmt6X/oQKjyOzZJgEi1VHWZIH4gM4xSn\n72fvWuGWUtM/K9cDgWPZU5xnsSF4bqpsaJ5ihBjvYNYUpD7eeUknJamlhvNR\nWnbSc4pAUtlRBJ9M4mu+C+g2a02x5NhcTxZn8cdF8lxzl0sm4w68f3ZbNzAQ\nicFEYmw1+z8E5R2Bz+G3d9M317sdu1XAXsjztTiBVY6uOWsx7qOGDXhMNmM+\nojSh\r\n=EVOo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f06a303-1623056807006_1623056878578_0.9485644010457803","host":"s3://npm-registry-packages"}},"1.1.2-canary-f06a303-1623056806394":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f06a303-1623056806394","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f06a303-1623056806394","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b4a4395fdb86be4a2ec1a70a9f96eb270478c944","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f06a303-1623056806394.tgz","fileCount":7,"integrity":"sha512-ZEwMQ5MZi74ErkCwGHayIWzDyeXJk23eKfhh+XEhrQGBzeB5pIHi68psVSzrRpWh7NtZWYc2DNWdyVL3M8M+qw==","signatures":[{"sig":"MEUCIQDkyk3WzdJ+mwryx9uDYPTNp2aTzlIkgGrAp683EkINcgIgaVehWSg1ePDcxCFnep1Z+/zA7Gm6YibrFFMHxCVbg5o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgveICCRA9TVsSAnZWagAAJkgP/16Ay7hWfMCc5naWTFrl\nNU0EWXxeQLcuItJlOKvEPQA7+AAappyg4hAkPo1lfoHxJNN88Eerhu6ccwmB\nIa8tslgjzVSJpPV5IL3aIRCTDfBNOcuIn4lQNFhePD3qnLZWOROGNJug8ixa\n8rDTGf8t2iAm9dQcOxPTL5Mszw/BurFzQ1qn8nJlWK3Xe3l7wni2/B8AVu+z\nCngoSDHU/vMU9mK/N0M4lsPWMaAY/l5yiAfZyxgB/x0nx91EMddi2vvCBVLg\nhSUiKWBz2zRHfSJi1FTRnWDX8reFRP6hrOPUUAkNoMkpZuIqK2XsZVp3jUpK\nfP3DWp5b8XGFuzA9X9XeCvPAOEcqvpr05Y0M14p8TCxiqQbmtudAkZ9HEq6o\nrDSu/+lAWqXfFeFWaP4eBY5VG6c645tXqP6L8Wxk0NDyUdv2qwD6BzT2WC2C\n6LRzjHEUcgj5ih3oRNgn5+tXrMGLqJejsQnbZxFlynjRNlp5j8xoNPBoHUsX\nxWMyb/iyaj/TCmsabqY1bxAIswEJXKcXhq0uDr3qaPAoMoDvAi0LKDCG2qig\na7/sV5tXENZ6RqwaKBVvsuV4Rt9yOqOTc5IbIzaPG6v3gBU2tjB1V6MJFNxX\npVKvXx0199IaRrdbE67ytG5FywXQILyntdEVmG6dA+jmJweh++RPzudVhYrB\nAFed\r\n=0iSp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f06a303-1623056806394_1623056897946_0.7408146451769708","host":"s3://npm-registry-packages"}},"1.1.2-canary-f06a303-1623056875157":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f06a303-1623056875157","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f06a303-1623056875157","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"04200ee89444dcde848a0f81b1fc2a2062fd9a51","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f06a303-1623056875157.tgz","fileCount":7,"integrity":"sha512-Q7zrP5Wp3rXvBrLLtM8iyyKHVPVXyGEUiSsJSfcdIYNdPIkoWazEvG+/LtVnZl5RwxnjEzcl6NwxXObtxLqYeA==","signatures":[{"sig":"MEYCIQDAUWcR81U8LBPb2OhTLsPwnwoRXRynISOuANxwrCs7SwIhAOCMDmdYA6OW47Zna8Q/90C/lzkLOhCdMkHeHNSoxA32","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgveIiCRA9TVsSAnZWagAARVUP/iJsjA0JDpcvaNLJOt5s\n7KSWQQUofOufCiWP6d0dJfJ6UQf9xmeAPbUcfklZdx9K2nnUBwefc3eh1OsT\nuUjJRKUjbxtzmE6s86WqCyXZINOEI9L0W2kE9jXhXA9UpXWf2TYgxVAdk0c9\ntPD38jPnVhP9LV88bIihym2poW8awGs11hXEta+1xvlAbQOeq0zzhd9/oMoh\nVAvisWAAHUGgFERi4LjA4B0Qw6sj+x0Anjw1cg4Pe6FnM8PcZP1qaH0lO3dW\n3fJzpa2vN4+T1TNO4+BKFLJKy1TXNTsS0f8Dipi/kCRCnXOySPoaSAZg1Sfe\nq33off724FRmXgiy3LM80avUB+V4Z030f4SSvsoWKajUjVCZBfWGArQYbaA+\nLXJQaCJTR9Qonqw7dfeyMwU/oEKyg/9QKKOujun0C95AuvFlojzCQsWofUPI\nAcUuLtwdtUMzHnbTMG5HbOXDEQtmIrVTdxgyWuQ8G/dvHpHNuOLKOjXIE/Uw\n65lidOB4ah09BK2M1mnwWHM1UiZUvFxfDwq/BBjRni9FOniAspmMqzJxl2TG\nhfeNEQBPZL7np65j11Pbj4u4fIrB7tQnzhGCdZotJllwuw9AvQA1IjqfAO5e\nw6Pm8RuMX/uqL8OBoDDU8rzKxs7XBIIbEKoF+i3kPO2W5dfEwXrCKH6/7Iiw\n2acB\r\n=gAx5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f06a303-1623056875157_1623056930341_0.35628882286855923","host":"s3://npm-registry-packages"}},"1.1.2-canary-302413a-1623056975308":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-302413a-1623056975308","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-302413a-1623056975308","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c47abd2aceb8b5e4888bf40164d96fdd3571a2dc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-302413a-1623056975308.tgz","fileCount":7,"integrity":"sha512-iMV84sul/Sft77HXUz6zbNg+DgyaWOFM7czuiHJ/ED1S00RhqOTzQvGnuTvsU5Dxz7fFImmCcIaGF878B7juQA==","signatures":[{"sig":"MEUCIFXprItbUALcLVdDHeTbE1qtC9ehiqysb1y2QAlmJOBHAiEA4jGTJu3yZLsZPmeXDQzk8dSCxgbmh7UANuSzF2Al3zU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgveKCCRA9TVsSAnZWagAAEbkP/2mIgOL0saODBxGMn7vA\n36BZa/1d7BZdylt9YZKVll2TDykujMwhdt/fmZD1GUQQE5g+TyIJZ5r2HJEm\nZJzJjumZCKsugyAvxpzOUEvnGtoppGDCJjGBNmzqUSOLqqRzok5uRamK03jL\nH4MCO/pwNI/B5KX1C5Uuk+6xZsFIazkTNo5xZcyRCcmRKsk5iWyQuGlmzMim\nLd+55dTX9ZDThHt3YLgRSK3unrfTpeCEDTHutMHan+xd9qvn8sdFnH4CnBsF\n7L0qsdJMBXn0x1sNQprqcmndMFXmO7QtIzHtK521HugH9ZpEovupv3sy3MqG\nNvdqPbuIcJGjf6w2K75mGcEsmXd5A3tOxBDZ1CBFyuccxFBlplo+SFqFqMSx\nMCTJnbdSgBlg9g3PoiR/I5gG06u7ANXXCP/W+Pq6bli+bv9xWoA3hDPL7rf2\nnyud65uMKRJ9wgf3pSSJ/2jz9fCP658UVw8hTlGb/Gt//Zfp+vLa37A70pFW\n/X+5vQzGQpOr0f30DDN3f+1A5/LqP7BNuvUbQRzeoQTIhRjtav0pK+5Pzhea\nk27vcdolaottfoe7BmLg85wmc/Lhv7bCiTV2chgmsY21M0vBTktxKgjx4dku\nHbZRKcihes8h0BZheKa6wOTvGhe7/XXbJheEaT/LP8j73CMsz8DMsNcOOXIy\nSsFx\r\n=q8vD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-302413a-1623056975308_1623057026120_0.15187886183863908","host":"s3://npm-registry-packages"}},"1.1.2-canary-cfb3e0c-1623059346588":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-cfb3e0c-1623059346588","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-cfb3e0c-1623059346588","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c8a8b25c18b6a0afff11254d09c725960ca77df4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-cfb3e0c-1623059346588.tgz","fileCount":7,"integrity":"sha512-bDgHltdIkPjiYgDPDf0raZrcE4wf2R2g4ExX9OFvKnFyLTGp+1TBq0lUJOWcmMEbVz+IKncxGmMM+KhK4BetDg==","signatures":[{"sig":"MEUCIQC1BpPaje4WqJW2z0fIenGlquX9W9tIaHrpTZzGUKN6rAIgIIwL5UwY5ndTljSk3cOGRKartyozXC4kDMra0PeadB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvevDCRA9TVsSAnZWagAAcT8P/jaYv6nOYslkYmS7S8gz\nGqcAGtuTionzgb3gzN04faa5ViM84pcfLe2UfFcp3ZrzAPqmlGGCkP/1CdFY\nablaTaCZA0U5k4ps8sjIi55cSZ0EUFmN6Fc9rMi5tXO707zvnG4VzisW23QX\nDD86kq0t9rxjDJY2u3bGmCzq3xx6CEReXOgz6zotBPBq0V4W3coCSp+bKFxh\nOZpTI7xg+YLXkTky2MDxwhhjJylUyEfOWqRM73RP65p1JQ2ti1nw1I4sSCWa\nG0rAcj1MZz6lquAOEOgbZorHmyDX0kEWTmHtz+wTz/lZPnJHx2MY9I4ZXU0C\ntSeNB+5KufIrPNt+L85kdycW5opDR3VCwNENpzZuxc26QOo1aI/UVhY3zE5v\nXxWmWef0Rj+oXgZYiWt+zkO81SdGr63QexvBpQznvN0KVBd4u2hxb2S3p0ll\nVT0THAnUODqpFTjtIAIMvf1NduhsYuGfNdPaRrwT/WvqlFjMoU4PIfHYNaNJ\nIYx1OariLpd0lUGoFJoA8t3FHGIjHvU2wVneFWQGiIlCT/2QbvEJGMDNrWE7\nhfJvfxlj4dm6Vc4GL8F1NaX9tWMsM+ImpRrc3iLWhveIaCGM3LRIyBaZ2hbc\nVhEgSkis45I/F32QP+ydAiN3YJuPQYPqG1AxEYUcwFZAJ26TJ0Zty4lq7QQo\n79YA\r\n=oz9u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-cfb3e0c-1623059346588_1623059395208_0.7229059089543537","host":"s3://npm-registry-packages"}},"1.1.2-canary-ed4509f-1623067815285":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-ed4509f-1623067815285","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-ed4509f-1623067815285","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"337e64f7edf8f02d58da1168645e747cd92c7763","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-ed4509f-1623067815285.tgz","fileCount":7,"integrity":"sha512-xv3DlBMp9PAWubCf1YBk0Zfbi8DQjuOOcOJrN3+RQq5vckZMn544bOSYlphzaXcYQu0YdSmYB7lvShOqvdQSXw==","signatures":[{"sig":"MEYCIQDnWJ6YXWQ5TXvfkW1YLtuYamMLrksJXwDALyHlycY0FAIhAJ90VWyxDXcEBZ2Xhqkl4mbFvarSBABnS5nY4eJ7RNAa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvgzVCRA9TVsSAnZWagAA2rUP/RV0gdBK1WBqN5X4pEHB\nJ7NYQNlK6AqgeQ+v5BuUfkG+P5q4fSqBMKTMYJkd08dnSesSMhmM7tV2UfrE\n50l9HondWPeRTnVUm8D+h+CxsNJzuKlzY4KiRZ86/WG0+zcn6N9iSeM+FQU+\nx1h/gm9ribkJYkkV6A4qHC1PO/TU1XkNqm+zOJWlTB2G3Q4JrLhw52F9uEj/\nyLLFVMiclH2Mz+GwwugAijvokc7dq02dHwJfCFg5iB91RACHdWyLN8mmXT5r\nc0+6twd7h7+hLSDcdGsRyAJpGPkKvMSZMc5YON9Je2dEOOYmWbVqUiZL2LU2\naVOH/4HqKuWoGxA69JCtSN8AGkhemw5jqefeP+djHFCsK6KVSButdIxbEYG3\nLnbfugk+dsucba2qvcRhQezJ52a9F1c2OzICSIsQk2I7+J9mPWE79WqcVLh0\ncW6B/nJXTNUe4cwLN0GC8dSbvN+IIcj6ufR5c1J5NQCPXYlrDk01N7nw0kNH\nUj+TzgqsxnvQuJMlABqOsq7LM7ArnGDBQ2RxXaeBsT4EEwF7YOZaIAT5ycWV\nHG+P0KokLIalNE3JoT3ru9uJy4LimIvSw7/RT46UHbroVED0VfiZ7tbYDnkn\nEHQLFafMknuUu2kjpHNd12oDUFzZHhOtKmMokBftUow4/HDqSsdgvMqvz5j5\nfRiG\r\n=6xFb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-ed4509f-1623067815285_1623067861148_0.95429705237567","host":"s3://npm-registry-packages"}},"1.1.2-canary-de34657-1623070089036":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-de34657-1623070089036","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-de34657-1623070089036","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f74a50d52be6bde6fc9564989d9a078a3f314e37","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-de34657-1623070089036.tgz","fileCount":7,"integrity":"sha512-8TMWBXDE+0Ri+hjzihgcUz2l7GNzNYvMBZbWADSKZW+WH0WzwHwDfyPTNvJAcrokVMFwHL160y9WoHxNsRDBnQ==","signatures":[{"sig":"MEUCIQCtZ7mVJYHt00cfIeGa6+foQlolKb/4Pp90KLeIxeomJQIgKnmFVscEt5EkryAh6xSYjkVMGNYZaSzXJvVOCUM4AEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvhW3CRA9TVsSAnZWagAAEWEP+wQ2Se6Q5UacfYSkO/NY\nEnOhivm847VrpLp5KhuRcyLIEDAivKJFGcPYk04ecevcCPZuQ0s23uueliOq\nLGVaNUs+HcDaYgkcDrhjLP5xpKkOtSHo8KEWYhmpIDavXE3CfDi6z4k/8AHv\nTY5yGpHXlEJgbwVazLkYGUxrg/Ti/lj4AJIN7jRCrbClzLk1L8IRwFkTSdK4\nO7JXo8GB0mZNXpExRf89gjKhBVrvKl7mQBHDBSPpt8nE/ZUPNayYuNPrcgpj\nXMzkBl2ZxHPp04AbyWZmQHiuS2TEzC+T6fD/0IB/GcmR3RMzaj+ABrqJCLiz\nMeAYQC/5EUJv3Bn5AjcKMSP1OsA53BY0wTpIDVutpl54kzCK1eoYJGV2t2jt\nt0U1VL0H5MLJzJOPaf8JuPXzBvbSONTAppEXiKj5RtrLje4WGYw1MuqMvXnG\nN8Y3dioBMnWPwiqw7rMjmLl58XxccqEdDux1nvUe4dqVnUcNwfowuWLazde9\nWqdIEpAz+WfwLwocDt+EREOb7uzxqukJ6ishKSoXRNsYFJXDWWCZATqIrtwK\ng/WJIrdwEdyOgEsC4riuswEdLvPFv/D5oXzPMjuvQunda8xAceK+Q/mgctwp\nInC0B5yuennAN84zGjIQA+mwsz5E2n2pGH9mNPcTyNOup1EEgUQeh/MyGPWu\nRFfs\r\n=iK9z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-de34657-1623070089036_1623070135732_0.7763093247140103","host":"s3://npm-registry-packages"}},"1.1.2-canary-40c3ffb-1623070545376":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-40c3ffb-1623070545376","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-40c3ffb-1623070545376","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"39847e8c9d1ab4ea726b1a49bd6e81cd1b9f2fa9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-40c3ffb-1623070545376.tgz","fileCount":7,"integrity":"sha512-5nan8JH7SxQWYI/5hxMLlpmqdN0lEY4e8pY6ZGPDP4LMhpkde3dIw1Er3dq86/2YPMknmN10ESt9aZfajkDINA==","signatures":[{"sig":"MEYCIQCSkmQHw86OK0JUjH9arhaIX94fs9U37WhsGw7iaSjptQIhALY+SA0TNkbMkSCdBbt9bO2o3uUtGXwhEsmB0Ik+BBau","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvheFCRA9TVsSAnZWagAAHIgP/2WAGMNx5nIkwUdeWQJ+\nU2nU/NLdTHmaP2bWK9Wtx3v5AgxS0b/ZpP2dNnvMjid8tgivNxtfK52mkTRa\n+27ttoDQ5LDkn2eLfuCQ9duE1+euKESJ48it2JpJH8WsPHXcdkbc3xmLYDlU\nN/0+fb0lTIqc3NfoZgtE3GcVPUJcLuQyK7fNqNbWSKYvqhrcepRmuCfZS6pc\nquapun4qHafPXtVU76+7wvFcqYj42vk45zs/8f3rNEVaLMpW6ZQ4z1O8S1Bs\n7S1V6ihDYRdDv+SP/rjpBGvUtiF9t38VR8WGw4fd6sZDD6vZAk+R7Oor09TU\npa+ZhmcMaVOBnleRYs2ryZNjjbDdJaDlkHMr/ymE7y8pwvpG56LduZfiIsQg\nHfwQMUsSxP9lH+8GamjzntZMijHgtDkkqdEDcCbokBnmtUsU21ke6EnK4Gnc\nkZyASsPUCKVA73FUZgEE1fEwCAykwZbxAgIinxPbRICOqLjwalF0TtNGgMbt\nsIBXEFcGqefk/cp7glPhj1fuEFRuPa2idTbhXsdKcBnsYFfh9eAF9fSh4ue0\nOVF5yLbw1j3O2tqj+R5vJBkxzLoou+vTntNe+S8dis5smXflPoe2Z0ps7xii\n6vOGCSYDWqE73ceRHq+A9kJ312zcOfYOSZz20UAhUlzV6tuVNMxMXHpQXc+9\nRI6G\r\n=8KBS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-40c3ffb-1623070545376_1623070597441_0.24504206651824334","host":"s3://npm-registry-packages"}},"1.1.2-canary-41b11c5-1623204287510":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-41b11c5-1623204287510","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-41b11c5-1623204287510","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5894211e81fb4d03fe1a69783869f98dafef2ffa","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-41b11c5-1623204287510.tgz","fileCount":7,"integrity":"sha512-Ee8uYM+mZ9NJrRdHa3Agp7gShkuwU+fxpThqyexwMghfFfl6M9kgh2yAu7hpQ0U4/OLv1m78piv2AvH1He1JPw==","signatures":[{"sig":"MEYCIQC8/1yLutnAQRFBXgPOqFu5CICd9sRbjHYUS2HDBz1K6AIhAKIIR9nHVSfhwsycXs2yjfPF1oWfNCGJbKBGCg8eaicK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwCHoCRA9TVsSAnZWagAAD1YQAJDAfnhi/ro+QcR4ytA8\n0J5naM2MQ3cvYGzPs7ouLKsPazY7cnUzMd/uQucDvSoHYUzN61Xv0d6E3Ua2\nWI8lJo1UNH8/b+gv13EUItlJ+1gb5Kt/xMA/Sv8Jm0AJj59BxIM6/25gtZYD\nVVtFDs49dwXGoi0MUbgQUFWD1kc/uAS8+CRV8mPBa4JrvmKzIpgcs/2h40Yc\nyV0lziJb7wF5cIRfWXzgk0FvB6ukI1zZ+Uo3B0/1fkwXGsN/3s7oA+AKTswK\nk11pn4fJTMRRO54pKzlkNhDNdiWkB28ayEl6A2pw7Ys3apVpUc8aWkOmrKe2\nqkZK8vRnZ2Ekd+BMc2wqnAkORgmwDa9rO/SATsoW3P/rDjha62D0MG5pRpv4\nwbeZHSj/1gbyuvCYuOzFPzD/OTkdpMXIMSQX7yDKNfiFaRA05+Mm5Uf1gd3L\nMa5Xta//wT0vjJS8+dgjJcLD0/cYWuRaFTy8EK1n7SvGfxZBD4mkR91Lnysi\nCb7w2+J00oa9RJhtat26aLN2omHaEo2nVUIUFVAy2kNQwKTBS0GAo5HiyPdY\nkslWi63yAwtlvbe+FHT/Tj8cuGGT+SsguTnhn25neeNpIbG9MtHfz1ncar42\nYeh8EM2Ai97EYLRjC++3zq3fHPK5nIcRgnedkzZBm7O8hMtXe+mQlC+iri4f\nnAfw\r\n=bTnz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-41b11c5-1623204287510_1623204328792_0.4869985590077057","host":"s3://npm-registry-packages"}},"1.1.2-canary-228cee3-1623242778984":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-228cee3-1623242778984","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-228cee3-1623242778984","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ce38efe404e26f4a33a0f967937bc726897f7038","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-228cee3-1623242778984.tgz","fileCount":7,"integrity":"sha512-ZDpPKfntGwnedbiDmLWXczn0BO7+5y5NscSP3U1dJFbIaoKLUgNrh8+zx5KgLt3bUqlXyxCS+cvbVlmwyr16Kw==","signatures":[{"sig":"MEQCIHUZvbPvvz+qTgQj1sh1OXu4zy7Iax+TL2x4lELwp+zxAiBchHysOeeXvX55qyexbGfBTBBBiRmr5gvVPqf965p2Yw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwLhKCRA9TVsSAnZWagAANj4P/3gLvcgksNyf7YsI9xFU\nBi3qiXkGwk5sIQ3a7uh419ZpFK7XqtNv9UhdKU/Gv7QFHQmzFloSVDYdm8Pa\nnxZbes/3nYzwvPLa35KAhmjzLkvyj5nRK08EA5pTvVG3EuFjwsQX1V6+cpCs\nbhFKBU9vCMc8UP3BFfbvsWJMwh7XfFOVIoCSf1f6wHyVpEnDqDyKujNAnjNS\ntRp6cHbkBRhasgmPOowNpIi9MnmoFA7rlRY1dgWEKhGiO/gLkdzfnvlrZSXC\nnAX7mpw+aiAEWnrLmnLxs7UCae5feJ2DnxApnvzN/l3ao3T+G6y/lPBJ6B9o\npU7ihvJ0nU0iWF2kzX0sehlEn3ctj3SkXOIkNZjVOfHsGKjNISo2JC/WxoUZ\nrHVM0xVmNaZ1MlU9oYGJo7x7L+QXqJsuixosBx5Fn+2rzMpaItXR3dyPEUnh\nREqIpcvO6QVowyTOHpaGejchCwuSTnh6J46o98ZrZ5YJeG3c/qmNMfW18Mng\n64fA2gEZhco7kYIL1lRmxmM+GtwtdmX8mGXj1avGIqln/soO+Bb80a3qtVFY\nAEqtI7+O7Kyc9itQHhEOmb6dqPei5XqiisHpiIlpAMu4gv/SshW/DeSCdxjt\nl9hQqVVmORayT9xdkIhUW1MaLN5o5BMyBmZerSgEPVcndH7fulBvxeuW3fXZ\ndWuk\r\n=Q/bZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-228cee3-1623242778984_1623242826459_0.581238141899248","host":"s3://npm-registry-packages"}},"1.1.2-canary-a8a8bf6-1623242948231":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a8a8bf6-1623242948231","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a8a8bf6-1623242948231","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3a5cfa9a4f579960c519e0286db0940a84e4de8c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a8a8bf6-1623242948231.tgz","fileCount":7,"integrity":"sha512-9olwAfMaC079qEVWVFuBf1zWRENkqYLma+z1MSKlhSn/KuWQ0AVicZOuPVaR+Vu3QJqjnEEYf4KSXq9uqrN42Q==","signatures":[{"sig":"MEYCIQCilvBNNjjmgzglPrK5xgvjr+oc5XUjhft4f85eFp8kPQIhALtwADvKyjlsk7cDPpESKY1nXjfYb9XNs+86yIdgUpou","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwLjzCRA9TVsSAnZWagAA1xEP/RjoExLA7/1UpXB3W2Rc\n3kdZAcgF9Wfg8993Yg4hHa4xSIgPahmQ4jy/dyYijl0sonf/r7T+jf2Ke641\n3qKTXGIZv/a//EmRd/1oxDdRaOfUnPa/yAOvCuHf6ygjX0/9SDl6+elgz8PK\nlhZVve9M165dIlzLzB2Bjele3ix9HH/too4GTyNqXN+5ntWa8LnO8IoqlbXB\nJjqAoivylJmxWbNr5Uu8Lrqrgs9upUHLXEem27L2HvxmhSRgVs16OnwZOc2H\nnDXljshVQHqT9E3i6TneeOXoPsVOr3P2Wg7g0lkpnyQ3YIuVkL5jGYBK4L9z\nptm5sFVBaqfXjmRHC00EpjckF4/yHkhE68jtjUtpBsRE0yhfILTLeAeMGBn7\nHQwG67U+tWfqNuYD6XKbuK0BLlZXbB0LjUM9x9LUO2Fhg+yicHtcuPvN/edY\nXCV0q+BHdzlcyqF+8qDyV4BKmgcPWcxeZ0RelaPOzO4Tg0CPZa1S4TSPjE6I\nffPhGjDQJL95NBK1jPaknsPHvLvPmGM3YBJOsO2PVJimZX0RBaeOS7C98uYe\n1ED33MIDphV7BsYs1G6sqMAQ40S4+P4W6tKHVOmNd1I3TX8RwnHnficTgXn/\nga0dWmsUVvGl7TsIoLIEEr75rO+emrKBANewjgNm+lQZ93OUann151vQyDWl\njrGS\r\n=Jk1E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a8a8bf6-1623242948231_1623242995550_0.7969528321587396","host":"s3://npm-registry-packages"}},"1.1.2-canary-db0d632-1623636258859":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-db0d632-1623636258859","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-db0d632-1623636258859","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"050438b9cd95a6d96e4516a8e9024c03912846c4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-db0d632-1623636258859.tgz","fileCount":7,"integrity":"sha512-WEz2a8HYnfz8ntvfoEo6gXkI4l3+BtVrpHuz5aBUZOJewI1Zpoa3091moSnWYdrai6+V3ghdQ6g/9cYexQdtBQ==","signatures":[{"sig":"MEUCIQCVVms0ITZEwTRrIZxbkcYmyop+yhw1J+C8vxsRPtqsTgIgWx/AMwumHh6LbE0Vq++WF9sa1DgQ0kSI/ZFMkVXV2H8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxrlRCRA9TVsSAnZWagAA7sYP/3X9BpUyWPos1VsGd8bk\nie2pPCLF8uRUDRrhKkPXdMQn8OOCY08YcTuclTWRBRIoRYVYiUyDcOZBVAaN\nFr6WqhjJ8aOH4KFR1NGgAkgEFVxwhV3K2jaTCj1K9ASCMtdZ8HSfUsXy3tjY\nea6EtSMjHtkinuocGLR7nJczdV+mrnzo02fVGQ5YNxiyJ3f38BA3IqFuzbER\nxq1hAylRWssLMnwSqd90BEpeh7U/EwdqnyUhHx31w/oJpHLcNBoKRz8jFCpn\nq0b670m14hvmJOhsxhMuEd/mECCnKB55Tqc7YjLFFTsb/03F+Fu+9LWyHRJ2\nMZ6MBXe8MnYYB4NEpiBwg7ZnYBjpoN5fk7hxHevJc8DnG174dFTE0YtDS6Kw\nY7Wo4XB6bLKxYi/KWr3SPWG9x+RF+HX3ekXPJGtIIfko3oG3OovbbHHnm/Cp\ntot40IxIhDPymeu2wdIgIakviOOmKacH/+pnRvWzO/Tj3rdGak53dH0uB+zT\nUlXYTsIhtMB+I9z/+MCnrmIh3xrFVLc/ZGSrS4XEDQzoyohuNhDdWhdmjDG5\nWcIQpDTM+Ibepaljipa9q0a8gmz/AUpTNXm6WT2M3EtI+Tiq2dbrL/S96kUP\nABacL0jN2CTjEjZia5x1kC75wSLQJWBURe/64oicaby1LI6Txihbhqdwe1Lk\n3iZF\r\n=iLxq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-db0d632-1623636258859_1623636305250_0.9753369727048429","host":"s3://npm-registry-packages"}},"1.1.2-canary-db0d632-1623636258506":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-db0d632-1623636258506","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-db0d632-1623636258506","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1b11bab0d5d071b352b36628cbeebbac39166cd1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-db0d632-1623636258506.tgz","fileCount":7,"integrity":"sha512-Fase2+Gp+JlUoKOrVq41I465KdU6ZWJAiBoV6d8qEqcRsrLaJHuqKzm+W7wn9p77XDg+KWscQy3CmVOxAOnNrA==","signatures":[{"sig":"MEUCIDv40sE5cvld6sa3iJqHVoAUEHA5u8rG7PewM46eRhcNAiEAs1su0sRbVi61CoswH3BXcTtPo1++eWsVaFavTDKUX1U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxrlZCRA9TVsSAnZWagAAYWQP/R1roR19Y8Gn8N9Z9lU6\nLk/AcObgDySJ10Vpl2BY5DnZndateiVWfgshTX9F2hpyNTgPEqglbr74nEGi\nzwPAeuCsdz5qvsbFkCevJIhjvksntnJhWFEk4Ts71DQSNLk2b+6SbQjwCHAc\nRfVPjr5cDgIZloF5wQnkYV1KMd2F86fBa4tLFA1foBloQwflSTn99I72is6B\nf65/WMsQrpvF2P85Z1NNyD31R6PfCOhDp3jFnzUOxzuIXTadQNcUsKYAPSKv\nmmCzMpuvwWcdQEMdmg7lXx/2ZeEJ1nP6aPtiSm8ZazAkcg5L45B5b+fPiSLN\nazXa+izCMDCHDw24bPGDuAdEcyKO39WCw6wBCueSAldybn9YlI4IxZAb1I78\nL/4FcRRxn16WYg0oYuaXL9kkIz60mP5YN6rdkX+kaWJ2dHq41zVF9hCuRa6u\nSIhatTa3om5fRMwz4HfYot2QzdiNJkr9pH4Jkj8fnivBwXHOMennydc7jPtf\n16i2IZMd1Y7xlXjGXtWL28v9+SDdgofkR6eyZsFWK/Rws0MtpIOc+a8OKDmG\nZxcQjeMyOh4yHwd/KpV036eyLyrvrneF7O2uOL8H95AfK7+w8vF/L/cZdVuw\nMISIo405KENJCdjT1/3Z6TecK81Sxd+51BwLGMXVYexqaliubpJ7KKU0z/DF\nKi4L\r\n=MLkE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-db0d632-1623636258506_1623636313863_0.46041232777757957","host":"s3://npm-registry-packages"}},"1.1.2-canary-db0d632-1623636272475":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-db0d632-1623636272475","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-db0d632-1623636272475","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0bffb791c1e06d7b0e4585a4e7f644edd1bd04d0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-db0d632-1623636272475.tgz","fileCount":7,"integrity":"sha512-3m3nVLXP2psAPHtnSpZklewDBBqb36Z6nC5VHcsuI1xgiqxPoVgWVkdJC/7Nt50PWrkifRz6KRK5WE8yvh4Bog==","signatures":[{"sig":"MEUCIAufh3eIKzyEag8UDN5eEytKagE5tJ4S84qN71ntc9KiAiEAsFR4Myo4qQExwtf/RsmVm2IJKrC8eFCCRe2RvoQmURE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxrlkCRA9TVsSAnZWagAApO0P/30+dZnScdbWJm491yk4\nWSLydgBBwwlajzEhcw9u29dNBG8WlHwf0ZTwvDBFE8d02y1ynLaOyA8MEKpz\n/Qph95iwWhEdBqg0grhewU6CRDS43j93pr2Z04SsWOAMJOCub/ysz1J7bCld\nv/xc48RR0SoCN+UiYdmhgSvmh1xrvGoh8mGmjkc8WSS+XisO5//OIlCwmtAf\n3FB0FftJp0VsZTVMYgBPzU/+n9KFqHX14bGqX4rzgAylPKQjkoYzMTmCx+o7\neflnFbGf8TtNVc7D3scov/ZaXyREcz7HgNZ+QC2PtKkqxuuVIU74sFccKOAi\nH3PCUcByBY+fe1a3WOG8buDV1Srg5L6how2sFg1wRIs38jY905JbooiiqS29\nwphQNd33dVCNgwspGskfratsgnv3+pj4nSpY5Gno19sp/O63DW0PXHPBr+92\ny0j2uhwr2pHV9Cl9icf668Tkj5C/6Sck4nPSTjB+21I/b375w6D/giFBhzJo\n+PlsZt0jWrjm0mX1j5pZ9+ix9ycsOxKZPd6GXO3vCY7tep7s3N5LnOOv/DzI\neiD2KAdByLlNbJtUhwRLT3UFCIl6FUfI4zqSRpuytTxLJWhRNNHfUKJPAVNl\nZsnKFCYLSiNwJfgg5uGxskDBZ7ps96aRMP+0Wpzha3P6LCRgJoVPrtsUop4g\n5G58\r\n=54cL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-db0d632-1623636272475_1623636324567_0.6932499056095589","host":"s3://npm-registry-packages"}},"1.1.2-canary-10353c3-1623661437790":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10353c3-1623661437790","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10353c3-1623661437790","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e4de968a814bc513e4842c64f298529a4117d14d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10353c3-1623661437790.tgz","fileCount":7,"integrity":"sha512-EXJvFC5yKJwFgtCVwjvZlirIMtWw5EQ0MZzIo9kEUQwliUFPqXZjrgYDZG12Wwug60L+tkpBnURG/QZKEbJADA==","signatures":[{"sig":"MEYCIQCtPb4D96jhzvkFlvVi1Cu9IiVuco2/PMdAFNhv0bQQUQIhALwj/RjMTTPqBhJeAmuS9Zez2j3TbUeOu7BbEg2gUTOc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxxu+CRA9TVsSAnZWagAAdEsP/iBUwUmu5JlgPd7LeW8e\n4u72qinEoqeN3axxMWZVwYn9zP7NF5l71Mt3tPC2+3WOJHDJy8k/JikiDhhT\nyKoyZN8EFXMjCy+SvadS/Azv/Py6WI/OO9HyBLl1QwGCop9jkgfXv+ddFIyb\nBIpgjEh3I/KEow1SEs3YDmDr3NZBFta+BcjeHM0h6iFbRWAuFWVTyhCi8czt\n4T9WaRrgar7ZBw2PsCt8+yDDAMNVIaU5zTXfA1XMAk1gjHQjEPNWCPxV4WcM\nWDDFJUVl31DBdkvbo88J3dK8Yc4JW2Jff4xcOvSGQrZoYJCmtm/y6/xKB22y\npmX/0Sc57SCuiwr4uf55F87iOkt6mEVj4/wrXT+rw4eHRx9GT0DaGfxLgd9m\nu2EJ1m+mh8AL6rFyz3D1t7rBLw0jzxXiS7eOGs0Q5adWYUpbBytRDrWei+oI\nj3uFwPV9hqJp7TjoLwLbsDBZgd47nqTq7ayYkuB1Lppa1akRc+2/gOBlyCIq\npMT/c7Avp/a2YbINd/Js36wAnxC+YDgG9vHZC+PqTumhH/clG/sCAJ4b0YiD\n2aajkFMht0O6a+CDQHMRPHvclRqiir3nf8JH6IyAkHEp/JmJqaqRMBPsn9Yr\nG7XQXyJvkEPfCdAKoMHdMZsiSYnPjdLL2xCT58LB7h71CotmTQG0avCTvJDM\nb+PQ\r\n=+0Yj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10353c3-1623661437790_1623661502567_0.14028847491025598","host":"s3://npm-registry-packages"}},"1.1.2-canary-10353c3-1623661453519":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10353c3-1623661453519","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10353c3-1623661453519","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6ed81a12a1c427088fe47a3b853308253de94a5f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10353c3-1623661453519.tgz","fileCount":7,"integrity":"sha512-zb2JmJ9fI5+J++0+WXcjBQHBZlGB8wOPLBLlBSQ8sQjjqFer6zrmZANnxhxliIYgxtxSsMhYlVKE8J3fmamOig==","signatures":[{"sig":"MEUCIQDvR5XbWuk7KcgV2HH2tiSkny44ZZSWQUcWkRwEwZLHkgIgfQsXhmzm6j97SU782xstgkqbOF5Heg/1U9QcCwBHPzQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxxvICRA9TVsSAnZWagAAWSIP/Rv3fc/zMCwRfMSfxdVK\nkHl+/2w4WvYprquN8eWCdXDZhv90NrDKNksyRgvtI8ca9NcMz805ToGTXh6g\niuCV6MfMUU488dEeDV25DVf3SsiPjt0o3WGtfWClFHt7RJ33fhz+XbDannVU\njM9ptVJpyeQbVA3zqKK8kiRGABv0kD5MMikdO40C+5d/b3HBVVP8seZ3q4b1\nU1/pSKqAaSb/lUKdaIXX/ZpDeaYuAISJIZrynqmb+Gf9iSrJkW2Ags41Xhvt\nkAr55oXMQeZphWWVQutNytCgf6tTSoqQbYD0MkyB0d9NptyPwkMXcSzcvDPz\n7lLp1rPOyP7rBn3ETnLXBWpf8MRY4cyt6ALLzo6mmpIYvjyEgb4HURx4dS88\nLrpIUvhWxZFotKCHcF9sDk9UFh6PUbNn0jrNNSChq3dfQDSZO/FBVSiwS2HU\nYNRMPtW7UfFxzkuzbFGYFOW52xOjozUXMx0F9GJl/jIKcqPQzNPxpH6wupL9\nvQnpfDiTU4zRMT0e/4/4GQexLCPk94WcmoVfPJ8sAMWvoaieWii0/JusRQsB\ncK8G9sa/15emyosFrEAjGaImXgIDz1mRfaqBg1et9P2+gEX7/gZhro2M5U11\n5iQor5vwvgAwoRXssrWWHy/+jxAu+BB/QR71OJIPEAcqn37f28uTzhWA1lf9\n6DzX\r\n=mu0v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10353c3-1623661453519_1623661512495_0.49848613475134873","host":"s3://npm-registry-packages"}},"1.1.2-canary-3bc6e5c-1623664298667":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3bc6e5c-1623664298667","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3bc6e5c-1623664298667","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ab522e82c2882bbe2e29b7e8ade0a95c465caacf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3bc6e5c-1623664298667.tgz","fileCount":7,"integrity":"sha512-kHrPobofxY9DTLzTRJWfUVTkpyghob2v/GRq0hQuLGFqeN9In9N6ysadHVXyk89igFbGVh4i8EgR/5KfAFzZhA==","signatures":[{"sig":"MEUCIBpzPXXHewzqnFjlF3E649Yi56r/M+5bO/bHav410odHAiEA1zma6qn8l/Qo1TqvTNfq2+7BIBofb5660XM1oz4YsOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxybvCRA9TVsSAnZWagAAaNEP/1Jm04Gn4Dx7RPaHEoEi\nMaITZWTLGTv38gxJ96ijMJQWTsu33Mc+p+ZoMbzCtXaChcr01XRwG+1svHOp\ntPiNlO1svH71eK6jxyofkVFOVdYR4MxLbWn5lxQ2oIoi2nA9RGEPRZpZ2fsw\nm1MJr//IyrBezIoq9h+Y1Li6r16e2hoDIKg+JA/8QO7BBhNm2IdWSil7CjtH\nWJkyKdV8h4GubzlC7NBFX8IBrxxcl7sGAXhFRXb5Vho8/I2mwLfFPwytRQMj\nGPwJf8HyBjVVtinu39lo5bZWczi4LEEtO6hfSfIgE3JSpvMexZohbbiFkJEl\nZ1cJgkruSuaLlmgSNE9FzTEs6k3f9yjgUVbdd+3y0XFzYX5G1MVBfHO7xRcJ\nbNc0/HsqZggibu6zektFYPduPbvZQobB/pG49WptHmRSuZT4Y+rrUbHhO6K8\nQyV1ck4VOXz9dV4yt8WQH4oLOkKcly+og6a3sT09h/dpVZI27B0QxmuV8Ute\ndBWKFaUA3lLWLC9eddUyNTdGk1pnX6+6jP6ZecS0fTS8MhnxXpjnrkLtBUB1\n+0HFhvqe4O0GFkcxJyx6kN0zDJEKFXMpQRRqGMzFAyAeKlQkb+O4Dn7RZrYu\nFhIXuofUdR8odqfu5sThAGeOEWAerKbgL9DOvE3AnW0zqw7+qPa80dtyXzCm\nBmht\r\n=7d6R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3bc6e5c-1623664298667_1623664367326_0.9129763884350905","host":"s3://npm-registry-packages"}},"1.1.2-canary-3bc6e5c-1623664315008":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3bc6e5c-1623664315008","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3bc6e5c-1623664315008","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cf0b0161f5b8693abbafeedd4b160fe27cbf1147","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3bc6e5c-1623664315008.tgz","fileCount":7,"integrity":"sha512-TdkS2kGDZjsKVQT53bwl2qVzByulUSD8cmGDKYFC3rastpsfP9/aNxugUrdlfQ234CYcx23BX6VJudifpxZnjw==","signatures":[{"sig":"MEUCIBOpY+q3Oa5mpuIDdo3wjr8FkoIbytt139SXegQIYQXbAiEAr8qMoIiRs2TyqbgIRiZfzjauHjSzc627yYWvtgeQ18o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxyb+CRA9TVsSAnZWagAACbAP/RoKyHnzb3LSn9Rsimnj\nb7fvtk2GiS5KtFFT0yMK9rS7yjH+0ky9bga9mK3IvzCj/8FrwMcaFkaeS/Ze\nmBf1/TVJK5d1vXHfmgiWEnv678UK+yE2QMisM3g632J183sEFn8Jv8CsMUwZ\ncEENVsrrJINeZyOjlIDQ019P4ZhVBer4sm55Yj3elcUuF1M+/G1eXuvCl562\n+TQnXnzqfCpzijm0RVAivCOFAl1+dtFYLdroXVY6KurpFxzclCGPOSyzWMyP\nOKCHBQBYBhogjjvFrcpt1XSjtRRegwn9Sy/C190jARwgAfc9bI21QAym1HKB\n0IiMB6YBrvK40oPJ3fBkN8MUQ31v0IpGKAtmaT2MQEM5VQTeXSC27e1agqDs\njb9/5uhgiTQnVw+IR6CT4wb3WcTi3skcYGXXQPlWNCbGgNQLbX+WHCW9qzOm\nkGyDxw60D2hMSQby7JxN1oxEiJBZPmSZm0ChULm44lWeadM0D6Wf9GQuZ8M5\nlfqQ94z//9agZdHdm8Qze99YM37Ir/bVZUOLxtKHAgF+ye5AQunM/D3dfCLT\ncp9aYI/Lpv4+K4gc8SyBG7baFymp5fP/wz8LtcAG70mxzrGb0zNNF5cbNcVt\nq45xoPRcfedn1jfl+kEAc2Ymzj7R03WW95IhmNfcokjgw0n8GkW5aZa2euhn\nId6d\r\n=aXmX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3bc6e5c-1623664315008_1623664381888_0.3950772473095474","host":"s3://npm-registry-packages"}},"1.1.2-canary-3bc6e5c-1623664317665":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3bc6e5c-1623664317665","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3bc6e5c-1623664317665","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"502f496e0d80bdb45aeed56863f735298d2ff947","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3bc6e5c-1623664317665.tgz","fileCount":7,"integrity":"sha512-dQpHJ0ppN6BeYXag+JcuP5AOkoluJ8jKt69h4hhb6gIRXLOCcmzTS4liG8CsDOwNrMPiqQXudMee9HBeUipGwg==","signatures":[{"sig":"MEUCIGjcBQZWITEDwY/nfi2n45ZCyoYPgzBGLJO1BaIiB2SIAiEAuAHuigrDe+nIAm21wES3zDViQhQfXB4qCD2KkNXvc6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxycFCRA9TVsSAnZWagAAT9QP/1ZwQ+6AsplmQXUEqFeZ\nSmfkncoE2psOKv3GelSMaBjp+3HujYVtCOC106ZegNcCxXVWpUQS+GkQQdQy\n+uUOkXE/UTB0Iat51xhtQU2cM8ukLy1V5DF3iOkQwem+RCKLRFu1KA80omZ2\nQgKmiwYty2oQuKKIlUvnYrYhSIQDA6UxKRXGkoeK/xT1qP0D5ItDbDxbsgiE\ncEm7ba53EIAOMdIPh1lOKZ74EdyPVmQB7E8rQRr+yiW6456cZnaIStIfiHXi\nYWjUCfjUQs9zk3ENH6/zGq79NpdrA0VAtkdfQQO06uSuMS9NehevdM7YM4eu\nxe3g0vLxBRZe+A2j/+8G/ZsVjrJVBdU6KUaplgx/LhKSfad1ojb79NyfZQH/\nluF/UXN1E7/vJIqdfRr3twXs31x34n9a+xvqbYJm77H9/8jeFm2AmPbWUxru\n2cruwbecT/w+W/p4X1aswWXBTnhpn5n7/0aXAYBuGNKI9IJ2F4fGUSZ5+cMY\naLE5LHjOyVZ5tAkQFWGJSZT9/rBUOIHwDA87IvPpGQ6adaW+K36QPlr78sbh\n+Wi0ycQsR+N1pENYGwCrp39ahkQ8d1Rk4McB2FHsondwm8f19gpS7eOgMRBq\n99WG1jfZuM5xedbqw8WuZIOCoH1iK9l8bgsuzIYOka13zBq07tsEn9sgulV4\nddQv\r\n=4rcp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3bc6e5c-1623664317665_1623664389578_0.08091974889191467","host":"s3://npm-registry-packages"}},"1.1.2-canary-3bc6e5c-1623664314695":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3bc6e5c-1623664314695","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3bc6e5c-1623664314695","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"12134aebf5c462f9977903f50cbfd655c20ca140","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3bc6e5c-1623664314695.tgz","fileCount":7,"integrity":"sha512-kBWnm1zQU+haJrNjzFpWkW8Oi1IcLnR1BTIBr/C+ELVEAPxIF1Aq3MQ3WeH5GH3LXlGkXLxKJrCVvXRB5GrfeQ==","signatures":[{"sig":"MEYCIQD1Bblh6bYTGwXYwuGY+6/JY1yfcLzOQzeF2MXt+cybXQIhAMeaXnwF3pTz9tRJwlzQFJvOM9n4lKI3Kgxzmh2Rel5H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxycgCRA9TVsSAnZWagAAF1oP/Ar/theDHLY63kRReMci\nMHLMp9pJjZhBgSJW71NTwYAfv224pg3Y1UfzfHWHui3r6Zxlxnz7p/zupb4m\nH0qUyLf3rzg09CqqwKQy1iISNpjFBj6spCpkUZkxzGUZGcdHeSXy5HMks9MZ\n2xSfOtxeylTGvhyJKhuGMreZjeraRTkXII4aebKwtZ4QskftZNDnyTrpthYe\nJIM7Bd39GtbhuNl1VcEeQ2cDbk1RF6OM5M+GiwKCjLzN9KyxppmB0rYBKdCw\ncR+so84O19fJr5NABnEXfq6UMQlP4mYS/p9qem5Ac2UGx/RGxnJN2MBczhzp\ny/7UTReEI9xBnrjKUfrqLyWRhZSoWoI7maT81+BKNirp8vo6AdaKOLK/Hobu\nbIjfjF5txE6Mrfb7T8NXEnzwfL4u5Z+3srBl/UwJKPEsxWojqXRStDprDbeY\ndyEhC/bNprRqH461FsfbX11cl/DT4oNz5vNsJL3NnS8rSmezdetAd25Q4DDY\nWlQGH/IrRMQPM75K8F3Fx5EpYJcWwWDdl+JiY6OgpMoSoGXFU0PTiZ68nKCf\nrpxG8eqqwK5ySwwO6ZalQxDAU5FpLYVc2jTaUQL98Wa4Hizr/4bEI/922piX\nsbnQetypoR5zQYek7O4KydM5FY5aRHur5u8Px+SfN5S9Cr7Xsf2ZvrWIFi1I\nvlrx\r\n=6zYv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3bc6e5c-1623664314695_1623664416530_0.6241070243314106","host":"s3://npm-registry-packages"}},"1.1.2-canary-3631be7-1623668119271":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3631be7-1623668119271","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3631be7-1623668119271","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bb1913fcea4547abdcc83916b67841d90c96730c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3631be7-1623668119271.tgz","fileCount":7,"integrity":"sha512-FXOtPGt9QoRghb9JEXaFAD9nVzxz83vlGK6lBT924dMgUDJayFcT48tmUACkWHUSgRuriMcjni5kC01CoW1nzg==","signatures":[{"sig":"MEUCIE3Ped+6+BK+Xum7FodGJBC784a1+JHgu1yTGqlWDxHhAiEA8Lf3bul8J20cCfOwR2UYgj/1SN87yU5Sgqq0pF6UlSo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxzXLCRA9TVsSAnZWagAAWBUP/0tb9+9X5JpR1BLYg6Dn\n3jw1048BhEE+yb7yn0lSXssVsZhaK7UhTAURV4eKDmmGscs1MLdSbEKXEsEY\nExhTYJQugfg2x0ro+E6KzqtLaRMFnKp03G/7oTAHs3Jn6wD35Iu7vSsXQHvD\ntJ0ZtWoPZlhlZdZyMloRK+VEYN3sWLNivMhsm45LwfZZlT28Q6Ar2zaB44h8\nzANlOVrvp0b02ep5bx44Bn7+YVucHtMuqmly5eOnwtH0++vIw9qzKIN2wCKI\nkcgNsyBA2xwCbTqWSjXX9LzJ74N40ygYlfR2YO+hZ7hZT81QqjkhLdYPiOKZ\nWJM/x5/gaPC6b6J0t3TP7GmU5iuXPo+Xf77Yh0jvjz1G1Q6tHIoRP98x1wQs\nbxMg89Gcla/VEVCXvmZADdA/s4oWmAwPncu0BlajPUtTXkJ4CBNjU1hUf0yp\nWEtaaGyxKu0OfAFITsPAtiQJUPEHHn5Fl8Mkmg8Rqxf4sdkiaWvs95mGGtna\nfQU0TC3TEABe33yuQeghrt0+mC/s97qr1fS7u95qMkKqhCvRDMoq7+G8sLTs\n7VDImLu9nQDVuzBH3Z8WoCozf0aCe1rxTOtVDF/gPqJLIrG11iFD5J3OnXkS\nkkDW0zToKUEnZJ+OYbSfx50KjxbTcVYoclMuON7tjMAk+egB0S0h5K3N6hJP\nJ0Wp\r\n=nQFv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3631be7-1623668119271_1623668171477_0.26221151467417125","host":"s3://npm-registry-packages"}},"1.1.2-canary-3631be7-1623668139346":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3631be7-1623668139346","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3631be7-1623668139346","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ce36c414053ff3e7307608e025f3d03c7dc6983e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3631be7-1623668139346.tgz","fileCount":7,"integrity":"sha512-wIZIjUNlbylDQL4KUEnQ5Al4wqb8puubu847DmKLqcw3a8R+Bo17kM1L9bFdqDWxfvIskUEKuqhGxQTNjLtjXg==","signatures":[{"sig":"MEUCIQD60G4JANjIOt2Q3svUNDbcCJuwQpLLmk2dMxHQ2suIQgIgCerhSRDfqdPCl3W2Z8B4l2UCIxBP4HLWeMyXJrfJMGM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxzXdCRA9TVsSAnZWagAATbUQAINEMe73E5VlI6IgMhpG\nF5ax0MCoO2b2ewgRNCiuk0yV4KRF27C+Tb8BVrCDirfVslft3Jn50JYk47S8\nFfGBVqdHzRVPklK/Rd4RGTVy2IwbU3QEq1DSpd1easMjUYKKmYi6mZMfgtqA\n3d7AP9JJ4OyofKk0VJAcU72cngMBrWDo2RZZfjBNKSAl4JVYlBWhx8VZkJmr\n7HXeQRCw1jJ5UmS8UJcYBMkYh0aTddpvDN1bSDAAt4IXTcqpaH0zC3gqCQ/4\nU97Xs9k//zb29U6anBuLQZUQbeXSj8QjORenH2ocEbCgrN3zjSprMIbgC0ra\nym70rixaRj6LfXzw/x39+ofJAhOzJHKDOsK+X2EaremOOaxZVM0N3wBfMd7S\nlglfIuEd6naA3RzftVXYZXooA+rOZCN7GezJzUJNwyzckz8XPs92csZImsRY\nFjckpHJUFu2SbYNYFByFFmgRqWQe69aIvdOmt18jBqICIvbASH40ng1y8aRN\nCBjSMjhlasfSOMEZa5uqO+uXOEPKfNWOp+Rv7W1GeR0QwS8zjwlnpby5pN/T\nStxrwGH+L8v5SQbmq20pcwjOu8TOEOs6YJD+ZHO65kRRTSuulWsup9hNhVYZ\nC4LeWa29IRqcaErVf508C3/sUdrPEH9AAPJ8bI1rvPiIeuCtjUZo+ulhNNbn\nl/pi\r\n=VRf5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3631be7-1623668139346_1623668189637_0.08710738233632842","host":"s3://npm-registry-packages"}},"1.1.2-canary-5f4ebd3-1623686637631":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-5f4ebd3-1623686637631","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-5f4ebd3-1623686637631","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"73d66a6cea6b62e5f1a098621b0941ff3095dbfe","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-5f4ebd3-1623686637631.tgz","fileCount":7,"integrity":"sha512-aipHXI08+APv3KGGURn6P8tX6yloAwVzp0eZQWtfJea7QCMCgSX3udyQs08otL5ffH4IiwWBSGO+Sn7aaj8ieg==","signatures":[{"sig":"MEYCIQC4zVkMXTIsu03Dm2kyjYVNSW35i/+VihyV+8JhKDfJRwIhAKSoT6ZzEgjemhplV2t5GS6spDyHk0A09MIows78rbYJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgx34fCRA9TVsSAnZWagAAmBQP/3nwHNo14YqYwpxHRzct\nDoui3hQrzlaiIV6AqiWB2BEdyKqWXqEpAx19UnfPAy2QGboNTaf8vDIV8MZc\nXP69/tLEYyXsifn35Npxioy9GDBnq2lKqUxepNAjGmOmKzPMCvBGl6WsisgR\n0VKnt/zegpRw0TjflW41dPTIINhUnXbnkMWM+iEIWdWDviwxg3mvRrD/Nn+D\nCwFOvGUx1uixrok5ry/SDYeU1086Frx1qSqLSZm15CEWuQXJn0NzCawHpPwC\nN1jf5mA17Mitjwt1JuD/8PhBVenJW1Z6UeWv64IxnxGisQFa7ypMaQqPIgFU\nqMsJCypB7eGjiBJ2IE2GailWbW1l5tm6qiZYFP71gHsVQOf9FZBoA7aWaodq\nZaCJ3GLY8xAQ3OW3TLvaz0eqrQY1v3Rzv+3QlNCO5wKakZ8Is2x4xv5vOQuK\nkUqHOLT9gluwGprE2VMcJWTSJ1fHVzjqU3CtYejgs9k6oKzXXiWsXe3n/xfx\nlj2p2wQ6V5L0DMBx/US1AJEVyTH3IN8K4RxXf/ODyC5eorR4gwqN/BXKN+Hi\n8QPfPLNnHTvVZZfzeJWW+P7XAF84Vl83Om0JsbKXHR/CAAa7V6Jov7ymPXrJ\nE5KvURNQnMTkGL6tiGeqIvUgvNKzV8EzOxuuNsU1MyygUTe6ur3OMZIjYZFZ\nNVXE\r\n=ZTPq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-5f4ebd3-1623686637631_1623686687485_0.5360420384376459","host":"s3://npm-registry-packages"}},"1.1.2-canary-ef86f58-1623895548882":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-ef86f58-1623895548882","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-ef86f58-1623895548882","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a743932dbc1250afe0c605b0557defdc0c9b3f17","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-ef86f58-1623895548882.tgz","fileCount":7,"integrity":"sha512-ovcqJ1nJjifwQm+Jl+yT72ilLEJNictX8+Vvj8JL0O1jE/jNXrwjyDdksdgO2IOc1FSXTxqXpEeXu7FMP9ZtTQ==","signatures":[{"sig":"MEYCIQCpg+ROOBzJ0znSO8As37dVT+eM5tO1XwfbJI+8svyFowIhAMbGqqTtWW2AJ9YzaS78diJ0iKvnjNn8CsrgBSPCwFSj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyq5ACRA9TVsSAnZWagAA12QP/R00kZYkxoMFKu4gUSBk\ngognJ/CgMrZ4AXoRMvnHZIyMd056gxnwr/b5Te1YVTpd+kb5keBmm3PAMs4R\nnhSbW34+EcR0D7IpkmSytTpC/6xs8E/T68utUluUyvVX1dtWtUeW6fG+XEjj\nkQsNkzKidq6IgIDuJma26LmmlHYTuwmmAKOP0WCgtETX6UkAtnN/PFahGp3s\nhFoA4gAvga3E7oU9fSNfAshuRE93qA3VVMElLHhc+jvzaqWPN/lU+y4oxInu\nMzMah8QNlvVqBE2p8/djZvITpKR3M2+Fn6ymt0NqrkiOZWZQHrOaUSnK9ahf\n/sBF0pOpxnEWyMb2X3wADE84C46iPGi7+wUj0xB8t4OVrXQ1jZbmYBgN97KC\njU2mRDQiUMdc71HOjMayGaY6wriGVwq0x0x3AISO/gdurB7M4Prcicb7iR6m\nKuz9AXF1GFPrYex/ULGuYBIpRymUV6XAahfvaCWyChdMW44NhVEYvmTctPve\nWyScyKE7wPmjV/tY1qC+5laqiyBen1cVsEZ/jvOlm5TVPIcgDNdJUvfgs2HP\n+mBDdL97dbOpz+ryFu4re0EAkV5xpzJt8TfAH/PbfFX5vzifLWSar1x0AaLv\nOz1ODlgczYrH+OSLo3euw4jcAgA7iBEArTm2LnAObIN4zkoVnJii4gpOKZQG\nz5gf\r\n=Pb7y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-ef86f58-1623895548882_1623895615553_0.6022405212889503","host":"s3://npm-registry-packages"}},"1.1.2-canary-ef86f58-1623895567690":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-ef86f58-1623895567690","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-ef86f58-1623895567690","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4210d97d44b0db19529da1d4e7bb313aa869e420","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-ef86f58-1623895567690.tgz","fileCount":7,"integrity":"sha512-Ypv/Vnp87+75myDGR/8qeVxrljArwAh7wdUdOxHDVA+Vw5G/hDoUzfn+5WE2qe8W44zxxj1Xfrbu66/4zqFhBQ==","signatures":[{"sig":"MEYCIQCQcjkIiDzMCF58P3Bfau15X44Z/XtrBd7fNDBaL7l2TAIhAPxxmd5pXhbLN+5NNNiNahyVdmmoCTbdcnGtfaIRXJbB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyq5OCRA9TVsSAnZWagAA6ZUP/1tQhBvKb1xL/DJCu8Op\njq3jgM4Zr+4cycD3yZAn54ij4df1SWdfJor05sKBAODBGFwUoVdOnDf6zc9S\nDDTh9ZGkdNJ5U5dvmoKvg6uJHhEA8MUYz3j/tZ+nZY2zQvxvmLeZFmko2sJs\ntKDxXAg7pEKEkAK5NJZfvY8u5fzepfBVAVgBxMkDkHnWeq0IykLk/gNB0Opk\nUYi5m8PWIuWmU9mo9E8RBszxMxv1N60nCdXO2hO2tPVYyUUHyDbxSxYpN8fD\nU1g6oE9+EKTKqyG3uUkj+9GUIN9XVBraYH588QIoUFEc+EPxvSnp49JIz/2L\nrmueYChyyRsZ2JlH8uJJ51hu2kTlhlDUeAwYFo16+xpw3r0ji3JY6cBJRm+5\nzXAsP9+Hm7grqk7A9G7WKfM+z+a4JzylRYFfobUgZhTmBfR66DkTYhrc7pQ9\nvKICQIhJPNUmVL/Y8per+Jb5QlrK7ISWFXME0Bah/y55AevTa3Vq5KOUEfNz\nSKa5UJYj+9iSp1xVH7zSNIO6+yG6G7z2FJ0c0FkL/NEaNfxz2Yy7sMUG/aTv\nFkVonVBbv8WCHTEPA5iK9sDRcp5+515LgSWDPfGX0teCCTZOZnonIGbTNZ46\n/NWGEiYcGNtEx3jh0lke4aFxLzKmZ9VSpL1RXwaQ20cwfHYDfl5cDvupFf+k\n4Ylw\r\n=3SP1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-ef86f58-1623895567690_1623895630190_0.17482659002435086","host":"s3://npm-registry-packages"}},"1.1.2-canary-6ba0e3f-1623917650185":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-6ba0e3f-1623917650185","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-6ba0e3f-1623917650185","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"200062ab38f022519b331a1165520d44143b3206","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-6ba0e3f-1623917650185.tgz","fileCount":7,"integrity":"sha512-g5K0r1nDqdQY/3IuI0IK1LWffFvKbvqnBGINZkvB0txkaN2kCLbLABtTA85WpX1/fAAz8jE6H5gijcKOs1J0Og==","signatures":[{"sig":"MEUCIHo/IBSL15AHsQD2swnLAnOX3ITjix6tOLn2+oGwpPM1AiEAqxtGb9jBQjKIlJ1zCk6wSG1NXn/tuHMyFX4EWDT9xVM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywSVCRA9TVsSAnZWagAAR7cP/jT5qubhyXrEymeqBVs8\nXbPud3db2eGljwIDs+owG1EUeHv5xGAxpChFau94uO+Mo/CSKIVneluOyRjt\no4y5q4Vij3uX8UA6uUCAdoxY/sW/UvuJq4mnfBU3wJUs/+FKufc0KoM8+tU+\nZEvN1XpZj2f0Ovx0lwGU4+5iEYckv/8B1k/Z4I6Xtz5EF8GT1VWnlbeZ3otb\nKHErZUvjB8ib7UDv4+AfS9X/YkFUJ3KkczYrI2Gzr1oxBvE5RdhDa4eASdxq\nwx3hUC7VWx0xGQ89bTN7xeSUEnKcRzHnMUHvUBdd+NeMGXzPdITEhnkzosOj\n18LHyVoYK36QnKzy9TiJXzhYOKFzkjWs5sDutPjjKKt16EVA8FxeXHwnsTaM\n4nhiXXyYs1Bau6iyKRzmgzq3F2HVDE7TfzuY279+OUVgKyMsKjOs9joigK68\nyPi/yB0GRypeKsSUO9LHxXgBddnDxExqIGqmFiCwMv2nHls6Gkrm+y5VRJvO\nUBbdLZzCF2GuWjDUmOJf7rXMhtwY0BSPUDwonvBGJvqzqjDYL1ZwRDUE2TvO\nrEWQEBYjSWxQD2btpsz6upMF6RcCVQ/haOHmum8OWKxheITPuYxhXmZR5D3N\nlo2uGyIO9nrv+jawp6W3XpOks3EdsU8pBebDuNVw7V1N1wcAusIsUZBMVMgs\nY2TV\r\n=W304\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-6ba0e3f-1623917650185_1623917717304_0.1580403140665403","host":"s3://npm-registry-packages"}},"1.1.2-canary-6ba0e3f-1623917715050":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-6ba0e3f-1623917715050","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-6ba0e3f-1623917715050","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"979886a09e9e085b898d3dc3580586cc3775666c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-6ba0e3f-1623917715050.tgz","fileCount":7,"integrity":"sha512-ktCmqSbWuRk1Cra1Z6yzqhgvvmxqH4+FN/mXzSlaJm6fYXvprgkGtEI+WS2JEvmbPhjef9IT0Zkh1noeCasUTA==","signatures":[{"sig":"MEYCIQC9Qe5JRvk4G7fms6e0vheVusOtQDB+ph2UwfAnf2mSFQIhAOTO+814ASGPMdIrGXLk/7a/tH9aal6V1lfDEdfJI7SB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywTQCRA9TVsSAnZWagAAVDMP/2w9rZGebRSBlrkM/njs\nQgIIAQhrJFaRgXBCh1IehVulCxi2KlmKLUGcSyq0GHVEzJuYvh5/wOcPcmqA\nCPm84Ml6xZTJ/rPLSLOhmxruraafvUtq6DHqDeknU3NgCca+DSHAoPqbD2y4\nOzeQTMFEjtTUN0DqL9nYCjGvNAmVHe3ClXcmaEr2Fv4yVQBm/fHtCFjxPPzN\nvaxDlNWWCtSgHbKKgkaj/6DQYIJoxLYQflR3ZAUA1KrWu3hDdm06I+1n/zdX\nm2imkhHcxW99OVJQH911Od9yephA0DdmIGysDPuwkQeW1QkRv0r7cuARQdUa\nZjAX7njCU0x6Pa4/BEj/TeAtbo7jhRSlf29835yD34bAN+SmKQ1aTKGg5rK9\nE4AHXaPLWJ3yHV6xeWq6fuZAlH6FV1LT0EUfdvLaUhS5LPamam72E3A1j2zu\nIJGR+Rk2t7vGWD83gIl2th29MTAoejIuzMmPgpa47USDgrAbj7didEAFDe3b\ncFnObro+TAdIsRyFz8sh9xgocEck1OAh9xEnzM/P2BzXoHLTkd2RahR94+b1\nBoMA2omFt1doeiLa9isR6LC34LU0G6SmeEBc1wQMDoOd97kXzFHxEEIp9JFf\nVJyF29xr148/UQVunp7kY5VPql+7bTjqCfuyaEnYxy5sY+oJ7QtLki7zjlsd\nB9g0\r\n=UwbP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-6ba0e3f-1623917715050_1623917776052_0.20395557567039946","host":"s3://npm-registry-packages"}},"1.1.2-canary-6ba0e3f-1623917712623":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-6ba0e3f-1623917712623","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-6ba0e3f-1623917712623","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"333858e69ca12a89507daea0e5ac2fd6a5a0ef05","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-6ba0e3f-1623917712623.tgz","fileCount":7,"integrity":"sha512-CubLhbZaXRGqbTSxrUKxSZhEVRz1GgWYo9nEPZREzE7DJx1sOdkP7ip62aT2FtyzLPaGWqpzEE8F3tF5hE8kbg==","signatures":[{"sig":"MEUCIQDWhHB2C1r1bfrsGb2ZYmSXOrkMqF9alCUNevSqIm/gLQIgJDU8RCpU3TB3erNmriQcyOIJXCyOXUrFrg478QgcVBQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywTeCRA9TVsSAnZWagAAXzYP/1oYqp2wcOY6AcY+r7L8\nDc0soGALauUWJcXLJTtWUHwUhzx90oyNIorjMVCBg5VKYsOzyCWQhY9cOF8L\nYa9dtTk5E1+E1cjeM09MbtDPnQD7Qg9+/0XWEXQPR4ghzQXEt8sRaNEPnaOd\n13mgkhCCUx4b+ty3rtRcX/+470PNkWN8BJASN9Mb5UnQBDTmuvJcpdrB/jm7\nCNQk3SDjsk6cKPx5TylZx3hDGvpGHV/93EEQTiVXLG5KCUubh1QkkZWRFls4\njTOvdwMJi1UYDKsXV5YNnPeUDmTidZSlzzz+XUoUNWpuKt1i5fRQL9W1DfCD\nZ10ZM+v8Vbsdkdq7yAU1FQVD98cieRrCk8UsRico0kVhKZkaE5kgwr1Nt2IH\naqA7yUaHTXusewvdpZEkmWMJeWsPrbUOUcctPneVAoBcpSsdc+MuYVLzgkpS\nF5qV2FZA+RttB8s0JCJmtZw86RGgp84EodhshaIYxpt6WjnShqIgxYy7EckG\nNXUHPo90iiJtOLZwv5mFFUEnYlHUtALgQiFDI+x+1phBFdN3/n62lFUf/0/5\nx2vFFpb9FJrDYec8nwYbtalbFuBPS89w37qUbxjQIIh0Z9hLITW4O6xh2bMm\nwggT8m8FDBGqZazkaXWuBL7fgdcDgeB03xSiOTsJe1Bq5Cm/tpPZqwt+d5j/\ny7Xb\r\n=eHII\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-6ba0e3f-1623917712623_1623917789813_0.8628315491052576","host":"s3://npm-registry-packages"}},"1.1.2-canary-e7a5de4-1623917827419":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-e7a5de4-1623917827419","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-e7a5de4-1623917827419","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"49a23303e53f358f84611a0b6de50347049b7ccc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-e7a5de4-1623917827419.tgz","fileCount":7,"integrity":"sha512-tI3QkS490o5BQUOgvqLg1xoyVzpV2HbJyV6vCPr6bIWQvogzi8sbwWuuIhAjyhWin/bHCLRAUk8O6dWtr9qKRA==","signatures":[{"sig":"MEUCIAQtOl9W3zdeR+/m8zGcRbTgQrCX5C+lit+ikuEnj4LRAiEAvUhws7aEZitYCqB1ASbOGaHa2oDYu8k2LmPpj8VcnW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywVHCRA9TVsSAnZWagAAZnEP/2DeYtwXFYaV0/Xe0mH1\n1RuYGxVyrM6kPBM901hYkBENxzW8mfsw5/COg9TY9HzBnjYqs2KeScEJWbzc\nT6dsVhefFl22YxSOBZ5eNC9Bh8A4WxEDnjoaf58CaWpG/J6nNEZyxg7TQTrx\nnBgLxTdRX3i0R8zCpRUilYND0OT289+xMfGqlsXgTh3TaIMum/Izu8OVSOq5\njo98mLCPTC8v8xpGbnDKHeWW2ltwQNhqzvhMpUqlfcrtnaEBpoksPeIS+mkR\nDvFLLHsznqutcOkaxuWBCYGMLa/lEL1/bAiI4DHIfAG0lthoMFQPDTt6R0An\npmEtKIsHh89C3eh4xTMr9CxH8WfGpNjvdGTGefP/x0v2ZX3GMy68SxEA/upM\n2TOOlN2+0IRUqExPo8SHdJ0Q0yRc74KT0/uz8QwiwXrxPVr/9cL3ynqym2bK\nHZKiBpuVuN0UL0Y8RkweYl+L1KSc5SuBB0PrgeI0DPz8dqy8wF+016aEOyTg\nvAXzyoQ+SMCBuWo/cHug2eXZY/jxUWm9uGFO+c762vZ3LtPB9Jj1F49jDlAf\n39ai+tonWT/yu6zAoGcK1V7HswI6gFxOZO1kewa9c0qpu2tXNAP066HYFIxO\n/okEDI/4x01a/eBANvB2xSBXOu3uw2DtV6IitLzsNqNx6aDJmR7w9KPdkyOx\nsTaM\r\n=hzHI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-e7a5de4-1623917827419_1623917895259_0.7882576564593688","host":"s3://npm-registry-packages"}},"1.1.2-canary-e7a5de4-1623917848697":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-e7a5de4-1623917848697","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-e7a5de4-1623917848697","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"304f9dbdce8e8178eb6778c09ed2a9ddb742a115","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-e7a5de4-1623917848697.tgz","fileCount":7,"integrity":"sha512-EQcmERxogAxj+teR5Gw66/sRWiZiyy+m4FwxmcwAnT2rKMxIOuyfw5uyhvbPo4y1TyvWWzJN3YutTAiYttbB7Q==","signatures":[{"sig":"MEUCIAw2wS73x22nLo6mt95Kyx3BmCEParqZwi6kIs+3EkEZAiEA6zQjHOKTDqsrFy3s7ZyxwvGkk86mE6FaKnACg3OtL9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywVXCRA9TVsSAnZWagAAMNQP/RBQ9E4KSdxM66G/UJ19\nq7Wy758xNb7S4C/6cRXvAfSb2QsupWw797HHe7/YjrPDYFm49zfuHZXaG+ZF\ny0nR/UDzerbkppsmjpnNE+SBeGuAYd59ZWxx0XM0udkT/cKybb3sChhd41kS\npgCxth8rfD7l4ErOeaWO0cPAaMvitEILw9C6YxiX+gTevB2XTT//GC9JvM2R\n82Mhzlj5A2EDd8APTZQMoPufbNb1eVxY/VTWIVhV1NHayY0JP1FLItfUgJ2c\ng7wb3BLRyF3vCkql9A/Gf0bOinhurTan7Y8Y8mTBXcT36oRmbAOnJtw8vIFg\nLiMG6pOxGZakndr+5540Vl2hpqwIo10SIdpeaDRX9T1mNZTH2hKlhsKE2Ob/\nWsTQkp+SKI69Pa65J/Mp/zVNFwWdsWut9vejvmXjTa/T4DPWTEEpjsQNcW16\nn4Q16K2nENBUZNIIXXlhHm4MYQ046cKmNIMebxqDq2Jb9HvDcgsb7UHGm6gK\nJ2YIF0dOnJfwoEHFo2ilUkHz+Pz0jMs8N5AmjuHxLPuQ8WtHOMFL6VRiQPrJ\nSAGyR0WySCwC69uzLPa4NrSFFgXFOz0d9sRwYfBuNVzbbMA7IIan6hmVqVks\nINRHzy6sszrqjaXgAVvmggbuPdiWUq3xkON45QNkJIuByMaT5bA7yS/lZcef\ndmsJ\r\n=ifKC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-e7a5de4-1623917848697_1623917911181_0.014160862853836331","host":"s3://npm-registry-packages"}},"1.1.2-canary-5d3f62d-1623918011345":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-5d3f62d-1623918011345","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-5d3f62d-1623918011345","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0b8ed36887a0ac5f2d945b1fffb7ba1a01d04016","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-5d3f62d-1623918011345.tgz","fileCount":7,"integrity":"sha512-1cZjqlWmYmbSY+1QfpsRtWHliwxU6mQJUKpYzFQW+8BND7LqXrUPcicqjG4v0Drl9seVvRB3NVEV+1oo/Qcbiw==","signatures":[{"sig":"MEQCIFyKii5ZPNCgSIPQM2bDA4dtLqHWDm9Rt4oppG50sBQ0AiARzApzOgnGRwvcLaTZUK6nj/778bMCvdPEnkql4TwgzQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywX8CRA9TVsSAnZWagAARSUP/2viVdTJ7ZLmk/6LGpkL\nWQU7Elona5vndCFc1LzXulW6r64ZvPWm8NCCLqM6OFNYAc0VOqZUzF+tS5nQ\nblRaNo6+g0o9CsmTCfxs1Kcy265jsO44BM+3ZW4c3/Gu+Cs0w/fMSp9Po/GC\neeyEmuFPqCbkClDwaSrXKxKWwsXd21OV1K4Yzxy07tV8Kvno9w+xtY6M3xZA\na4L75TTkJz5LbB7gHmz/tLK6GNJR4Usah8b8huHyCv6jAXKAF5fK2ZiKlQPc\nXIkMQSIU1AGfwvu/q83o13p07nSTiWvaAXQUctvLkdYverwqK8d+JjfJYa9O\nOzGu07FhJUbNKRF/FZa4hTX3fTFtVDrJ9ns33ADGf001xd/4P+ydnf418yYj\nTpZJ+SLo0FQooFkzMEl+Rvg47hU/s23sXyatjIG3HcGTxkRr9eaNPNcY97bv\na17NtvoXsw9d1yRQMuCSsngU98HlK2eY5vS5hN8ypoPbToYcaz2d4e70Y9IO\nCYbNc+WB4c0U4Uw6W4bgL343ahwRpveDXW1KvXaD1ywc7Xck/q8a1l2i70Zu\n191F7/lkdcp8kfQb1Jwy7Kez5YFKAl1kvkJWUuyZccgZd5WTp+rG3uuox8d3\n0ymM9/OvMobsyK20Jz1w3kCvL9uZGEK80SWYrxUJN+4VZV77lasHxDOnJw1X\nw+wB\r\n=qDzD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-5d3f62d-1623918011345_1623918076295_0.18740170786935306","host":"s3://npm-registry-packages"}},"1.1.2-canary-eb24f2e-1623918055024":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-eb24f2e-1623918055024","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-eb24f2e-1623918055024","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c671718ac60b5cd929786d79ce654f0eb0147055","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-eb24f2e-1623918055024.tgz","fileCount":7,"integrity":"sha512-o9p9N8L42PxnrMOwvXZ17FkSf64Pa5pao1SKch80tGj8igLXvPUfCVU+bawdn0is3yAoPLdOd8/SxVxJHEk1Wg==","signatures":[{"sig":"MEYCIQDhMb2Rgqx7XMUv3jQ/Cy07vCEv6/FFf2zWCTw6btEXIQIhAJzh6FRRZijy8Wkcej+v9BQp/540/sXqEj+/B0C4kC41","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywY3CRA9TVsSAnZWagAAiVwP/3EBdnXJK7rSYTG9zeZD\n1Ekbi/QQYfnRj/m/86UIah/NyclG0Mc+cb/MU9DJi2a74QKJCLbYiGO0vdlp\nEnT/BsVsUCkKHZe8FThpOfhEWK9IzVC0E8zCeZu5crdOdUfNRAuHW44kdMgT\nWofpglLAGloz0QgfkxLla6jfl/BIuoshOXJtN2gkMaVxZLvukVDeYU68pMjD\nkvNnbrHiKXHe5PLFUOQ1qaS6sA+ElwaXOonawgIbFe/Rv1zT8MFMlxboMV/W\noiWJAT59O0nITD0JJEstG+4YvW1NVO2GrEZOCbjjM//OoHEjXf5N6XQMaVJY\ngNJf6ubGUbFrmIWuzJH0iQfeg/1SWrjNq7Q76loYp9Lv7vXIEA/cGbMAnfqt\nIApfYCy3ViZYB59DCDM4/ndYI3kTdlMj1VuWoSM0KpIZqP7i2OSLNCM3wA6q\nXXvvgScqc8mt8Zdk95IAEZ3rbMl01UQEWGkx3jnvV7b4OsQfXh6UanQTkQt2\nTce8epZiBKRAEJ+jLvVaU6IKdqrWNDgxgwVqGXkIADkMem8BetJAljhbvguc\nsdOYoY9fBjPve3t+XqJ7UoZUA6rn6ykI0O0Cs3+QcJVwhFscjJYhlbOlAcSZ\nBNvcqpSCWRLbe5d9kqmsAqbvSME7fjAxGqZaTNqeai5xkt+yiCH8pTmBL/sa\nluOW\r\n=FKY2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-eb24f2e-1623918055024_1623918135467_0.997182762542483","host":"s3://npm-registry-packages"}},"1.1.2-canary-eb24f2e-1623918082784":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-eb24f2e-1623918082784","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-eb24f2e-1623918082784","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f812bbe8c8e13d9409a28ceff8651c3bc25a105d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-eb24f2e-1623918082784.tgz","fileCount":7,"integrity":"sha512-GGDYkgAzE1Hp+hK1+H8lkZIQOkr2XfxV/fE/S0fkK+Dadq3nOvgHyWQFlz1G+r6EI+rAxyjB3lqSxKZSBhB+Kg==","signatures":[{"sig":"MEYCIQDKy8ANuyhCOF7vzI3RiH+8UbQ3PWs8/sVIBaY8hHVggQIhAN57egqgRcZXBkEjASTkh1z8vUWJjTXIBayMb4QkQpvN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywZaCRA9TVsSAnZWagAADFQP/jCaew1zgKpwgkw/2oH1\naE5oUZ6LFw0GYOYOPz+7pY0gFO8kg4yHLleVcKzzeQPOxSWlmHcPB38bHWtF\nDTAp4DGjYZ9IW5OpGzfjtE/6H17KqfBhKrhO4KMfbBQygzsANsQEGIWWo41r\n2j0HoC1vh1+FQ0zLzFYNXwm9gB9ihMXpJe5eAKFL9q/MlHkf2JqkW8U7OPkA\nP2L1XNJzrmT4fhEgUej9m9hM68yF483KFb6YP7ABb9zHOZckZMIbgjD1GwDl\nhfNeAuiYa6TK/MG0Nwz0pSKJp1uwywZW/hJdWIms5J0lwCobI1imGwHmjm9K\n5ocNiGyjGb7whzZm8Sxmgqu29TmdKrG3R+FxHMjNTJKpVqdK3kRwdfpYv5Gw\ncTQ8szP/9dMp3bQlZD2zi2qhaF/+q26dPu0oIJ5qtcIzqrWdBrECI5+W+IpJ\narKtsk3OwM+o0dY0qzs/i48wVGqSd2MVhVC/s1dwWVSGBOM5rvLkfoql6xDI\n+T+RDh85jiCsS/mm849zzOBybkIyGv3mcVm7wXlQaMSPXCpDJ3UZFFHMEWgn\nHV51qmK1ltClEYjSffwzQz7uOd7VxrP3CXfUV6n+DM+KV26OLfHz1CpVUq4L\n7qA6FPBda67DTjgg7GxAIF3yJ4QAQin626ncGhmu3WIwJ0PgkcGv8WgkP/wR\ntF39\r\n=Evku\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-eb24f2e-1623918082784_1623918169595_0.8701040330132901","host":"s3://npm-registry-packages"}},"1.1.2-canary-4c08875-1623918543146":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4c08875-1623918543146","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4c08875-1623918543146","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"821d2c27792c36e87cf0ae24ebda4851ebb985bb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4c08875-1623918543146.tgz","fileCount":7,"integrity":"sha512-/KiMxrNVcRpL/SjYHSA2OtP17JlsRqQWnPlnoblWzBC5iGET0BDteFDTuYStLsjjiE4taSOpdxvUniM5n428Vw==","signatures":[{"sig":"MEQCIGIi4FoUmHluR2pBgt4tGmJf/yjv/A7YeaXxshFFWErIAiBEeZhgaSe4W5GzgHaAi6/cLhMQ8cIXJHu87DKDbzM57A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywgHCRA9TVsSAnZWagAAWIoP/0TAG0HDHp/JtCOAeCDZ\nkjnhC99Bcjp2iciNLuSzKInAKjOcaTgl7s3d3rC2UczLvTni5JU2WcsdHcFI\nuKuFKK56jRwyr7NeR02MGlS3wqYpXVx5TizS4lJleC3Gwdd0yz6lTTDp1Riu\n5NWRj5wszTL6KdLgLQYwnOYaqPm6DndQ3TNLlZDunaOuPgg/xJuBDCMvmtDG\nCru/8+El8oLrfKv96aE3c9Wa5y9JISCHVd57C9Du0jPwFaYhHs1mO7VUwBxg\njYZ3nXtdSQlQez5M3dwDQd/fxB9isLBZKkYOD6UkSWiS2RvBTqGpqlkP+d7n\n69MYMmdpZ0nPIiqW0E9oxn68fHP6WCFC7KzeGojqG5smOxWKwc23AxEKoUZe\nGk9F0zfzqnwcqNmUeA2002VN73lcqjQTk+knsXaJnegarK+v3yQlxNN7X1vs\nADsVgnH5Oi+/RQPzOyoabB/Hfi9PunYoROVQBNdPyHJZpO+2jDTrsg7IBYQs\nofXQeJdxsj8yjZoFfEFmHGHUPPDBgZXpRrK+TQYL3cRRL1yjGdgsOdqPJEI8\naicihbFJKjCrRVMb9AsF467Pw/G+hqN+m7V7F61U7hbWfBPtYdFlz0MFX3YS\nti/AxkE4UFnc9dcGWKsRwJWnKHNJf9X0ZyFxt+HeapNXnnXrZT0JPcHr/Klz\n0bUQ\r\n=FspZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.2.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4c08875-1623918543146_1623918598789_0.8290521465257741","host":"s3://npm-registry-packages"}},"1.1.2-canary-4c08875-1623918547462":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4c08875-1623918547462","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4c08875-1623918547462","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"96c380cdc059fc489bfa34a5f1a99129dc2ae330","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4c08875-1623918547462.tgz","fileCount":7,"integrity":"sha512-OGQyXSPOAdEWOE1ylGJH8ADdzhVY0AIZ7STAXQzgIeGl7cPUIGuammKjEEZ2w/XHtpOLdSRPzDIhvs8aV6modw==","signatures":[{"sig":"MEUCIFkEx7AGpGP228wIxGxNh1UoYhsmpHx3EA33o2BOZpRBAiEA7iIUg4YltbcAb0BbVv/BiGWKBZffg4lDm9llQuN1yVc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywgRCRA9TVsSAnZWagAAYi8P/1yQhlpqe7m53Mbra2GK\nGjew+AKtEJ/C4xbu5xf1t7AFAf56wLuRQrYvEzk3JMRUfHciw/hKZReK3Plo\nHn4K1lcEuNMsJLlDR81z7MgTU6tR2Wuf4i5ziYYmGNPdK6UehbmsRKSTMcdY\nzYN794Z49BLnqTeG3W2luT6q0Hfqye/JFUmRao/WnlDZV04p2rDbfBD174I4\nZDeIke2zgSAUAWStVe2rhhFo74rrNZzBhnUA/8VPCHiYfd3wUE/CgOwmsp1L\nYf21sVkB3/o+dDILZ3FMrjnEZx9OsXugTkycmJ48zRFPQmJPYfTlZY7dVe8P\nTPDVFAd6YqiddHhcbBqTr5MkFn5JOFdBamdzjVOtztH+NdLyR7iuhmG+He8E\n6MhqEkwoCE74C+dtYruyvL7fld9aMK1LrRDtnwCwpaowplCvP9Pkkh7LeQlk\nX9X7jFvJpDg8mqNTfnBLJWdJVPYfjTbqfwyuiioN6M0AYYUqdV8mtTkyz7k8\nAuyB2//1Ogz1KKZf0gYNlsb/Q4m7S7oUvtZPGLLceJzUHT7ekNAybap9UBcA\njWLUL5Rendo3ltcX3lKm9luPZ4jRBEM4gq3F75UsjToqVBn4yfNXqB7emeAQ\nP057MLQjRJR+k0Zd/dJY5rvOzKlBB+3B+SK87YdLviF2ss+nht7muZ7NBT02\nF4Ay\r\n=WbGE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4c08875-1623918547462_1623918609374_0.8186275899391284","host":"s3://npm-registry-packages"}},"1.1.2-canary-f1361db-1623919075596":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f1361db-1623919075596","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f1361db-1623919075596","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0de3030ce237205e56d82e174f3591aa9c0e1e34","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f1361db-1623919075596.tgz","fileCount":7,"integrity":"sha512-pmmV+gRpfYuK4TxBm4/YTkmqUPZmsjKAJf0OhNVEL9LeIKdQPF+5ecBHuSp/aGXTeSGjuNn5uCAJaNUEB6C/kg==","signatures":[{"sig":"MEUCIFpJpgc6xd9g8nVoX7cU6+1Qua8/4uH3Nd64QANnrbe9AiEAkWOL1sExiP3PYlr7Nh2NKiqTgV7WBI06MbXpXvEdw5M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywojCRA9TVsSAnZWagAASS4P/Rm/UG4ce1YXqAe4gX1o\nwd84mQceMOcq7FJud++WnmKw/dKylYOSBsV9jenPK/AcRQ8XR/R1eYjG/BxR\n9ce9l+APJQu4XzYU3hnqtpki/w6BoFfZttFN96kRqbsmmfIMDaB32du2TlQA\nM7sltzXsppV1NpaHNHh62+6VmIASWpyHIWXx19Jxa27/atTkHNChYl1FWSN3\ndh32Y1+At+/S2M7/3sm6ww4nchwrHTWCsXlYmPpyLERJq+iaI42yaxwu+vJz\nfPCsQbJkA+2hfvrmZEUhVd52LvbQTg+9niVKoAlamlt01xfzkb1ieMfGn4ht\natyZ2dDmffzep4WGha+FIwdn9rxyB+Cx3pxCrbt/DQ0dqPxia4B/h7Vfb1fi\nIoOQsRcSVEpsDaQHn0MZ7eUZ1nGSTCJUOUP691oP+EWF3KdTiWYgr9l5nss7\np2QsdJYpVj7Ho5iwdHg1qG3WWz5t/qxav0dp5N2GXDs18Oqdk4ZvSH8+qjz4\n71eupemmnaDXMJpcOtxWZ9Z2c4qYimO+qC21At4zF8tvm3YOEcV/xZLqLp6x\ndPuQw1QlJ9bpCe6/ZQuNoBKQ2Tmb8nCThV6wsmyi5RDRQH55JMXX60JAj735\nT0uHPTCMQGqXW8UYEF+Z2d3VrbhkJJOf8n5di9xfN7pmg2KO2fVVVe1H0X2B\nzvCI\r\n=sRrV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f1361db-1623919075596_1623919139299_0.693869612350297","host":"s3://npm-registry-packages"}},"1.1.2-canary-f7ec6d9-1623919713420":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f7ec6d9-1623919713420","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f7ec6d9-1623919713420","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c4fc157f09815f2bc8c18ac5925c5e37737abe12","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f7ec6d9-1623919713420.tgz","fileCount":7,"integrity":"sha512-x+IFmpRqXT1nGPXPgyqvGldFO/HDmbKD544AXAricMWb5zIcBq4y45xqE2hRBvTDN0blh1bP6+Av2yi2ijKQ9g==","signatures":[{"sig":"MEUCIAXVna7KeTcPLMz2GyI/l94Dq5sdzq9uwUpnRMbrD6q/AiEAie6h32i8q4c6ogfwc2C3PD38feR49rz/UKZtJtcifEA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgywygCRA9TVsSAnZWagAAsXsP/jy/uGqiJAu7Ri6MpAzE\nUrtidcE9PdYj/1d4e7ngUbHudrtrVnUiLQQVXrTULjIuBwxjSVFz4CqOX0LB\nUAGD6vdo9VIUV9/o7Gi/LSaqeNDqSB/100h4YNIaIXVJ7L+EaOFqx8Q2Qdjz\nBQNBKhzVlLBEodx3+4R4cu3caV0v8zUQa//NFwwy6BZqLOBXz7CHhehbfWzN\nLpqYfprI22WFZmgmZXNwbLZBSQS+XKPC19eQSYUTwDrHu8zpYVj9IOQAicqZ\n3adUjF2rI3D1gWaHeGXoMI0l1iwxH7aV1YmiGYuaNo4rbd33Fryz9PkYtgAj\n8uYkhAjy8ptfgLrjra2a8C7xyK30vroclkojgX5+hbaFhbtsre5F6EFLqDsq\n9RV20d4C4BkHcerRstIGpbqWqRpHCwytmGNV4ElSN00NkNKlV5M8hmvn19L6\nYoECvWPf75jt3yDnU3igMS0U9VH6Q93RW7SH6NVmyYvBXYwjDLa+mnnMBcnM\npR5ooJTMj+UvFrNx2uoiepoUgc3/q8f0nyHBscTtspmVuIoddrsqm7s4x1f1\ndzo7p/q2Gnx7S99jjTyz7JJNA7ZOrAMGnnAc3wtX2PZ9vjoe0/UrzmoYBps9\nJT5XfvzD12T+MUVHfi2FWfVufbz5VxWjz8MyfjXHrZkNU256F0j0fzOfkXRl\nSSg5\r\n=qmvc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f7ec6d9-1623919713420_1623919775757_0.27807251345973283","host":"s3://npm-registry-packages"}},"1.1.2-canary-3552985-1623920555551":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3552985-1623920555551","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3552985-1623920555551","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"40aa811f0cebec8a95105a449c59e4b80f553dcc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3552985-1623920555551.tgz","fileCount":7,"integrity":"sha512-iZelRr5hvwXhJrVGR6sQkd/JH4BojXUdMjE7IknDy2KNzM++dpg0rlxquCvctV+82GqZGqE5QUYeFHT2x/hOqA==","signatures":[{"sig":"MEQCIAqyPc/JJFj+Nzq2dukHqYi4uRNqUUKuz5KrAs/2mvTCAiAA6jcvXnJfkJ2sXVhJ5GDd+rFNg54/DYI9LqDjBWbAAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyw/gCRA9TVsSAnZWagAAczkQAIw9xt8Lxf3MKXL4NYUh\nyJLwsPHNryfhf6vQ3Gew/XMJc+4IM0BeN39TK4J6/v9QNiurg1q6M/SnDPop\n3lvOvTRrFUXiOwo/o5QWZDUguj1MuFCQy3L1xdrTq8H8/sVQRhQZpRC5liJo\niJPCJYfFRa3salylCjIBYKVogYGTblFE4ammmS/zf07kUHxZUCDaoBoo3Ffy\nnTA81GYDJ7Pwe3zmXcQAspn3E7qWHmHy00HZqWWr2b2cA3yhrjTJH6xRDDxy\nMlrtrtZ5RLq9OPQEOaji/WhFQji476qlWUuL1XwC6Q0P2+67wkF0eVBkaCTH\nKuW++Ddacvp9pG29joEVqCR/qK3rVAosfrHYrMvXsqxypd60BcQ1XuqJADib\nJuCYFxjLwI7nY62+3VqBp3cLn/S+btWzFftoeCQyxuv8b9fxiE27dq1u5IHo\nJQuzlJYWI85gSvPDC3ZxHWipkDow47IBfWv4UJUaJEUhQI/y23oiWMnONjlN\nE3P7gwHJFXa5vH31jI+WSxOYyCMooujqDrBXdHIF3oIjDIsf0lBMZ0V2Cm8K\nV2/yYKa6zDXjkNrL3Cb59QTv8zs2CexvKjz1uzbCBZHf39AZLB7w/M/GTYv6\nYGt6oFnbkRIPb2wTKZ5rVt9znKrCun3EuWt7UdZkvvCyct7dAIwK7/EYy8WV\nyDy2\r\n=1bfN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.3","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3552985-1623920555551_1623920607614_0.24621874715680314","host":"s3://npm-registry-packages"}},"1.1.2-canary-3552985-1623981843013":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3552985-1623981843013","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3552985-1623981843013","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ebeb41ea60debf0252c071ac4c685d0b5dc33f20","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3552985-1623981843013.tgz","fileCount":7,"integrity":"sha512-4RCLoYa5rrVWnVjMS1p1tF+UuNdlxCkWfN1M/jmIAh1KOjEjY7aRPxJtlYFpVk5U2OG+IqOVfklOeI5JmCg5Ug==","signatures":[{"sig":"MEQCIDz3yjuKmJpKedMc0/XzJmxzFistnPOWTZhIq9sonbIlAiAQcO2C6WqV9XIHSdd1EZsT2QyBmrEHgb3kJ83JWB1IuA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy/9FCRA9TVsSAnZWagAAhpYQAJkFNDKZQMfKsjVRfdGX\nzX2NixzjXst+oevSBR4vKCmPXLr1HRkZ/epHrOSRk9580m1ax5a8kGIW8X3N\naZNe+7PlWQtJubOQCuTe1ViWEGWVkLU8iK86dUL+4ju86mFJGRAo7By5MEAW\nI67AQffsIYXa84vcJZm/e1zK8rsbtY4NrpE4gDnF6zJExWgKk+1w/M/jRfAR\nH3FL7fYjWxuODzQ84+EDSzrNRVcjmzHpKLwds0JqCTjnJ9GXIy6oBEhp599q\nu+mVP5jgTLHLmgiwEojQM58IEWUbUdkPoWMejLXC5lqHjEBeuRQ+L3KRiSrE\nqi1cW/ddEFluji71Ml0s4pcUXJtqHeYtQGSKI4ZnQ35uulC4YzF4+lrnaNMe\ni/cR5betNpLDePIlDZQUlWJSMnPrOHcoJezDO2omdMHOq4HvDX6g3YmxeK2b\nG8Jr+vS163RAaWg0/BH4BjZRxFimvwB01/mzeOcBIzu8So4zPjLYWSnzMVkb\nXiTbJNtfCsJ+1DHjmnX4rR4hxICZoauusugkwn8v+WGVSVtAOuR6gO8mbFqh\nRfxOzk1b64/W621sT0YLEi/PqmNNKUFXzsJKRyDlfFWnwUf+BPpeD4KlW+7a\nSz/9sS1A7VfPjWXzxjGu0GetHMZGr6rC52Btjpgj957/HIv4DVp+imtpCj7k\ndTmc\r\n=YD4o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3552985-1623981843013_1623981892595_0.46972460994153287","host":"s3://npm-registry-packages"}},"1.1.2-canary-3552985-1623981844649":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-3552985-1623981844649","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-3552985-1623981844649","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e985e66906aeafc39345d2d52d16fee373e2eb7a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-3552985-1623981844649.tgz","fileCount":7,"integrity":"sha512-d8P/R61L6I5rY6SvoSvoW611htz9HdMd/SCcttBpSNzt1sQnS215rZYxih233ItBGgewEGvRf9Zlg/6kmxPQQA==","signatures":[{"sig":"MEUCIA2yYW/xIP71luUMdzGJ0npvIoHFFH1M6hTn/rqNEpz3AiEA75PSTvmQYnZDpli5qBfYJCCuQxV0IZZ6Tj2YPRUajDQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy/9NCRA9TVsSAnZWagAAgDgP/RsJz81h0JIWAO0cbRrF\nx5Fcn4tjKifDtHlf4Ra74hArrbWt3l/hrJUP6yI5YF2HSwjV9Z7QXZpgXpI5\n71pZlbY3DIKWxTxXrn9lh0hoRekm5T3+moBPtXgyTuBXGvY8I3i/C8qKJIrt\n8WnIfSucL5W3rTgA8H9w/0yEm23PLFWKqyYoDBfahLk2HlmGA8iPyaMRED7B\nVyR0MORF7BGDFqWJtF1vzx92s2eOwMQ/xq7YdYJH113xHxuKRWfOKBlGRqV0\n4c1iHrGpUSZtp0tGvraJ88CQ7LnsFCixK0KQlPGoTj1brdpV9w3YpvxTupan\nukwWgn/54j5XlhTPhyLUXfHz5BOG28u3YEwqNNxY42eUX+fe6LOO34FB+pZj\nH95lSZZGYM8V4sN2iuwN+wslPBP9zbLjrwkoXK4WJeWdLtw7snz1J659ESeg\nRLVDlUpor79pMZ8Zp8UeXpm2Mm/bHiENUaCRjCOVD/5CaGJn4cT5j8KaZFXd\nl70qCL0AHwX4r+hD8/4EcHsiQqcDvMF2rAIdYr8+aj12Z56NQGCEjwCGwf4l\n8AckySMiYg1PglO3TeqOGSAIQQCKWtaW8Q4p7EQFTeVRwfWPC0MurB+xJBgf\nkL+dkkjzxijNgXqEpjpXTFJn3Pimc19BoQljgQrqyL2IKkVF+y/vW53aLjv1\ntZ4n\r\n=V5tO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-3552985-1623981844649_1623981901002_0.19548194562015975","host":"s3://npm-registry-packages"}},"1.1.2-canary-9a2b0af-1624002511996":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-9a2b0af-1624002511996","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-9a2b0af-1624002511996","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a7c0410bd1921182a2bf252a6605d5e743f28f14","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-9a2b0af-1624002511996.tgz","fileCount":7,"integrity":"sha512-BdRAKCRgttXJY/Qu/jOIX1pQL1xYo+Sh5cghvkYx4Mm3VIBtlNaFBqwPQNkXE2bVNwBL7c3vL0zpzwRgj3/e+g==","signatures":[{"sig":"MEQCIAjkNVfeiSiwf+6CUVh5Py2gv2Y4roRwD6H67WI2av0qAiBxzDFdZzUOzXAD2lE28ZDRYxGRbMEoUfsw1P3F6GPteA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzFACCRA9TVsSAnZWagAAW50QAJziSHgLP+EU99CLeevi\n6NQsDmT/qvCC9gTfNuZJQ4VeBxRJ4mSj3htVC0psKtgG0GAfUtOIXncVy4zd\nPY9WrRSAcQv+PbrhehPajDXt24ME+Kg2vlfeT/nw+lmwzWyEbcfu4Y5pESqR\nAWn9RmEfUVjDitlWDKhtx0lZwUw1WJm8Ple6MsWjgMVPfgW5GiS5Q2t4DIez\nHtAU3fCgUcdP5sFZV6FA0AiblZvy2GXmCjHBwg9xJTztSBI52RTmclCRmDxe\nyQCiu/kpLBSU6+Ci2bjv+gMPqWw48ZZzxVBB01abMdMVZKyS04ClxERGJRAf\nK4P8g6Jc1G4SwYIk9fRqm1H45TUSz75p2aI+pdwOJTP0/pBAhHUE8DDRyJxg\ngW7/8AEWdrg+Kw1SmLOzeDmtyi3n1ZyniSvYdiXA0jPjb/UPYtUwp89BWq5q\nmTPdO1+Qz2zAHM6reF07iisqhk0MWinzTNZdN/d/CB3I7xPpXHhFk0X7YZd2\nwHa+vBhP2HoujIYPkjYTMphk/2hGjosnz59NGLpStjheEtGT8TH/b0uwdDc6\nNP6Zgjdgbb8S0kwxE+Y6U5o5HNychVjKYx7RyS3EwV6MvoB6JszkW75itR5v\nlDcBLrkQgrE4jpTV+I5XputOPpOz3dI5zSoZgsGWS+6UrobF6xC832OPyRLW\nJ0eS\r\n=yCT2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-9a2b0af-1624002511996_1624002561908_0.513977273972549","host":"s3://npm-registry-packages"}},"1.1.2-canary-b6b0a89-1624241016655":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-b6b0a89-1624241016655","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-b6b0a89-1624241016655","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"42e5cb2d837bef210a556761455c7b04f6292328","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-b6b0a89-1624241016655.tgz","fileCount":7,"integrity":"sha512-nSvCzHLnstwDFP/kVAagorUaAi5Z5i7oDatzdeBPhPJnUUQuNcwyPjJyS6X52N6DCWDKD4BhW4ARx+Mj+sjG8A==","signatures":[{"sig":"MEYCIQD+vsxOatnagdlbOES9VEFvN0/pg+llK2Xc4sF5g2Vu1wIhAKvYzAL6U9oYUnPWyR6LfgRBpskCEITxcV1Urr9dQoRB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgz/O3CRA9TVsSAnZWagAAe34QAJBeeOdpMVxvuDaX/RAh\n9z1wvc31fpGZNf3SSDOYWbzhd1idDtw8575IFQDAxjsOb5EvGyaH6RSINSOz\nTyKxty+F3TAi/e7LhIBVJahcFaiYkvGnNuY0iq1vUNthj41ufvXe786L9heH\nlpCazigMIKDNJBJu4J/j9uIJ43XuV37zMZ7x7juq9QLv//Wno5VWroWiQEnS\nT6kX9sq0N64FgIYlLClWL2cVxtAa54JI5uncxZBe7cyE855NL4NsZWuosBtE\nM5pSB/9XRquYAMx/mZDPPBLx2XsS9cGL3rtuNZ4kHGxXOOayBolxtjrbk+k/\nteWNQy1HeGmYWoJVgDPV0RzF6SFTbkOh63cJA+f63KwI3WFYVsbsr1UPj6u4\nI7N1NkomyoWpQ1xmXtRXIkEyvHDMiv27zNxseaXgiuEwbsgRpa8bC8YoHufa\nFAWOLRnOSJNaSHtGi3uIrHIcqY3JdBlUSkjS2QpsbGKqtOX72Xm9FkKP9cag\ntbdjrzJMuHrPupHFL1N/j1uOhABwYPKFhX+awPDB4kKRr+moIBc6tSe7h2V/\nIFXKRyATX10VzQvCBNCQlfIJH+Gnt/OzSivXFySVNuwZ2lHTwiyeaFKsA0Ja\nFoHOdoYf8GdpoK9I/WYsAO02vGRj5dilL16NHT+ls9jGSDyOdByTkjxsmktB\nlDSz\r\n=BnUt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-b6b0a89-1624241016655_1624241079211_0.2335271556644969","host":"s3://npm-registry-packages"}},"1.1.2-canary-b6b0a89-1624241033452":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-b6b0a89-1624241033452","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-b6b0a89-1624241033452","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9611ea9ad98422846e5ffbe4a73de411265d49be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-b6b0a89-1624241033452.tgz","fileCount":7,"integrity":"sha512-XkP/qzsYwb0wkI4L8J11qeV02uJ+vAGqOLE1IgKlZNEAaIIsS9b8kSKzAbQBsFbFct2a+lCWAfN69LC41LEmhQ==","signatures":[{"sig":"MEQCICy6yp5KT5EJwzUU7WIqwoUwfly9TYC/c7fn4oz91wNSAiAhC7d4/tDWt8AitHk8hrtNS4+6LvCxmlsxy4qS/bUBKQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgz/PBCRA9TVsSAnZWagAAv+0P/074znfyE9GFvYTeWjGp\nOw1bbb3OswzWC2Cm9+BQhzp9Qa6M4c8N3RUhZotJcGL1tetKe7aa7b1uEZQH\ndIfMokMKcUCDTUtv+nkI+l6tyeRjRz3RI8r504pYyhsZiw84rVtsg9ChGe1l\nk+Y8bXVb3zfGnoMGyCiRCbyyOcV+Skjjgu9tnfvUNF9+1q8K8kQZrzOWhL+a\ncWesBa0LKGIguW9+oUaoUuhTzsaEIm0UgcOhoEsiF7W93l4LoXhkSate065K\nm6/HTWWFCB0x6LePLfBnpHdTwceNui2mgWCk2yVJH5AWEzJxPrLSCMZU/TxI\n4rbj0M2WA+JBoO78qUX/2eSd5W0SkSAz+Fxao6nnnc6FmdgARfUsEnV9jjAu\n9Ns4SNaJjxPVqV3iuHjwdmY7mpjz6y9WQdDddN9AWjmm//hteTfvcD96kjhR\ndD6M5XWlg6QNWz1RBMcf0UARTApJJTc2poYpQihiRW+dgEWfZ38z9+g8zdzM\nMkNifOg2aSQcYNjVSBrFTe4njMBOhLkGwRSeQ8nd7CmIdlLTP0Y84ftD53l5\nRlQld9W98q78busLzLdXNUhhIy8SIGy+TSSYA8M8itkdDJ1mqPg6IMC2S2Ig\n0AL3an5rxxVm2U3svlFLOtRHPLL5WbGPQi3ZDAWS+qZmO4eNpVxRGjrgKnKQ\nRX0E\r\n=76N1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-b6b0a89-1624241033452_1624241088647_0.8978623737750795","host":"s3://npm-registry-packages"}},"1.1.2-canary-5c0017d-1624262569839":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-5c0017d-1624262569839","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-5c0017d-1624262569839","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"409954945726666109738e4e0b070367c87505df","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-5c0017d-1624262569839.tgz","fileCount":7,"integrity":"sha512-acQjexUxsKr0a6yWjJdLnUyXl2YvROSNxbLbdLJNvHjl6dort4rYGM8P4H0M0bdX67QGwsVvK+W6Q2mnlKSsdg==","signatures":[{"sig":"MEYCIQCF6yE8o4xkRrxpDeVG6CosmsQxSozsX5+FhUhrJF1qlwIhAKaeeCE1YAkTG3zF60kN8Cr0/hLcsWuLcxoz2N8O25Cj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0EfoCRA9TVsSAnZWagAA/gsP/0SYVDm+E5fCFUPlLMMg\nkgTYy782K21JXfG5FVLa0YDYNJze3768q1uF6n2COA9evIt/98wy/Z6pD5uD\n8d5KpUHU8M2rqybc0pjXS+0f0ZU9wNpVGkEIbCZ3ixyacBtwFpCXMqT/jmnq\nQMH6c7tULuM7pSj1+Sx1i1/NIwOBlP2dPp3YntC7Lk59ZF34UhRqGFud2P/c\nDXBtJDN5e18vNQVX9Edckc5UnmAtfBfRlUdtnRFwdjoz0AR6+TN48t77KyLC\nib+QpA9OdIkySfcIG4rImcr8bGa+V/WZaD/8r9fDTgYgcAV7MdAi2PH4RVuq\noapEkzKlB1aua78WzkXOwUsP5X/P8mTLfWkFO22+pUsJI5aJkcvWjlXZ1hAu\npbrBYBAJY07X/O88YeGjA5Wvl5o29054p6CXsl6ojdzdGHGuGltXsjtS3p4Y\nTD31f2EriHX/BO1JQesroKd6O6+9paIRYB83dI7Ry3CvfBUgX5A2kXlHXPX8\nmw2Nqm2ewRnMfXRB0ccxecr0l6h+5XaAu4OE/tcvim+MMI4lWyn0Zbo9UViB\nuY0BvGXHWkJvW2ziR7NeHFSE9b6RmMi9NePdCES5seUR36/WEVKDx8Mlmu2r\nWY4cMOClUZU7f/9NMajcrWEkbdfJqM0T97bqj620YFd8aA6AKiEp4iExcKc0\niykS\r\n=X7k2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-5c0017d-1624262569839_1624262631479_0.7521224452274","host":"s3://npm-registry-packages"}},"1.1.2-canary-6721d52-1624262712833":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-6721d52-1624262712833","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-6721d52-1624262712833","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a1444c789e166ef9457b85336b18e9640abd1cee","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-6721d52-1624262712833.tgz","fileCount":7,"integrity":"sha512-JhuQqyxzC3KHiNQT/SElWFXlHi/WTOLKTibS0hfxwMJgWK1bqHHkpDxFu+L/L084gOAV+V8/rD8nSq11u1cJMA==","signatures":[{"sig":"MEQCICWNFYArnXK1C5YBGbFPwXhpyqJTnqqLu9vfaHNuoXQQAiAa8xHfbBq+/Iqx8dfUQ3rjKy1tkoZSrzbQtzCEWgz7EA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0EhzCRA9TVsSAnZWagAA/dcQAIZnw0BgGyS5JIOoxlpG\nXkOSd5/42SaPcXVxT2OsqumKHEOU4Pa5Ks2EwBeRpWgR/LS1wxFLwOXE0Jal\nyGRbX9mUc0M6HvMFz0fk7A294ifueOxKwvBruFmwaGSS2S/PAKQSNbdBLxKC\nW/yx/pVUgfUG0zyOCtns55U97vDxccEb/jm4dYMXUOg9JiNh7O+WV/jHS5xq\nCk/MwBfJjC8Ha+u+RMPFUuXC6sYrvUyou7ayFpcprhoXahy/bn28mNxnPvET\neeigOLoUXgpvVtFpdhJe2m45caFTgEMHak2aDQmNEN6qkqE9/Gb12ZA5J8b7\nJ4apXhz1dOMM0TgqiPMMkmZuxa93kMdL1ujRGHSrf1kMMXsh0ULfCufZKKyZ\ntq2/8hmait+yxlilJN2OXf78swuMo+7Gjkcx6AzD8wPqILWjVbuqbLKkt8D0\nW6jc3fzJAwtglykMXxeJz4t9IwbUvf/7VM+6tMCGoKPsg+Spn5Sfmpt/4uov\n5u30chECH7GBVARzRj926yBr9y1Cv2SyVCwwnA0PC2g6cGtwa53RMmI4YZHg\neVNCCYUm3G7qmg7Bz96+3EJyzQizE3FggvMxR25+OJv6rBk2my28xP9abxvN\nSNwZbExjZ6Gu+/9AIxX/YfSltUfAuBxYuz/De6qfaajRUgUCu8Mpxey54+Fq\nRfbd\r\n=8M25\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-6721d52-1624262712833_1624262771166_0.20118694631059952","host":"s3://npm-registry-packages"}},"1.1.2-canary-6721d52-1624262732273":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-6721d52-1624262732273","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-6721d52-1624262732273","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a592657b4f9e54f1e043d7e9c9bfe8cab485d7e8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-6721d52-1624262732273.tgz","fileCount":7,"integrity":"sha512-qa5FFQiHg1JOeJxChcfGbukLFAxvr2UkTfSfnkBqR7Ylle4GKtEIAKOGlAkDrJ/g0FwwNtZC5yxe6rDBXmicpw==","signatures":[{"sig":"MEUCIAn4ETqhDLfLzDil2CDJCXtmWIPyxiF+uxPZdAu6Pk9zAiEApj6CGxLHaMVhmlXH+wjz7VwyZGckdGP0L6CbjFsotW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0EiBCRA9TVsSAnZWagAA+A4QAIXSxF6wIB69F+xlf2lK\nVVN99jWKkVihdJqc33fpXZBY3puSGR/lOxCy+Z7t52brD1sjwcYRLCfikoN6\nAsodWIOUIb5wcn/KnCHYhztvdO9rVxatzlkoDZG77+tsRnuDw9vu3twicJkM\nAG3HOtUaz8c+Auw6lLZPXyEybhBRbQnUxPr7OvRtwdIDSkFW3483iqNOLozU\n9EErYU2XoKRn1DZ23kA3gjufWvTcph7swE+uBE+JhfwlvlO5Jw6xkzEkBsEz\nlQmPQ81XxzppXt+QMusBpzxKKY3FaxeTQ8fbChupJOb/pOwGU1U4bIAwSZX1\nKSPOWXvBcMMWRB8bE7DfstYydpTw6cd74ZAwyLrZpkG3v+lYWOwg2jlCjTEI\n1rCShxYHzAP7ZVeQkcVH30k8Jb+uuOltyo6Gp02tYAbCpUgpWyte5arSqCz2\nmbpgIb2drVjryDtpGeSdugr2nuAFHtJZe/7ZtMxGKlcN3mUnMwr8Dkl4lizb\n2+vKRmUpBp98XvY70g6xLWyB7IsMX9uKmrDO7ccv9DLtNMe1LcgVxGV6Lc+W\nPotgtNjsgTs2uhc+GoxnX5yMj6BElsbjp4GU0hPUD9sCrOi+i3S9p5nUYUz0\nUp2otLWSETXQS7AXOmWvoo2MSgrvT4c3oZTI5b27FfF4aNw8rxLfA/6u1MwZ\nnkd5\r\n=mstg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-6721d52-1624262732273_1624262785151_0.7263628286752815","host":"s3://npm-registry-packages"}},"1.1.2-canary-2cb6b9b-1624262813208":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-2cb6b9b-1624262813208","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-2cb6b9b-1624262813208","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a314fc6d816006dd6bd2f00fd5683a6815d4ee86","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-2cb6b9b-1624262813208.tgz","fileCount":7,"integrity":"sha512-QmJqRV5o/IGiCvCH1UK6CZnMj7yw9YGJTfpURSArPPj12jxVbsKWvlcS/Xp413guMytq9r4swfeYNe2lgZccTQ==","signatures":[{"sig":"MEYCIQC0U/1VDZJkm7Ti/mjIhR8OMDQD0CuPjswJIQqsRFNvLwIhAJfez7lCD5ixBKbmk4gsv5PrhCfQo54RO1PCtrSND8Ni","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0EjPCRA9TVsSAnZWagAA1oEP/jJT2idfau6HNhGikI5J\n4zOe5sm8mQHnW5G7xOWHsdM3MdBHuNclW9ratrlWL3y5WDqXtfUeNEjW4nkC\n6iL/kJ7m8gBdhgyRVCXurGANXMzKmpaXWedkj2uID7z9G9ahXrdoVtz9k31d\n1arxUaR8OKv4MDleIjuZcFTB1DmV3dxlyxSyWgRUAfgJ9THZFwPm2jws9FKA\nFs3WVusfXJgjWb9AKHRQIF+34jq5Gr0O1pTPwRV1RkN0cDEnhme/pwvPFgUf\nBf3uMRJeMGEeYxfEUAG6gjBbqSxpkVOY23iv4zUlSfmgcWBoWh96Qoje9Rwi\noKTdWK/c2HsWWayFG2p1MLVKAsrImuKM7EHAkv0RqsVZoJFxIz6NiIHZvGm5\nkzEWPiF+W4bA4gKVXSnxJXTMmUOwRdLvaUL5GnNWJKeyjDZWaDChsTqIV9zT\nhDdcTqbh1g7nyRUojQDOGoMEpX5u/pt812Z99rD677Yn6cXYLNs5KWAha4Qd\nOahHfppwdF956fxqIY3wB1wGAyCyhZMVRhrPW1wjbproqpjI1mpxgdzHTq+i\n67pQfWYVrgHgOEiedZdm+uoe2Zoa2UN9t1Y0rRD4g+AB51fjsyARRxbv/EHV\ndrSGLJs1P1EDx8Ov74DOnAziNGfa/YLizKnjqFbhjp6MXYBWrwZGXfEVs2c/\nUREF\r\n=LIDX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-2cb6b9b-1624262813208_1624262863465_0.6440060803913517","host":"s3://npm-registry-packages"}},"1.1.2-canary-2cb6b9b-1624262944085":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-2cb6b9b-1624262944085","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-2cb6b9b-1624262944085","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1063300d3a8de75ab89c5cbae8c087be7baa58e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-2cb6b9b-1624262944085.tgz","fileCount":7,"integrity":"sha512-PjcOLaDuYof8ePqyESxG/JQvYNsCUqTV12Q6kyfGaReWS1jsRSPdMA8LlwDt+qjAo6wPMTJav67Fpcqz+Uj+dg==","signatures":[{"sig":"MEYCIQDYPMKYWEwtW5DB3B4FHbDXUuq/nDB/KEDqdoiSoVy/VwIhALWRFS0Mm8WMkhSgZWo9OjdWeafp6FHaMpz0Rt6bYdDq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0ElcCRA9TVsSAnZWagAAWiEP/36xnqZ0IfEPeqxKtVhi\nZG6hRT7JwH0RgGpWNmU7J0k0d+EMSk6j9hE+tAL6WfhQRr6+VbEP3cDXmgBW\numgQlollHkHUyvM/WnwvtvLj1TU+BhaJhJzyfQtZu3J+QJzpZIP8V4kTFKwg\nByhvlpub5XuHSqM8j8LJGmtv28mJ/v34X6sJi0toa9bR9Ftf/xxxpZfpOHe/\nDkBUrhNyD/svxWxWicyDYdxTwp8/K4dwKQlElWX5m3wf7qgA8MrekHyKKO0B\nm6Vc6bPlF8taeReFRqP7BsYFLkrwZ3Ouic6/2x7dtBMWVM7dc4NdCzk6L7+r\n/pvEapG4HJx2IAYYMs0uvQ5gBtAoIMLpK0n+PvZJPVSMyy0tUO9XlAc9gLMu\nv/MuGEnqEmBVsn3RdXHgYHs6llPxdkCAD6mstJ828owHVIfX8FpQWIjtpJ9J\nS3k5GCicdcqX/PBM56Wh2HEVrMIRKbcZGJazBzIOC2Z/+1PPvJDh0xBfP16G\n51MT+xBtf7vJPRBoFQX5HpmhESRNb0yKYO6dFwxhSUQrbdLf19sjBF5X5p0r\n5hUxwbHV6x3+99v8Ysal9qMUlwCxuNNO/ZQVM0RNsQO8vFMn6yR1ULAfdqPH\noxHVXkO7Jp1/aywSQVO8D/4z6EH06iQxE9oxwbN2zfSAouhTOuR2okgQBN9G\noRuS\r\n=pyrT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-2cb6b9b-1624262944085_1624263003969_0.9916773187789749","host":"s3://npm-registry-packages"}},"1.1.2-canary-2cb6b9b-1624262983181":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-2cb6b9b-1624262983181","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-2cb6b9b-1624262983181","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b0d776d29e5cdda0251c49378567fcf84cae0d04","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-2cb6b9b-1624262983181.tgz","fileCount":7,"integrity":"sha512-ZyUB/7tq8EDeaoLTy5X5SD5SEPFJ6wJ263Y5vzgNYW9oi+jKllyo1q4EDI4Zyw4pupJK9OAnpgkOB8/pOr55/Q==","signatures":[{"sig":"MEUCIE0kJ3d9rcaucKjKaY3skfbh92uc3/DpdexuzMKMlfuzAiEAgs7Vx5SqZRQ+4ezq7ao6vW33cZtEU7I3X/p7465NxSo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0El1CRA9TVsSAnZWagAA+kwP/32Zty7vrRflJnBOYt0R\nFrup8Q//MMqlBu/9AERs4ApZyGRzlSgIeC6t3LCreNn6UoUQzcpGKUhWJshJ\nfLe+BiiA7Etj0rQp5+2qnifyzukReWoV8b3DmBrBNlDiA1QHcYc9WJD+l/EK\n0NJF7aOMYloyZnAbqqh+aHl+Zywwn+GuzKQk3OhaLt3TV+u5Fosn4OfOfS55\nd8/i5eY4klMtxBg2Nnp4p3IP8HqfL/UdvimnaDEeEAfRTOFDkwkBUMkYsSd7\nD8MtVhjFi4vqRm3ABWgF4tDzqpmXLy5qdPQi+DGZiR0GhktucMdPUkNTjUdn\n/fJUTDL7VvX627AzCOQOr0yFUm3RSj5i/Ww6qIhcOzob9KtSP9xKYENfzT0O\n14SwFs9Nz/acjh80TCIsht6H64+f8wLke/8sW1VemC7UXun7L1TEWibserLP\nx6idhxeJlrH4tsv4wDbGgpIx9kArlarY/2Fj0G7/a2bCnuptc0drhKVu2zW6\n8rfdGEHPHCX58UJKXW/7kJ7TXUHe8EBMijBYwzBVMRdqIz6gORtW9L5PkHUF\nwRrqPrftbUAZXSIsn37N0fv+rnqmYuo0zzUf0MNPiGl9BFGn/gX09ntvfG5s\nl1yGhV8qZVwwm5GZPaRNXUO1gMAgK/L3Vhqvi1+3M/oVowFw7PmdW00aa7jF\nea4o\r\n=X595\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-2cb6b9b-1624262983181_1624263028965_0.23980195422715278","host":"s3://npm-registry-packages"}},"1.1.2-canary-31aa68f-1624263358038":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-31aa68f-1624263358038","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-31aa68f-1624263358038","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3ce62ab0d169348c7c4e067d07db693c16d771bf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-31aa68f-1624263358038.tgz","fileCount":7,"integrity":"sha512-Pj1WSZOCHSxuOV6einTC8eNMgBsag2jAkyN1g9+KGiYGUZKYETSNWe2imaTicveIAQotgZEWIXkmf8Vv2OgNkw==","signatures":[{"sig":"MEQCIEoOEEBSa1Poo8ZzLSdUuDGBrIu6RqmATNclM3klEWEXAiAJvSBQL90e9ALIsEWpFFPl6Emrt8RaMVvYq+CW2EJCFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0Er2CRA9TVsSAnZWagAA1IsQAJWWmdSNS+Bv5HqhHMcN\nobicAP14atewtJ+5ganibstUV90lv9QHRtmIUjy55s8P8h7DE7yaxX5b1rjF\nGP73SJ8dWOD3s8BiZFvEjKKB+8UpOwfWvEZOxFSNYcEQm7GEy+peIcdYp8TA\n7gOauVi51ihRXk9jaYt423CCI79lDgauGSmKsTh+DwsUy28ltkw9gIvzjpfi\nlC7o8AMOpcMTL54jgQpKEo32FLyH9QXNlkWGwuGfpI2y5yKiz/ZMMVI+XWqH\nG4laLE4Eu/WI306DlyXhN8Vu0EAPEDwoC7vfkLnd1Ln4VRdDKMdqlmuQUS59\nIdJKHhuaZAzl9ZNo3sHQoUBaB1w+i6J5ff5eb2n5gvYEfWEL4WB6GD4NS3AJ\nmUOSGDPco35/Fn14GgvUZ494y09bTcsiwIHX7er0VeizYiQUfkb3xEBL0RvO\nqtNzr1RD/SvmnyW6oQy7T2q2/y2fltrQ9PuRM4BrJuRJWrEFx/NSm+nXthMF\nxindaqyAEgqCdzOsbddEzIEM44EAFD0DY7ecW/Woki/yy+jgOLIRGu4HIGGp\nqsSCjq5ZaHmnV9nkBp96ivwcoUx8+BTDEYoS0L9iZVFMgg9BMhz8Snft60xC\nW7OUqFzlo/IfeR2dgXP4doI+Ist5mAthD8EtHKluzhhmWmRt0uVAJo4aKNik\nmk0U\r\n=ixkC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-31aa68f-1624263358038_1624263414109_0.2262411856511377","host":"s3://npm-registry-packages"}},"1.1.2-canary-31aa68f-1624263489514":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-31aa68f-1624263489514","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-31aa68f-1624263489514","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"92184b61e9286ef53349c1d0f110b34a1e6ab113","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-31aa68f-1624263489514.tgz","fileCount":7,"integrity":"sha512-jvhRmCifXA6QYJwLdBlma4j1uOlGGYwGso8F5LkmFzdDjpFHl4DdSTQG2oPxHCqgjHJ51gJ8/H5mQvAGM2SeiQ==","signatures":[{"sig":"MEUCIAE0pcnq2Ka+GgknwnneEOmpjxGoQ88p79wcrghzxRGMAiEA3li24S/W8ywMmMDu0kAFr1rm9ml5Sqb+FkqGKk7m2IQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0EuACRA9TVsSAnZWagAAbkoP/RzBI+VMEbB5f4JNP8+q\n8TODeh0Onl0llNydvc3b9t+Ws8Q8GyqsCLOrS7u0dL21h7OiLwTDeqp8b1FS\ndbLw8M0LfRDuUSh9bfR1tyuOJzup3PgaYDePjuPcdByIiLhg9HTw4xdi6LUJ\nC5lj+4VbiiVlFT4XrDhrsSN4roScw4AEZzMRNqDP0zdagV04Dxqx0ByNchpx\nvAIgatEJKeAXCn5DRnrHLbPSFgwnADv4mHzwZguReJTiZVMSIOtOsFvv1qjw\nT4ysKbK6kabngALiIyrfCIuQRHyJoZt+YAkxoMWZ2h2pqdeMgrlOESqpgwfm\n7yPVE/ik4yLFuiH/gYU2tK22MjFafNm17Cr7qDyLzCiBmdhgIpg3s0f1hxnq\nDlIkONAsUVqK2VIsMdO48RlswrCm7ke2TncxC8VTyJ7EjCKkYrbOLwzTqvB/\nOXPwzS9aWiNFd8qrbDrlk0CiRbGh+6wviUNbI3BMOnZ7fInjoAnNBd+eF676\nT8IBAdsUfrVWDcGehtD/WDQ6e6j18A2PUMzEQHhvBkLZwtPQ7KkM8KFAsvrY\nKdhDEwrjZIY3Ka7Z/w6r5dJ7XLzp1bu02G1TDZonyQc+zfzHmi1p9LCkCb4g\n1tt3FOT46mI7Z4x/AfsKmWO0PVClc0mc5qKCpIy89v9b8bO6RG2iItUtG+em\n2YNC\r\n=Qm1E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-31aa68f-1624263489514_1624263552457_0.08557012351066318","host":"s3://npm-registry-packages"}},"1.1.2-canary-5d80fe7-1624263865742":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-5d80fe7-1624263865742","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-5d80fe7-1624263865742","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d392daf346162889d16bff5e328d78ee9e3441b7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-5d80fe7-1624263865742.tgz","fileCount":7,"integrity":"sha512-wHOafTNnq5XoivEYG2VTFopa9sBV4i2UxU6eaM64blkJKiLMUOBSgl0rO2QMTRQHN4SBSc2UzpHxJ5DB1MvKlg==","signatures":[{"sig":"MEUCIQCTh5yAlfvn273FS34fHGePInM1Z/SeLwgV7A8PeBwQHAIgEr+JKQ5oLY7ei2K8x6Bn34BkrqY3TPd8id9s2slPJQ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0EzsCRA9TVsSAnZWagAAbpEQAJ2tUHtsQDD72J5PWOJB\nyKe8iWXRaQDjxgskNn5nGl8GgddmOUv30yMibj8D3FVyYaBxatbpXwcaRM37\nlLvGFAwEHavgOMmJ0xBp0vD4nZM67Cc0mwsktMoRJGCVVDi09thotHXu/N9F\nH5rCy6nLfMq3gy0XfU9h4FOcpYzR5HmjoP9ewSC46cOM+f7ppqVfe7dxLoVE\noQWLt/sGQ7Kvw1/9FO31EU3iqvgCqiePeQW8z+2FPM+EPmorKjp7ThayFwT1\nCFzM7GpvxH5PjVuBCosn0p7IQv7guINC+S3SX8skw8fAssX+OXpHPT2EGTl5\nyPwLKGzKZT2enbj2Q+W436ch0lH1uwo02ed6VoJL6lBvtREDmFLecenkAZMq\n2isUqELPgnuTbnwaYWWEcvT9Xw51PpRUoi3uUg5WWE3sdH47JOt7ARgtYvco\nhDMtRPyK2q2GqeNUMlIPv7fZTWgeTXnOteDG4hPJpl4RwKe3OX5tDQWJQdvL\nbexKpmDbBrlgopBmQu0+sAaSV6OkgJ9+UnZxcGltxCKI0g80vVnVZn6314pi\nWr5/UG4ot2JzMbHNm/54cg3C0nde4QxovSPsNERmuwRjLCi2pC1lveeeY39D\nQ+EjR9BoWPkR9yKkmLfKVNXcHERy6byApMS1Q57MhrBwmpLQTWq0Ed+TKvbv\nYUOh\r\n=8W76\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.20.36","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-5d80fe7-1624263865742_1624263915744_0.1689369463482493","host":"s3://npm-registry-packages"}},"1.1.2-canary-5d80fe7-1624263868531":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-5d80fe7-1624263868531","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-5d80fe7-1624263868531","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"421c4fe6d44a111e269132cc853ff478384c72e2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-5d80fe7-1624263868531.tgz","fileCount":7,"integrity":"sha512-qdpg/psI4sqkjOy82Ql8ls/6k/6ofbJD80B+L2nYFJ0NaVkkEVFGycY0sSyXq8xK0bQwzXPqC+zgpiZrVS+iOA==","signatures":[{"sig":"MEUCIQD3kyMglVWF6NDI6hi2sdba88/+yk85FAz4W6KGexn1bQIgDCYG+q578h/X7gP1YUXKsoJ8C0ugxSZtmf6hYS5IFRs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0E0fCRA9TVsSAnZWagAAAGcP/06pebDf5XfbJLhYliaT\nuYvmkaWD22T43xY90jTWQpFwr7QcUR2Yy2H3wwb5OkeDXGCLBH0JpKqIGTAo\nAd5wPuzQF05qP3a035N//g1UW0/1IEzopVXYS+ZV/RUpPsf0oCxtnruzvKQd\nipxLmF/ju9hzrFMCduOsYk28SvAZNEsyyjcXqIxx6+RKyj8hIMPcORztF6Wr\n3kETAixpzgtP1mpq/FfMgQgVJqC44Yti/XoFJSdXbboxmr4sYwKDj1gMsiT4\nYGnAegyabCL4jttt5pp480iNlRADK1Ej2zvRYdnH3hfEynAl7ikPP5gfx4bP\nlMvyjS731/IEbuvqAakYnJEiixIdPkmayNqWafgdU9bQkvf+56GcBJUxFhf6\neEq/A9hpKLaWHcBJLrviDu9qd8KUA+Y/4ypm7k/5OsHN80OLgx+ZqJud0DTz\nj356eDr7jLaJ3w98yPV7GJygGvwQK+El/aY7kyiFm8W93+NtYT61/62sHf7D\nYsnKGKNbJZQgYFhmqxDPAb7I5M0CgN/jxHTdnwigxqbj+Pf/KGwcQAeTK0VU\nFE3eID8DdwQXugHl6CtIekJgmG2PkiVr+w4LdiC2ZrxJifzhuLJwwEO0zI1Z\nC6jUMvDghg0egBNXh9XvBznsIH5DLblqIVB4R5bvR6IVdRWiuh2O1KKMK/7J\nyJQR\r\n=HzAs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-5d80fe7-1624263868531_1624263966762_0.41922650258690775","host":"s3://npm-registry-packages"}},"1.1.2-canary-5849805-1624264389903":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-5849805-1624264389903","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-5849805-1624264389903","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"05a92871b36a13418f0edbd45f89890365acc415","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-5849805-1624264389903.tgz","fileCount":7,"integrity":"sha512-nqAhjqrw8YyIQVZ5fZtiW3Kp1Vc6ZQFEi23Hao62iTTsJjP6WQpa5Awnz+RdQnKjDcJupMXyvpTQilAXt0E4DQ==","signatures":[{"sig":"MEUCIDSWydhytwk1NBWpaJZI71H6ILDIbYUWSFztWn2r17SdAiEAkm48tHjAU/y3ie6FuJ4jYeG7mIrAg6Bgpfs5DowaqYs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0E7+CRA9TVsSAnZWagAAyroQAKQ8HEo6n1Tpzew0FPWI\nGn9OgafGjcdX4V1IIOZ8np0WjkTgq2z6bx+1fzUt4eqr+9keIWcCzPajHypS\n6aOJbLm8if2NLZkya1syp0bFFxCFl86JFOqVID2r3VwjuadN2fGnF31vRCUU\nMSL4WhBH5ORaVnudq+d9cFHtp7v3P7aOKgFOw6vKwtkqDWdXkzQiObOG17sM\nIyZv5kju6i5n531C4zmL2Kfwctv5U4UuzdPzE4N4eyovIMQgeDFnpUep+nj2\nAtd4zq+CQLn0wtvq/CJY6wM+9nwQzvFOI518La6tc3rH9TYx9okKR6mqgEKz\n8FeCYtZadjgZfBW6/r2klN0p1Rv631cf0FLjEZPnl2H8KkoRqxxPvFx1q/Hi\nq8Gr7slo1bg32uUAybmu1StPHx2jD6u/Bhf4bh3XDejePwgSyqbWCNjh9niw\nuWM5NpP/0/oSKq9znY+s0aP2kpUbvJPdp+TqTLamm434vsWouc0692+attlC\nI94/Azrqblk3E1ZSqNrdnw3tp7RCEV+9NUHgWCanK4kuKcrs55WO9PUJ1NAv\nrA3G34Z9DUIwzjzt8D2J2Kw7teUP2+ZphpsEr0Td5/vqRrIofCCpk4Saeayq\nAVwdVFrhwCrDgHUGu38WK6gc/AMgZ+yFP7h9TFCZgqwG6OjnxN/4ORPqz1cT\nhUPv\r\n=RtXG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-5849805-1624264389903_1624264445646_0.5030309790796612","host":"s3://npm-registry-packages"}},"1.1.2-canary-113bfa0-1624327409933":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-113bfa0-1624327409933","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-113bfa0-1624327409933","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"955b6334352b119ea82555c6764ee1c8f93887ef","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-113bfa0-1624327409933.tgz","fileCount":7,"integrity":"sha512-ieDx1L5o0Ce5ouek55uJhab1HN81sA/UM+CTvXqsHmsNVjgrJnWhmtPaFVz55xJfVJCGNpqjZuwpTY27xhhMYA==","signatures":[{"sig":"MEUCIQDG+Sfs1Fk1pcH8ocCKOX9amoyR4V/7Ybbx+t5ejvSA4wIgLyg16RXfhzPOtaxA9kbbqzf8+gcxeG55om/lwtTRkso=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0UUbCRA9TVsSAnZWagAAF/8P/1PxJpcs+mvAp3LzgbhG\n3OwbSYkkut+yMsO2kdXlNaYfgrRImYWQt/t2MHra8TPoFUZd0cfQgGwSxDgs\nG1Omp8/qWjCyYBFSIU3bRM3LsGU8SnlTDh0oNtIfdefkb1F/BmYSWW7Ws8hJ\ngWmunw//YJHmoa747WbMs0My0La5d3phzDgevrc7C4jzLFQmG0zObKm57482\npxocJ/n3Iw6y3DcSjo3bGx41A/QStdm33f+viE/wW/9xJr1tuTpvyKcZCsZJ\nKxhmly9M5rvD7QGAK17wsqWMGctIahA4XbUO5ryJ/APUUHuC0fCANtoWPe3Y\n6pP6NQ/7y6NUaA0JuTBNIhLISrDgWO9WrEnuxicv2R1U70wn02Fzujgb/+M2\nlQdLRa5PCV9wgwYNBgAYh2RzqVgPNYNSuKFjJw4PPO/fFLHNKOBtNA//W25p\nkQkrw9c+/5fEw5Pgo23UuEXAwTaPhaQw96uui2Bm4ByBi7mjLxzDlKkdk331\nDu5VGadgEibhH2JwO5WxjXJZhN8NSZ3h49JCwobdTkVNWugjN5aXmR858Lg0\nMefm6+XPv0jpJzqysH5ojgUq0lcSDNU41MfGI+3uVUYEDAtcrXli4GBiZ1K3\nW4OfZKiYoeQd7wLBBi1aGLwA9M+453WnIkBXRvzvP3xf0+kc3geiWDkSv/vi\nFTbg\r\n=a+BL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-113bfa0-1624327409933_1624327450652_0.19558945950683282","host":"s3://npm-registry-packages"}},"1.1.2-canary-113bfa0-1624327411695":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-113bfa0-1624327411695","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-113bfa0-1624327411695","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"898ccd6d5794ddc6c10c681d9326d72bb1357706","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-113bfa0-1624327411695.tgz","fileCount":7,"integrity":"sha512-afA+luV/VDky6eiqX+GXUEgtgonjEx/DPErN5a6Dp9tJiyOO2uiqRBVHCq6+uqdDwY3uFeWWBVQt35i8Sq8Zlw==","signatures":[{"sig":"MEYCIQDUiPEgIaQM/DkKzKNFx1mzLZL+d+IXbc4ECgzsTSRcfgIhALxc59roFZlDCf8i4e6l52yat108hYhAyJfuiQjCd7kC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0UUsCRA9TVsSAnZWagAAHn4P/RbLee3jWOcrAxnFwQbt\nmgZj3WpBfSR1wiB31T1fACxDF/0i55mcATfGKXgLfNMekQt+fMne5f1YOjZc\njyi/Ck5jD84yVam1tpyRWbDO9VFx6zs/7eme0vKjaXRhlpLX3zWjxUoxv4ZM\nMZm9mQdz6xNaZ0H1Z+pSw285EHUlqoZX95XUj/wB5kl5RYi/mezkrRerzkT+\nfmJ5vHnIDvuX2wslDuyy2doMfBWdHKlE2CiQCZCtwcKRiO4ht/c8wHP6r2aQ\nIbjbUN3Ozr514URtnozUqRGD+zqOpJg1gMj0fQK1oCZ3S4Ly44lMhYSYm6F9\nJ3beKerpd1jCrUbFeJyPpWMJWDkRmZWxUjfYqW/bxKWWNPGUs9Nm7aTrUOze\nD46WcDevQ1Q6TRQPIeaqjfVLrBuuBcJZdq1ROHtqbn/O6+BeBJdEW8h+rgWz\nYK8NkHyWe7zvKNoa6/O7gJmOAby+Qscid1fZVxs3Zj0QhT3tL363NRBvaO5/\nsxA5rXL87O+WC5UTLBKwqbTRZaxKkDHcJ6+le5w6w4knZzWY+WDM38E0s6ew\nfj+3RfoWrrc5CFY9dzbBEX6zgqtR1qxjwMhPCqdpozZirLu8cz3Sj+HuIzJo\nLUxyHqH6Wphtk3TXjmnRtz8XzF1GKK9lQXJsQ3y3+tWnd+kvwe5OnieIJlo+\naaNc\r\n=65GI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-113bfa0-1624327411695_1624327467924_0.15806366926624205","host":"s3://npm-registry-packages"}},"1.1.2-canary-33a4c11-1624358741081":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-33a4c11-1624358741081","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-33a4c11-1624358741081","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"63e92244e8bc8bb2357560b46fccb0d235c3e235","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-33a4c11-1624358741081.tgz","fileCount":7,"integrity":"sha512-it9SBYLp4WCZ2xjYEh4jWy6x7E5Gh3yKCn7/QuDh8gon1+H2XkJiCMRYKo4/wCjpspmj7TN8jm3Yoo38OUCvjA==","signatures":[{"sig":"MEQCIHHP8tVtGs9qYJYHw01cvr+dk6vLXUIvjkXzY9DAKswNAiBXtHtzs8EPqc7+mZZHpSyjKUpyKRwO1T2OWW365kQFrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0b9+CRA9TVsSAnZWagAA+BUP/1ONDm6LeJNSHHyecTI7\nYXGU8Xnz8oOWQSBDSZuNgzoFBWM9yiZ43+PRNcbC40lKHQe792OqLF+AzKFI\n/Ss8ejOD4zrR352Cx8FrLbTIVw7sUtOQ3u5Df9/1StbPJSfxFVRVZus4jJ4B\njox5VI2OHCUZluxVhwQVO+CsPuBbFeWStqWv0wgaq/TIHYsD8UZjKd5A2/eb\nJRmyMyFUdNKlecQVwg7xO+Hoh+G5b4vqOaLXUsXCn62UNenco6IvYjpfJYsB\n21coBpfo1T0geWsXeib6la6lbJzZxLrtnGhD5FC9OTr9w2tnjXzLstVMPLQF\nRV05ySbfeYEGX9C0HgsLqMBcf1cMgTh5/FTMtiGIIJEZUuFilxgAMF/VBzaT\nFE0r4YeqZbiRx5v1fO9XwKh+T+F00pgvlbRSXI+xRnO6r/B0Wya+7roqhFvn\nvBDntCWWRp1uKWuZYkjUor5EauKLsdboQIkxT/ljMCUUzDc6qKKYQU92Bjuv\nB+/2loT/ymurFr23KC66CRET/LylBgrP1QHF8BX+iORWBzQHyVmzvJ4B0M44\nTHcloSniWCD1WMFUez1l0s//KXyDdDp7hDIMhcIN661bRqV3B4qw+owIRVAn\nfd99N8/8oA2rNszw4Oae2ofBoEDqEt9pYcx6A4Mz/80L6Z/I/N22jjVkoBBn\ntCA9\r\n=3L7D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-33a4c11-1624358741081_1624358782311_0.34978141309549704","host":"s3://npm-registry-packages"}},"1.1.2-canary-c89244e-1624359362028":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c89244e-1624359362028","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c89244e-1624359362028","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f91d9950e0251ca5f0b71b70c76a08a6f9c2c841","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c89244e-1624359362028.tgz","fileCount":7,"integrity":"sha512-qODv/aL2oqShwLZpZo3VnbDYQX+Rsr6Ghekn0weHs2eUvC8Ra8xHclwMpJdg3u6uFW7ByF4R+3o9kzR+fRwdMw==","signatures":[{"sig":"MEYCIQDX47GtEI42O2XeJW8xDZEb6myZpoZoaqqMzbeYEha9fAIhAOrphKp+rST1+Fy1d2VE/yji/eUFc8CE4OXi24gW8CBY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0cH1CRA9TVsSAnZWagAAeaYP/js23XTm9oZwV13/03h8\nEJ3a0yeFxApVP2ZReIdryeE4sCpid/BlqFSSIqRJG96rE6t/++2+bLdC8nNh\nzC1YNDkjRBgNsw4mmnF7YklGSjkj6ghIU5pqZlQj969e+sZaDdFEBdQChyAQ\nUEzzZ5KsoBfbJAxyT/Xtcl+huJCrov09DAwYYWJA2B+T0mwJfNwxgQOSaYGC\naQtemq4Lb84lqG93U7G97exPwVirhP2JKKyH5xWM+pn6CkeghJU8kWOc5zjA\nzN1Sz0bIPboPDk+tBA2YJSh4+5Gx27iKjs7AZKG+LFtRDyaWT0QupFIDgA+w\nefAKbVGoou7O0QObTA6GCMne1oov4hnpSwU6Tb2HY+ibK+mVJqHrrKn9SPRR\neRuZ+l1uiHoMVr3pP3L4vmuw47x9avmRqNKoF0zzPUP2A7GoQfn/5XUdhCKQ\nVC/1hu3rjpqOaEjtZRX4qbPv4J1PhuVE4yn186Mwtmi+CxoyImAt2R2Kf/6f\nph2FvuasWWh0TOj9iH/1nxZedyUysmcRxO0Pmw7r34HTE7v9OYvApHgJu/mT\n0/prh6cF2UjeWQIo1z8VzmNa6723oM2Mq0FJpOFOHZN1t9PlTZzJTG3gzKPg\nGElaSMJlvUCh73EUOfKw74uOW7x6FRyngy7iFRuu5DB3/y4JUL9J1yNEuRej\njxtP\r\n=/Xk2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c89244e-1624359362028_1624359412730_0.3122334083199223","host":"s3://npm-registry-packages"}},"1.1.2-canary-c89244e-1624359395530":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c89244e-1624359395530","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c89244e-1624359395530","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d28242eb384f3dde86c35fd4856f4f4b66d70f1c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c89244e-1624359395530.tgz","fileCount":7,"integrity":"sha512-swLkx0m+tODKNcJT/oTwq5Kak6dfU4eH3thk2ywZRAfdbanUItD8povCcxxVCpJik4TtwDzLMBA1qwXa25A4iA==","signatures":[{"sig":"MEUCIDbZxOkp0yDZJnI1Sbd2Hvq3c/I8+o4oJ8s5FSy+d3ZxAiEApnwVLEkv8FiXh+gi0tTgLbIZwa3qVzpoc3604ScDFNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0cIWCRA9TVsSAnZWagAANNQP/A1xvec/b2rb/0UHYJwj\ny+Tb/ZoW9RrdZrZypybBGJl7yM/Q0XIHe4PZlzf8ZEabWzBMC1n7ov4JcrrK\nNEfhwnbqFBm5gld9g4GMoLdScFb3OLk/munGVZP9P1hHZnICdMbGbM5ACVH2\nBpanAkS+14rOZ4NW2dCYfqE0mSoOO43CA+Kr5ay0PdrV83FsviUTlGAkvrUh\n5wLTAGJqm03o67P5A4NMZZ7D+nAStj8eQ/Qn3jvV33Wzl0OQfCIsgLp5gqu9\n3rdhfz9PESLNXPZzrKq0b0YCMUh47ZBEZN3VRCB9LJMFx6tDkAcys/bv6HoA\nySk3auFCOJb4Cl8t7r2Y/B2YfG3pPBxIrZdftMHDa+8r0dR08uIqDj8DobjZ\n+PjxIK0IoD0qvokQpk4C6xB75ehbeBI+/Tyi4vh1cVn7XzYLTQemf6jmOVAF\ncUAUa8lANRdsaaGMFHimwS4sTZietxDyyJnChl/I4ZWNIaKaGMUcpgnny8V1\ns/cBh2Plw4EcAacvbgC5qDo/rQal7n3K37sDA58BBkzmpGYP3+0aWymk0WIj\nEjsYVj7gbVqnEwIPQjWFnJn76V9vD3LLTgRJfChFHhZQdLlJt4teO9dw/c+z\naeZ3Bn1WXBx8G0CRcRvsFetJP8cpbAqQKgYa7qsrMaxB7kBykDBRp0kR9ssx\nMuhd\r\n=r8Ri\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c89244e-1624359395530_1624359446016_0.2707896712491271","host":"s3://npm-registry-packages"}},"1.1.2-canary-8f98b03-1624413859096":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8f98b03-1624413859096","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8f98b03-1624413859096","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"64220e7a36693ba24e57ebe9f639a68c3281667a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8f98b03-1624413859096.tgz","fileCount":7,"integrity":"sha512-OEOWFcQYDvVAWy8ZNoK8as9UN31jLfvUYq4aAjyDKbWgBb/9pO9kSpHE2L4CdH8CBbcXk2xah3txvlOG8tnRpw==","signatures":[{"sig":"MEUCIQDDn5IgK5ift1nIv3TkrobYnbBKS/ZCNbCWHvbFDYWb7QIgXZp0tOCVPWt7CVhfezfwrs/nBpYn/vQM29YUDbTMTnE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0pbUCRA9TVsSAnZWagAA6+4P/iiL0a7W5EDy5zKjO8xA\n6FYXDD6V+8VX/FdbFd4Z8cZmr8Ih6nT8Yip1RUIZujWPP44geazdXT5VYcow\niS8NnGGHxmsgCtM7D7tU57QUvR+GD9nPl16wwRlWIhNtBc+YwVEd/80o/mja\nfrO459vSeN6IJekGvZIqDsGCW43VILnrD4B6qY5W8Jg/WfApqc3pc71VF5Zz\nhYrnVZE604aXseda69qZpn2BWEpD+9NjUip2YwG27jcJ3rEemKIQ34rNA9xs\nQuxjpDp5o49pH/HanJPKLYJpYAkYrxx6wuZS2Rkp3opwLCms0ya8xCSXbNv1\nwnwH0FrogESpP4z5XVFsOb5WDVpBiQf7CAkJ1zV9kcpMgakXlOpcT8oDj7Pk\nCIARvGf8hC5nSr8OfQzU6uoD1zvDvtcYHNSALwgIWNDKjJQ7NFmnybpN4ePX\nYqVSyvQj4ISuwWzh/YcRKtzZF/1RC1zZfrXlr96lvCSd91gzu65t27p3afhL\nIsMaxurUOPK4tP6yA39/XZ1WcgsP3ddyrV2MqvUA9PPEhOsiKUhf4zbc9XTB\ndOTm8SNwOT7CBwUD5BxbeDyZdVjSVTqATCwsX/dNpg0buGa0o2UnqfAAKFTT\n0yjBXfHlbR4JGMbtGfwIxg1PbReicpC+Kn2J+LkRHnoFQcnORcbXXiAH7bJ/\njI9o\r\n=jjy8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8f98b03-1624413859096_1624413907605_0.4932410725860117","host":"s3://npm-registry-packages"}},"1.1.2-canary-8f98b03-1624413860431":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8f98b03-1624413860431","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8f98b03-1624413860431","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cfd4c90627897d48f18ed17be0a5f0be42f821b7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8f98b03-1624413860431.tgz","fileCount":7,"integrity":"sha512-WdBR3ly5sV+4yZ6idGni4mRX0dxfBI4s8aSGayCAc1fk/aSZYQ9omDK5Lu/L6OCTFEQQ4kFfvTk+7blaWR3HRA==","signatures":[{"sig":"MEYCIQCx1zYLZCDkK51eVQrjpxYXtKWuy2L4X0SR6F/KikArhQIhALLPIlAA9szLVROVLnQXBj35O4t4f4IDR90d75STKhDW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0pbcCRA9TVsSAnZWagAAJygP/0/1zGg0tF8dxy9GWd1n\nL4NKxncrS3aH8ZYQ/V44rKcTDSNhoktEm9ISaddAjSL4rhHk2LT58vP/LREf\nw9u9Jper6i0656a4F/UNBf4F1VX0BaHenIMok5WV2soxCZ/NNmaVTo3498OR\nWajKYxEshb26ZXcn1QCYK6IAPfb8Ph5KDzii0mgrG53L8coREd7JLdB3fkbv\nI1A8yTiLVAFQGNJm5u3aAn2RzgCxZwcQYCEX3zbjnnzq+wOk2HkPgPMs5LAP\nXEMxZ87ueVsmzv1YnGTjTpcq2m8yP1BtkXcWCwDiLDOetO5Emwl65p6dLk4C\nkeSShG4m5C4yuL64/N6FKcV+U6PwL4DDNbvRfLQdixTDOlJ+Nwb1DOOdr3qp\n2OXMVup2VDrDC38+FTG/EeGgKHuBcL34SwCqFsXtqSrfjeQXC8dbvCdqYyfN\nlki5xmMDHVS6ng0wr1P4hVLmsFPaXcBIkSBFooLVcLuNANlb2i7zOPI/xutm\nslN6TxRwMJYUcR2hQRoWo5antxUxnOd3uJjJLC8koj1S0r0NdugRDJxYP0nr\ntl95SGbTbLrXVcPqmR46ugfLzzElatrxJFCMMYVWOFyWVQcgrWLUZghVGeRN\nxTamL7/IhYv/IN+JvbPOaMPS9aJbereScPeLTuBVm4LSdXvzsHaMvcZk+2Nz\nab1G\r\n=fdnY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8f98b03-1624413860431_1624413916389_0.11157883461821583","host":"s3://npm-registry-packages"}},"1.1.2-canary-28f2a43-1624845835544":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-28f2a43-1624845835544","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-28f2a43-1624845835544","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3c7f9ff65e047d929e276bedc84a703dc20d3c49","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-28f2a43-1624845835544.tgz","fileCount":7,"integrity":"sha512-oXAKbNYjbLJKD+WnDtnxb4maxEly1kmgyyjgUwITq18GscjrXkRyf9o0QZM0e1XcnCbggh8nHCFScwkoayIxFg==","signatures":[{"sig":"MEYCIQDqR5LoOu0VBRQ/wGw0t9LNK+uffb2hMWTHUrmjd4JnjAIhAM1/1uU0Houjr7P4E2xVCka4hbhk6UCPWWfxs4+WWrTZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2S47CRA9TVsSAnZWagAA5n4P/AlYfSmL8MO0F9FfR3jR\nZIZV5MnKUdJ8j2ZjB1l0+C+42GUS9Y122KQjVMCFuoAri1JrWt8bNcNeXK31\nEdWxnNfZ/uKUxFF1isUJeGit7H8NcKLFgxY94tlIzyGVV0WQ85SEIAZ8mAt6\nK+fZXmLSUjvLq0eB/yR4ObHA2O/06m51G4N1G/T9cYPhuI2gqamMl8ukyxYV\nwpOhAjvds++Lrcg5EeHydv5yt86DnJRoZ0+qLp5dbECXYc2TGmST7oO4nEWL\n+e+MHG8Zh3nZaJAV4kIEaLujh8GxznDiqLS9B2AyM7pV68/IR3urZ9LQ35UD\nPCoIUuD19cD8g/Z+Kd6QpwZDsH1aqzSdgoVYOOFl71H4Z5LpLDmTmnNWphLh\nSfrDRhRxbnqooj4Ys2Yv1oYtcxxkGRrXv64MNGEScDiKy8eSZscdF7nUmbys\nwnK4gRwj20FqmbJ86N8V4xijGe1QeToJE0mkpvEladxkqctQpkFuundVo6zn\n7ShbX1bcMBvgIDidKCAlaAeuicPr/b49fpFN/1BdiwndwQMIexeAME3cFOXG\nnWDJC1gWnBjkhO6nlPe1DSXdi+i76W9b6s0M8LDtfAce5PalOLncjchb6PPa\nbJK1v8ulHivNYwOMt6eVfIcGe5TjusLH4z+sSoBtHQpbKXGiX5+1eFBSHAdI\nAp72\r\n=ZHv8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-28f2a43-1624845835544_1624845882816_0.3701982301980842","host":"s3://npm-registry-packages"}},"1.1.2-canary-28f2a43-1624845853531":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-28f2a43-1624845853531","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-28f2a43-1624845853531","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b0580b2d983dda7066527a8f735f04ca1c2527b5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-28f2a43-1624845853531.tgz","fileCount":7,"integrity":"sha512-lCj7alaZ6FH5G1Nj/C3HOQRsY7IEP9aUv4Xpfdr5m+vJSvCKGzsqGyaHvxOkcXjQ5SCAUbHSrUbl+eZGzGErLQ==","signatures":[{"sig":"MEUCIQCQsu74TrYGqJvn21Cn/cvSJDF60bTl4V61q8u7UZMHjAIga5XX6WVWJacczXaKqi4gTb++2CyDn9nSv6awZYu/Yks=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2S5NCRA9TVsSAnZWagAAFOsP/0/eI18S5T34fu5tzRLC\nileTk7diLQebxmWVnTy1RLHs3Th9LY+qhg6eOSC8vrXnZyJwNPUUeIud9MMF\nJS6wXQ+aoTihFuOvDrJrdCccqlChLlS34gYPfUIvU8KranrIyuo65WPvfBgq\neaxt2ciUJ7HL81wkm23wz2IvWEABkwGycmESu2cILoAZ1gB/JcimVxF1iEf7\ncIFtgHdt3/H+sM3RsKQxuMRkulR/9Snjo8H2wxakBuUgqIgqeDlOb6MyVf+r\nkPPB8Vgv/AO8ulP92uErI6fav5xJx2VMhV6kGHXeAIOS76J7wPzVx7ZPEqWs\ndL8vebZ+C3HH+JlTIh3atg2iNJnu5b33Z3yeYEf5H8kr1ONfqyR1h6y9ReCT\nRWKXASTsKGSoD693SUwNlGCGY63NA7E0lXezItQ5nTfDqvBkI0v2bK2JNCWA\n0SFgZTUbSZLyV13MhoMVbqDW++/VWVH2XYwSW2lv8RPTgHQf+yA/deqjYal0\nimLfSGGA/WOzquVmvV5yfO+AclVrPYo7jZ3r9u3tq3qftDDRKevjj6HC/s+K\nBCU8TiKk8zYSGDZXIEx6sPDYCKqXRrrLM4qx/bXRDATCpR4/3diIMADSfoHv\n8QTyZPfgp3ZLrt48+a2l0+/7cPxddN0uqNAgjJ+NbnHGjpMlhrKXLGVVM39/\n30Ne\r\n=e4UT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-28f2a43-1624845853531_1624845900950_0.2678715828767273","host":"s3://npm-registry-packages"}},"1.1.2-canary-28f2a43-1624845854960":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-28f2a43-1624845854960","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-28f2a43-1624845854960","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6a37de25e671db61b138f50eae19a9fe1a61dd37","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-28f2a43-1624845854960.tgz","fileCount":7,"integrity":"sha512-CeJhQIvLjZEAb/bVsx6fnWpi5Jmbm0b2PeveQj6APIyFirTzBVsXZc7T6/6G97qJwVXA4sfPyn75OGsVQ33mfQ==","signatures":[{"sig":"MEUCIQDkRngDQiXVdjhNUyUe1xlqh6rhZBQNDEUrHyUgxKFAqgIgYRjUQ1J2Th+v6vLtD2uJRGM6n30Nnva5mpNP7LUHprk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2S5ZCRA9TVsSAnZWagAAQq4P/1s0YBCPeoQ+WCeX3CHv\nhazwhSod4ojCkS6wmSL3/lx0ZJCSDbCAt69/sr/PREE1WLEw3WZfs8p2lgzy\nt9/h7qJO52BZg0tY/XR/CRnwXANi6Hu58bd2G7b4aY8cOo8dctzBayReiIsd\nrEG1QucIeBfQB6r/8O+UxfeKze6RDpD3ZVby0iMRb4Yagbuar72bvHS/RmBX\n92cpkPhc19wtZHORxrRyHQVv+Qiqenz+K3UWb5G98XPjAFw67e2pgSjanq8B\nSE/MuAlTyPYjxcxYh7CfvbucjDTNsFTbpje9ClpKE8OgpJ76q4h/vNWiZoVG\nfbI5dgDi9rZcP4Tkzuh95oE4RrnerpqviJRcTbupuWHqqCJcsixaV0gi/WXA\nSfRNRE8Q07idGRNpzWhGRWeevrj0q8V5aV8MIIF6uyf6u/hjlAjWt9pdRPVD\nWvpDYdMdd+Q8p1jBqxGD3ic8/lc/pus027klMrnOmCccNlJZogUhfI0NZ61e\nHRpR19HjvDWvLH9YoUK/BNAeBS0kVF72Db/8dlldzWcDgPn2Bo0Qp6ngsa29\ncz0Frvub1Dz6Ak7gbab0imvhRkdPiHvdAl+zdzGcQK3EdtNbiZNeqa5Yhy6c\noshBPwUzcYMXif62wdG8/1lH5kpe8JlzRH9rtdxLx3w4JyvKZl/kF3+P9uB0\ng4mO\r\n=ZHmt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-28f2a43-1624845854960_1624845913422_0.8366437348165865","host":"s3://npm-registry-packages"}},"1.1.2-canary-f0af1ee-1624880383615":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f0af1ee-1624880383615","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f0af1ee-1624880383615","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7ff86662316d88d286594c3730747df403bfd9a1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f0af1ee-1624880383615.tgz","fileCount":7,"integrity":"sha512-3GHnwfBfE9fqHYLvE1x8iN1onFbFfeP10Pn1D3HEhK5VCKSN6j4aLOE3HIsEInySDqIutZnLn57mfdCk+9EaNQ==","signatures":[{"sig":"MEQCIE2a91t39Y6mtzpfpqhWhObJcOAMperqDYzvpcQ7gQiNAiB/IsO3Vb4qeDQ6KVJKdw2AgKu4xM3ny/aPeLeBZ3RLdw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2bU0CRA9TVsSAnZWagAAf10QAIjeNbsEh+lBSASTHxxH\nwWFYgDgiK+L/0G5Xkbp/gIJEVZ9j8wtMI6tOBT/RYfCvblQeEfi5syKhMt5n\nWB8VK5ZY52600jxWYg9mO5/xTqarXEZoGhlwxds7u0hT7dsujgSaUlU6Z7ku\nM0Rn/+SENp/V/XkCgvPtTKeEazjUPYw4Yh5KiDmqhDsm5RTRYPzF9pEzEb8o\nGeWzNdd53WgOLG/HxCfO2qWILUbUvlQLbFw6Dakd8pssJ/Sk78UyTqJUBjiy\ns8CBo5Mh7ZAr3vpLzayBO6zZB7ywvV0sO6NUWEAJ37Jp7M717vlF4X/vT3cr\nuERhmk2wP6mc0Ei4vxOWLnVG0zM9uxiW8AfxBEW7HyLXGMUicGxghOBM3uRU\nQb7WsSGYeWE/gUMhivEhSYLV6q7DXaKqeL5Ikxve4PQw6Tx7iMqHiBYDJ7Pg\nDuL9pScJtnKA7u9kbmzaikq4tAV+sjx5GZ2y4PUCyTMGCJ5vLml8i4+Lv6z+\nsYraz5N3r6DNaBVV/lwwJdMe59exqLbke3eCXQ0F4aW9v5uhPEWRyGNe7KcD\nxLgPcJJd/+k+pLcKDZQ398qUVfOqveBwqE2cx8//fIyH8ISijTpbs/LtcFha\nE2UBalUbnPTE8+hEf7Xt1gHMLeOXbsNnO6kZSVobHSRJwV/o3LJRM4pSofTs\nxfDo\r\n=PGQo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f0af1ee-1624880383615_1624880435527_0.7448191603144465","host":"s3://npm-registry-packages"}},"1.1.2-canary-4ff2d41-1624880720777":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4ff2d41-1624880720777","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4ff2d41-1624880720777","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"82eb26fca17de17b87425c04315d2867dce340e4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4ff2d41-1624880720777.tgz","fileCount":7,"integrity":"sha512-dMBFgQqLFgp1I7B3rR/yTOfPjoEaWInbGiMOVUCOzrTZm52z4fT7vNwVmoXjPQuHdz1OGHXlnL1zKn0ryC3xLg==","signatures":[{"sig":"MEQCIFMCrvnB88p0zOAD2rUOaN9NhQGcQGQjM6QpplQTveUCAiBEvXKHX3oKR5H6avJXX/QQQigqkSe3Ghk0hzwdeL10Tw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2baDCRA9TVsSAnZWagAAU1IP/j+JSAqhWb+jpgIM0a6c\nNhlGqjcoJzTzcDc3UvoWbVxMv9ZrH2jpkylXXYire/S6nrkJFzOZGz+DA879\nLVGgaQ6r7tvJTemXAVUwCxyauolJnE+lurO/pkpM95ex/mFrz6JLdTCPfZsk\n7fbI/bXLca/ZQTi+x6Az7gmBa5GgeBrS+ZRov9LCRr5+jKr+N9lRHZdD1bIc\nDFl5JAnS7CwYFzVW0beUodNiK8F0ho/7r4aPjeO5qlDLmmnae+GexAFu5KAR\nY56bh2llGNxYzc9fHvPFupnzrYsjhL9aSvKp2vWuSpz1pO+BXZ5benhc1p2O\nLbC1URQywsOPGHSdB9Hs9QU+1z0CSHlt8pIN64QOVCmBgDvc5nK6rSdaJhj9\n/Az0bDNJTeijxQH4vsTySIYejmNJ7o3PRSlAcpEP3Ia+poEohZBxQIl88lF7\nzlgbEfLw0rsDCR+3Rbz3u/EZ6c5k65O80zjbpsP4xmZ/Og6ywKStCnb24pO8\njl5rbhFtAl235uZdXkr3LbigxXt8EwPUIpXfutNdEzdZRRnSJxVx8AcQMhFi\n+33OcHZIsrYLaxUd0I7KWRrvq5AKl2oKlUBe2661x9cXtBE9BMTKB22NckOQ\nhydy1jVrdauKgWk5b2vW+N8dr45ruu5JXAtpgWMsTrEUxF9N2vvxLLSqDmty\nEur2\r\n=wm8S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4ff2d41-1624880720777_1624880770588_0.7703109908440451","host":"s3://npm-registry-packages"}},"1.1.2-canary-1a55803-1624881711085":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-1a55803-1624881711085","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-1a55803-1624881711085","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d5d88a1dd066cbd99c7f80aa5ee7247c595b3a4f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-1a55803-1624881711085.tgz","fileCount":7,"integrity":"sha512-VkHk2+1D3bZoSMyVwCq7UYEbGHHTnz6gJ9HVszbPTNao3QWRAcuo5cUiwRCkUP4QAPp4fFuP4LZRHRGZuWYEjg==","signatures":[{"sig":"MEYCIQDIRQTU9yMEyJ1f+yNgPAUhv2GJb3Hq0IBD1zNPixe40AIhALMZBYL2UApVR1y1Lgdjj9b7fcpyYLfSXfzwAPri/yas","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2bpkCRA9TVsSAnZWagAAjgUQAIcJZwdhDj5hX5uY0RaE\nIz4RaUzkJGcBvmvx3VDSQmP/tUEnit8NHCk3ktRHi7Wmlqh2oeB3qeR6iglh\nYThE0rQ0uiqKJDyvHMw6avpqgIeIUjW5rqLSB7aM/MZFlBLKKStCOVTIqfzg\nwQtQ3fGsiNNkmF5nICbWzOtCJsjfihNT9Byaah3kUN6Woy7Qm/Oj/bS9BBti\ntptkS8WnOGzUaUtO08mqKrH6MrG/kUoRnXahieTTtQd0PZji7HVAJms2wP1A\n1bbJ2YZhOgEbjsvm/lPvu0Ijh7N2p5HEZXg6pdkll96qOvYtmWABJtKc9vYa\n20r9YDdQiWlB2bWApneZnlH4KDiVsyHa0WSS9VpODo3Wy5DrBUUbt6UNnBWa\nWatbPqKmr82Vf/aonRdEteGuTwtzY43C1FG2VbvZGBwRNJKwfyiVmz60Y2Sx\nvHyClVfat+Qo0lgqRyVcz6kJr3eR8/Cw6JkIqoUp3Ip9rgeYGEl8VijSaf7O\nlyQpr/1Znvrw6WaSfCB+nAM+wVucHvVld1gNQ4njF3UybOrIPa7XSye3F7Q4\nRgwU96jzuhoMOrSbH6wawpAP7Z2+9Ke+Pkz9ZG2D9CZnZKmFUPba4u0BJSb7\nWvXJAbsa6xtpuqx12t62VP5kI9Mfa+iInB9d8bK5vQ8E50YeNxiv4ejXSIqq\n79h+\r\n=XOGN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-1a55803-1624881711085_1624881763626_0.0785971626316253","host":"s3://npm-registry-packages"}},"1.1.2-canary-c71afe9-1624882059092":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c71afe9-1624882059092","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c71afe9-1624882059092","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0ce1e75e7d0707ff824e0eee4f7513d986a19a4a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c71afe9-1624882059092.tgz","fileCount":7,"integrity":"sha512-bXTk4RkcllGxlzmRyPcotMnzG1GN4YYglk6seH/0GnS7elbq03x39LVkk9+Mt/YyO8NIRDoeyOhFX5+n6PmrIg==","signatures":[{"sig":"MEQCIBXlM2UZazwzw11Q6/jpmiNm4EUARfiyY3IKv88NT4a+AiAe2Q4e6D4goUW8AYE6B9yhFUxkPXQIpMkn9nthgxspAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2bvHCRA9TVsSAnZWagAAE88P/3oQ82iJ0K/JIHt4rSRi\njDnPka+JidbV8iBl57Z7UsPUDj0jSfgNn6AwNzLcdxexdt/wVqDKVeeh8ECM\nRsKmmd6KdU9pRSZXs8DeqlGQEnFlPVQX7W6j2+Zfs4spkchNvT827umNCXbE\njh9tHX3xwAgfdas8W2sSq8e6gxHy5kiqryaTkNac9NMTPDoXq8Ef0vM3dzfp\nUdyhE5ODX8fY8RxKS22hWQwQv3PWcm1TgTNT3RQOBP9nx9ZZ60M8YBx5fjmX\no0C3U/hg9NyrnzdHf3qJEU32dPCGpdFCRr3z2klV2m70M+yRRkP8hBJEOgln\nMDSuAzQSKBoW+BEwK6JuYb2M3qNW3sNqSbPIDp11/OWejKF4guUcXwsknl++\nw6T/5ygS2ZNnVy6A9g7bHkR6Mbc0QyzlvVJi2IlMP6Xmn1GC6C2MWwzArXR1\np5GeoJogZx6UF1HJxW/MWwCIB62IFQmkB8Lt/Sqa4oH1CBJQvSV8TMQdcRQH\nOIR5f9WYvuJv5TRzHuLkKFkF/3cFvhUmn7LRJ8G/bPYNVjdS2EbnGntvqt3y\nGKixygjutii0phVSynmccudDZ2fWt9bAb/CyZkASLKRRI6o/0Qpikb3MP28Q\nQmSJ604fqlQJMBeb7EyzR2XSCOgI91ez2yk/51HCnAjQNCW6egGs4RxmxwR/\nDkPY\r\n=G+R1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c71afe9-1624882059092_1624882118396_0.2279590216970273","host":"s3://npm-registry-packages"}},"1.1.2-canary-23c429c-1624884004462":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-23c429c-1624884004462","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-23c429c-1624884004462","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"af18a271c58f87a8ad56342a2cb389b41f1a1c37","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-23c429c-1624884004462.tgz","fileCount":7,"integrity":"sha512-yz+wufAemaQE4ct5NbMGu5V3TOOfphhhBBtEgJmHFygFM8ykC2NV6Xz2NrTePPNJaIJVpI+D5deUDgtJwYPnQw==","signatures":[{"sig":"MEYCIQD3OIyvlGQ6RF3NTZcvHSMLOnORt0lSOXUQRAmv7E1NjwIhAIq3eedwi8EtfmdKCgIFzzA+UkNxucbRw/L7COzkHUR7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2cNPCRA9TVsSAnZWagAAVi4QAIrK8cwGq6Qx7oqgHYRI\nRloOV+JPqPJVAL3NrK9DN7c96vxIn6T05aptPoqPRGb+yncpAIotH/1+NlTP\nQXwU+OiO6eIiQZuidTrmp17UjiavNR3Q5Rxje9WFn75GngTCGvNRxrIGihSl\nWq2xgXBD4+gZFPTC6BZ7PdE5Vp8HiPrXevic3qs6jgqGIKMBYAKmlg2iCJWF\nxsgZhOOWCxEjDejTqgX8bj9pykcjthEdL1k+bMHhobWlhD9QQsaAmZDdjEdr\n8xA0glkiXJOrUlvLCyDqxTGtqRxx4TT5p1J1VN1GEpUQ/nvtcqSX6HudzzOn\nCFa4kifgN7HIi9pcuclnOw5rvjJQbUElrgCJDSTiPVrj5v+3fdZ8uS3EC35v\naTN87avY4Aui/PpcvDCfFBDp7PpHY/C+1fAwK2sBvDAMtW9jZeLZorTdmJIf\nP6moeg2nYSdW75WHFFN/QwmKDpKA/Sig+gNRZi5JB2LHo7ZsnDAGI0jgxqLL\nmA5vyKgEMp5w32A8Ffzye/oF3osC9A6RMMcfGVUrW9H3GzSkRokfWPy/L4ak\n78/AvMcm6GGyWbsEmPvl503a4uxbzIm1ri8CfXUI6SXuH4hoyhGQXiS8S9Fn\ncaIdPvVcab32CF5ETU/lSflmsiNn5Jc6dKY7hfLZ7asVlLm+BX+9xvg9ZzS4\n3ANN\r\n=/oHL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-23c429c-1624884004462_1624884047101_0.5247581393218452","host":"s3://npm-registry-packages"}},"1.1.2-canary-026e962-1624932198119":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-026e962-1624932198119","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-026e962-1624932198119","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"946cc6b534386c84f69daa69663ef9580bb03263","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-026e962-1624932198119.tgz","fileCount":7,"integrity":"sha512-ey52O4In4P6pTf9P7KoOBHnMKtPkkM8FH0EavV94VqhRNYPdoAsdIE1z5ZjrT42Y0IGHaB421AJgL56ioPlYRw==","signatures":[{"sig":"MEUCIQCUszssP8NRYinCZ3QvB0Tb/es+5r3iPMKsg1QCpwOKbAIgaaL7vr+Rg07h12VOL1078CKX5ghT4ANOjtaCNhb/8iI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2n+WCRA9TVsSAnZWagAAAgUQAIPZRY0MlHLeGIuSPkH8\n/2FLhUiOI1csBgqJMBFcNPbJTNMrQvQpr0B1G9Zn7VeKWKj+1PgpzBA8inun\npnl+9x/tUoTHT3N6mklBRfUJjGYVc+V4FNmyj8Pqem69xyov+YyxErqGTji/\n2Smx/o/EUiIBv0a3VaQrVDJ2GD4GjIzQFqkbeCXiW191s+2n3AcerJzfuPZT\n0Tr2grD9RagCaNtZrXQpWPqhHFNbWG0MW/nH4akoSyObpSo6K/vpamUbxNhP\n0Ad2NoDdT6r/Pq4u5lM7QPk+S88uQ32s42i6Ad/sDZiSQs0BUqFSYvuMXYDW\nNrlxS7JJU5JaJ5CpRSkgZ6LxBYQ0Ouv+LJRnUUQbskiN9CJyTNszlrqhwztC\n3wCF27YsdKKq8xS9xAeUicSXX1lW4j27yWxrn/Uc/WIc8kbjuOVW7ZRUgHfy\nPtvl1nQpJsxaVwWeiPMkasFCupwpclIheX0C/8sjC5k76C5aUyPAY46kWMIQ\n6/c5yL9RSlbE5E+NutLDsIM40RW+TQ1cdZJKfIhmhlZ0UHicgvzXiFF9Zcja\nt4eHOiebW7BvXz+n3HiclvqfTkcJHUzODvD3o/JGd6RB9k5Ss/xxFS38VSoV\nl09UdZ2sFW6vmRM/p1/wly3ZqASgxkwl2lUxbY72VNAwU+qDpUxluPPLPZKV\n25Ru\r\n=FKU3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-026e962-1624932198119_1624932246290_0.09896894651169119","host":"s3://npm-registry-packages"}},"1.1.2-canary-8e724df-1624953976756":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8e724df-1624953976756","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8e724df-1624953976756","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c41b313f1f15e3072e31ae085f4642044ac32252","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8e724df-1624953976756.tgz","fileCount":7,"integrity":"sha512-6cEmGHu+0vmsAdkO5445VEGHXzmGnlsJcTO8GT9iCRg+ZXRzzLUrqBnXv3xnRaphNV1SbBei/5YpV5TTyBOI+Q==","signatures":[{"sig":"MEUCIAYASkzg9HPGP8p2ZMpKev7RjBXWDUTFDe6hj3q6w5kjAiEAmFx3L3OjHSwEZBifhTK9B/OFsu63daaze5qe9qe3dG0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2tTsCRA9TVsSAnZWagAA6G8P+gMkBVJ0WFTU9mlicgja\nBsnrRP96N0mBixGNjuC3xR6mUMRtI9TCQgVXTTsdV9l7MeODzy5K/+1Kcd7Y\nL5exLPRAXIpjfE1NhZMDT6Al3XBQhd8NsERZyr55XChJExLrS9mUK4EjcDGv\nka9wbGHHOhORMRFrRTLa84ZpMfEDEU7gRGDRgLW4H834H8oZt8xXtPOi+clN\n2TWLd2IXvURRVmVIYW9pW/T7VsPa1SF0TaHaJ+3A3mEFVNUlEB0MD4DYJ3Ed\nFLBbATLrm7Pv/cwu+y57UnMT23BLACrT3baMNdBfBDn2A8Y0eDT/aDoQKYM7\nuVp/XnaQv0zLRqA12t98jELwqmSMLjS+Yd2cqw1tmA/MBlfcbg07dGeT47Ej\ng2/5FieWvkQbYli2teChGAGCEaywzeezYvGQLfVgE2uJMufGnD5jOqPPbFMv\nePuvAE2wRqUHBwdxXFjBM2lwDLfbtnfiNPDp+7+M6kl/NpXw3IzHcvjhLGID\nO+N/36y+lHdwLxWuV2+WFfWqPwe2utDkhVzV+tmY7TELniZC1Ucu6KxFC/Va\n0Qc9cn1FihYT6X/dkqe90rWQYBMQPsiRlp4Knl1vPO+FzoIQtjnnell7jA5g\nbd+sChzTBGlcwxz55JQFJhKy0u6CfLs1A0q5UzpBYYwSYAbK0sKtjQL1IQ3H\nvAaX\r\n=IEIA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8e724df-1624953976756_1624954092105_0.03631474798376377","host":"s3://npm-registry-packages"}},"1.1.2-canary-a0c26e0-1625105111492":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a0c26e0-1625105111492","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a0c26e0-1625105111492","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"32bd5bf4919df0c05e23ea687095f2b4e7fb084b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a0c26e0-1625105111492.tgz","fileCount":7,"integrity":"sha512-3ToMHhKQiAGCWJa3YAUcfEvb0LoHQJu5uU/B82P042RLUQtqOqbJN+q67jMoJ1qxTyfqepcUxuJGLWaiHyltPw==","signatures":[{"sig":"MEUCIQCb7fRbPq7YJLpqKSnRS8LIzNn/QJmuMqFR2xpYG14OWAIgZ3zeJYBF14kze57GTJUK7xbv3Vyk85dSa7Eucd/1vhs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3SMQCRA9TVsSAnZWagAASkoQAJWgNJ9i0Hj6Ad1P/rm9\nOD+a9PthX7YJOi2ln9wKZjKHt22VJbUtXBkNUyTrRt3JdAAUf3Rp6dtN4a29\n8FwW9u3N19Y58U+jckUrs0V2xE6KrKdH7Gh898ZXyWgmUkjDFtqHZb3YXTJ6\nJL3YQPhLVO2CS17SP/Y/jkcnNwJO7fY/XWCOj41xjVDBUGp8pSNOoE+epRIq\nUP9PKG9aWAG2GvZIZcXuZlcPvNE03EzbPkAkwCHmCJBIQMAOI26Ng9tzmLhp\n/s4CYyjxH4/DhHhAsUNI1j9bcL7XwzseOSjpPYU3wk9XrX5FkT5RRxC/wh46\n3Qrr72Tkpb9Qjv5WSthU6N4KFm8+W0eY8sxbVJzYy8at1c9gvBSaZOjeOrek\nZUWZQoQ8bg2kAhvwKIQpXK1o+dFXNdv1mwyfpELDXdHObj27SZtizt2hj+4a\nWixATkGo3U6GnPM2LDkPJ0H1cHWW1xqEogNTl9vXC2pN69Uii6LQSlvtQS3x\nTaxhLHGdostrDiCHky8ek+tLX4nXa2KT3WhLH9YrVkyIBYsMn6s02TxrlmK6\nk74SoEzDHBC5JUmgponmt52yMfcuVmhu9Lh6c1QDIkbcgAEUhoDi3dFauWkM\nS+ZtRJCOQd7vgkiw7E65Ui3KjoyGcfQeP7kgcWhtSX4/yktLVqFtJmZ4pcFp\nu0Ae\r\n=9Zjg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a0c26e0-1625105111492_1625105168358_0.2693811970021771","host":"s3://npm-registry-packages"}},"1.1.2-canary-a0c26e0-1625105111491":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a0c26e0-1625105111491","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a0c26e0-1625105111491","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b46c5c13de85cf0e8672e4f19203a47a379fa627","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a0c26e0-1625105111491.tgz","fileCount":7,"integrity":"sha512-S0Vn4eyRyvREYR3qg98c5HqthlVtZBeLj3IghzETlb3vEynC3BBXkdvpmwBN4Ll6j0n0vtNhfywrVyuBcWWC3Q==","signatures":[{"sig":"MEYCIQD4TauVUWkatl4sL9V9AOSp8Vpl+IObs32ktiCJNwGEWAIhAN5b7ZMXPmnw0jh2mKf+lDmypJiIGOJ4aNZJ/p2gS8gL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3SMWCRA9TVsSAnZWagAAlX0QAJnn6tAW0nvWL+4snBGL\nxVZ32tzCL/HyVTPAduYLxl9a3uH8qhAJCAjEfHuILz2QA6xukKbhCLIzP8zm\n/GZD8+i1YDUuwOGzEWrQMkPv4XSyaf5ddPafNLZxhlG2YUbtyVWS+NH01mhb\nLTJwjd7zKLZtyoIGcBAiVwga74F/iK00KgwG6tQpu6u7pQjEXjdw390vBKww\nvSA++roBHSWmK7OMoLq/bHtsbB+Ejy9JqALEQ64gB4rvkUcV83sMabprUQld\nUPAqRLoqJvPajvG62+KQFtkquvxVitI3iS2ERKo6sOonQzJ6kcTVGYpVJ8Bg\nDkZJr/faAOqSBIQzfnqLlETRbHcZankLEeXOMCn1gvKgFTPlr5XAvHLM794C\n4hfjYG0/VbEiAdmZqf1zRv2cQ2zUg1take1yaL0ZvAIt2Td2L/PQr8CgcMtm\nJ+d59DVrGSIRuYZItXy43RcRZOFog7jSDNE/vwU+PCxrrGZ/W00ZH+v71gNT\n30ORITx+++6taub93fFq5B98zQnFE1YXvFlQN9J2hw5k9URKhVCOelMzUlGV\nJrW3lV/PclbBU+/xazb6s9e8AJtHPdeILf4prbZ17ZZTwztYL3diaXlxKeFG\nmLMim+gdcxgAiHJNXzvszQfck/3OzZeoYgl9r4BFwN5jBUupCR03KSF0k6dL\nm9Vf\r\n=DQkf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a0c26e0-1625105111491_1625105174216_0.16590479573281547","host":"s3://npm-registry-packages"}},"1.1.2-canary-a0c26e0-1625105132836":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a0c26e0-1625105132836","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a0c26e0-1625105132836","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6819778392b03bb48a3231b9f335d3b5051db274","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a0c26e0-1625105132836.tgz","fileCount":7,"integrity":"sha512-OqanImM4viOPptcIYT+/weqqxjIaM+XQYyXlA+PQLqkVPGe9UVC5mEafjoyJEPEH8UFDFwrUSuTWbTZsh3p0mQ==","signatures":[{"sig":"MEYCIQDkuA5zhRueJ+Lphbq0zqaKNowaH2y4A4OW+ercB7z+XwIhANUfuc+KpjO53OiANvtJtd8dqc1tADZCpB79Qdb8IlLg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3SMjCRA9TVsSAnZWagAAEBYP/jxwY6CsgoTEfWqjO5PU\ngQ23z2NGbMfeDiMuPyNUlr7j3QLVdf8IDHqQQ+SEZPIdq2V9TM8MoWhVh/WQ\nFlWGHPzEbUa8CdtpvN+81fL6HX+4EYsFXeHAvsKsKSF+3TNpMRoKANT/Skl+\nxpDjbYM8inCI6pCWTZc6dV46Fw5NzwGAWtgBvurEM6wRwUxCCR45tdJnKXcF\nc1SRB7CiS4xM7WjZB2qO05KymDXKDKeWMApOoFuXqXRQ28TheSa0qYKk7mOV\nacWsv8ue7DWh0WgT53F8cGD6X1Gb/PcwFZqrGVF58Lw1NPwFg3SdOAShqZVW\nJWftK2WtsHCMYAKgQVDLs0tYazCPu/SirkjxikMXCF+1Teavp8gwhClcpsce\n9lYmPyCDmUpUoSmYTMbNTdFt6RZKkMtLmq+rYeIFCbn9cNjokPEWvUEW1a80\nAvyd3SgdAraMPvIHqG088ZeCR6wK0Gfo+0meb6ZKShkexqgzpUwadIuN35wc\n3aCXh6mI5G8XGLpZ9lFp9rlRW8hyMxFJ4jOI83iNP1fbTcK103tuhjVtIsaw\n8wyn8Zc0qrGwJXmEITvUDnHUCiw/kHDjxPAtzpom3LrQQvC5UYktGtfdrrMl\nUpoIqAGP4RUludqaOn04A6DeMUQSdoUA0JNUvjNqdBj9k2ngzAGYBxv+tpP2\nYfum\r\n=y+Gi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a0c26e0-1625105132836_1625105186777_0.7117841489190475","host":"s3://npm-registry-packages"}},"1.1.2-canary-a0c26e0-1625105138586":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a0c26e0-1625105138586","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a0c26e0-1625105138586","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8294314e3ab11e0015034d43fb64f9e556efa4ac","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a0c26e0-1625105138586.tgz","fileCount":7,"integrity":"sha512-uHZtgjaIKYH4iOzIJI5/7e3N835CAFn7IQGIqw89N2FrmZA9EQqci5+rehG659VzIDQFaL+gjKKfPyaEBHrJhA==","signatures":[{"sig":"MEUCIC6sREahSWP5uE5WZ11HQ9LHAkR9D8I75OAQie3XcnXQAiEAiyg0WR8RTz2OKR4IVOTJOM4x1/jC6eWLzzU87L/y4Xg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3SMpCRA9TVsSAnZWagAA3v0P/icjWSLYSq7Znbe06B2x\nUGW/3i7GTrnBk+iQHdoRhWol3gDCdx7Su41sNQaTpJC8AEEdPs6/Ml7a5Kyr\n800fUazMWT9lbDYEC8GyM4bFNYrZg9XHNEs8T16MOplvTzDp1CLgClwS4RNG\nMmgVpSGkVeDxsphDGzWZBw2GXkXs4dK59eL8TP13ET9BxBrCeKhWqjfuwtk2\nIGBnz9KsVh4Vzmftu9qUZ6RPOqazGMxHegtAqCCdzWK+Z6R4RV8vhLElN1Mf\nmrj4bcR7RSG6zdgGEV9hj+fMJJZdYE4THRIitaNOkHjn5r23v8o6ZNXhWZSx\nItI/XuOF3RtIY20G4RNdE5L+43aD7GJr40jHZBxaM4l8u2Ksa1Xij9Mqkqdn\n48eU9y/1M8TuNCTtTbD02qkCL7rXyzpoQWszGGyA+IKUjx6DfyZFD5TqbH/P\nUj8N0PckU6O5TSvN4HWVVJeQyUw4AI2QS7360RrH+JVRwmN6QM+NQYXlS20+\nVsTrSWHpE+BAzwvA2D/Jzan/QvMb6JW2kULT/pyLH4SQtHVP1JCSBlaI/9G0\n/GAL4yt8tmwpSlvmUPMgAPylc4wIAFdcCINq7IrZHyN33i/c61QSutm4h4IQ\nsry20eNzuyPU92lGme0a63IAcevs/xi0SM53D+n5ILJNOr/uIg3A0fzGgeeb\nNt/l\r\n=UAxw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a0c26e0-1625105138586_1625105193177_0.5207410515184334","host":"s3://npm-registry-packages"}},"1.1.2-canary-a0c26e0-1625105147950":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a0c26e0-1625105147950","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a0c26e0-1625105147950","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2051804383eb8506b5e85992ed2b3118caaf2cd5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a0c26e0-1625105147950.tgz","fileCount":7,"integrity":"sha512-31t7calpAvIJu26Lrn+GgIkP/OtxBznHs5udV3bv1eIiBUJKi+hpnS7WZxwNVWUzfQMS5rxB+lY+eg8kn9mPlg==","signatures":[{"sig":"MEUCIBFElFQVoSKMv7huB6tEWo9Vv5B/TCqfEQGH/FF0c4gVAiEA4Bmd+Z1SLmHiaKWtu1JAqORxH3WepHKJUO6o2UX92AE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3SM0CRA9TVsSAnZWagAAro0P+wXmXoIi7y25WlsvVFWE\nFnCHfsWS4fueyi2gAmNUw0jVxpSeNqmmWqyEwfNyS8A0T1epHsR6F3OpVyq4\nBOankJ6XI0P+NrCCqWYc2luFcLy4uKgx5Gl6GkPSqrlYPUzc/WzCPqwPdE13\nscwZLFOZl6GD4KcBl7mQT5Zv/y9s/xEYD2SL8hBhSPJBv5QHKZWbwCmSGofu\nQKosXtoGK9CfuFzeDj8aKcpsgbs9m4NNaGfxrODfRK1GENIM5fG79OZ4vLkQ\nLvMRk8F6QaIzJw3QXy5AnJHzfs8Qe3FkhrDmuS97kADPNoG8Ue1N5Bxrev7u\n8RwOlVxyBzznkeeBtydCLGLIv8MWx1xsZaJqRfl8k1gqtZ/IUcePBiCEwfp8\nxIhEadqE7okv58JRDQVxnBglGrjxCCGYYPxkyQbI9C9hUwe2aNkKu1qyO86M\nw08XwbC7sLOhGHbs8s7gY4tkqIM0XoE7NrlN8132MTgpZUt4CJoCYFXG56PR\n5mk08UkumUG1RfYGQScVtj5vsgiVO2Lqm2jGxDQhc4hNOd1yhtjg2+CRj7fm\n7eR2HQ9y1JTqR0ZUKU0lM7k/vlM0H6/Hbp/hp6piYL+t4Omukhf5hWRijmeW\nRDxur8W0fdTPkoCJaeGnQqHZDBovwMk7cGRhTlVXANL8hsJFeU5bPv4stZJN\ndi42\r\n=Jh5Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a0c26e0-1625105147950_1625105204339_0.3662544065510849","host":"s3://npm-registry-packages"}},"1.1.2-canary-7798cf7-1625130712909":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-7798cf7-1625130712909","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-7798cf7-1625130712909","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d39a7064e2d905c31cb72f2b2fa2f6752e87b07e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-7798cf7-1625130712909.tgz","fileCount":7,"integrity":"sha512-VsS2ThPWkZCRz8Yikekem18V5oUptxNDwYTtsVESpLuLBvHceo170IJmzYvAjm+GsD2La1MymqygmALpPsVukA==","signatures":[{"sig":"MEQCICaHFHpqMur7oD/IwURG+UDM/7rMdFD9ylaa6ySaD+ejAiAJPB0Y4G4miJodoYBwFd05M3+iqSSwOQaO7BiBcAHw8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3YcNCRA9TVsSAnZWagAAYfIP/2J8KHZVmZhdlvZKeNOd\nhdabIkSYEGTLiD09cD3xZVEOjVrpm6iebGssjs6unMPoKcvac3FF4TrfIucE\n28mBLS+lXkvGvrVd797sVA1QYstXdqdQqgSB6whJmLmu0E9k3pDh5E8P1DI1\nQN8nuzMhAtQ0GjkogEa/Dl8lYgwRf+7V8rp7yIAt2leNs9IEg6Q+BxaVgT2M\nMJVgfrGzBzbbrfLJqXa8+RCCqqIfE2xhlwJNNUkZxt4i2rdpknydXoudjSTv\ndsufxbS8iceUhpIUhVZMm6kMgd3sGzLtdulQs7gNytCDnatPMlzjBDLf9Kxt\n4NiJxoDHQE3NGLsIjYQDiMjfuB5WbEf0gJ9HsIssOyzeL/TUMx4CXcodiyKu\nDWXwXo3cXmP6J6acyf16LXxJMGnZPDS39RnjC3oIsWmYmCBpMCt0u0yiMEN/\nV4OQuUn0OKgnrICe2llB09JK7FfA5i5hwzqcrSqUlLYxp6ShBXyswJs/u16f\nzXJBlruiNdRF1KZT5Gkb4BGqsbApKjtBVNx4kpSJCd4FEaExQndMi1aBqLVw\nX7TltqI8T5taPd4fdjPiR1mInVnoe5hJYRpuogOhfCEX99UZ0XvrNc3IDL5L\nF73mxyE134sxk+5AxHAcXvls91V1YqfKuFIPgvtlfwAPwu3XrvmPmTqO7kXL\na1Ar\r\n=e9V9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-7798cf7-1625130712909_1625130764791_0.8016481308358481","host":"s3://npm-registry-packages"}},"1.1.2-canary-7798cf7-1625130677760":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-7798cf7-1625130677760","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-7798cf7-1625130677760","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4bba9d3c6a97fb83e0950cb4320bc98dc999b7ad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-7798cf7-1625130677760.tgz","fileCount":7,"integrity":"sha512-nSC26cEpKIZ4gfeSc5KsWCvCYeA8RYEaK43UOJDeLsE7yI3hVAHO+SjGrUdiM984NLkn/N4vZlbtpjLoZUPbZQ==","signatures":[{"sig":"MEUCIC7tzdqa33BisIXtevFsJTw80fz+yBOtHeFj1cWEnQuVAiEA72Bqk8eUJnBB+gxMUznMeHhV6nOjMvBXxJJjK1PgpmU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3YcYCRA9TVsSAnZWagAACr4P/3ErdG6rWrYKIn55Blii\nXKDcONiQusEsSaKdyCVYjfvQLDX42NJyRyKMj8YfqXUAbg1z16GTSI72aiJ2\nRZaOk6iBO1OkWvio2fDmbTKdW9Ai7VyVs4YjZBq4KoVXfHUeakQz+cRrR7gI\n+tUodeQbfmrT9WEIeT2MsbxUBL9yJb0uKTDTlUebL5Ww7vAxtuihPxqBxOai\nTbHdWYigG3jT4QVbn9dGM3Np7LlTjyiMXlcZhdMHol6ROMV+9KEqqdBfNacN\ny+tqjHirj/e0GsZZWgqUwF16rEXLNB//153H1MQMVEx8CoF3nYO4LI5dlTvc\nAuhni1tCCL8gbD/3DiKjN2yv3bu75cTn6rpwqnM0J5ko7DNe/QNgU+PQilLn\nfjWZNH15AXAlhYQYUl/05XdSxmZVtX7tuNQ9EtVCPE3zBrnV8iAdDMG2B9Vy\naCJ+tK/6jmY87Yp+tKQCeMnC80/KpUvA1Z4nLbhcsk0bKHnZgD7nmGaaJQ/G\ncv5sUnEYvxa+GC/0CjN/2VpDgeN5PuRmye6Xu1iT0UL2/q0VpVQbl+K/0HiA\n1RhDyYVKKny7g67pjzPY1wwOFVrdO7wU6tRC/jzpUQx3PginrbAcHvamVynW\nSRhC9iNQLQuNRmXOK+kedcV5Wsa7xq0FnF8fCpREijGC95a4ANxLdiIgtEUj\nyCsQ\r\n=bih7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-7798cf7-1625130677760_1625130776529_0.30580946237709905","host":"s3://npm-registry-packages"}},"1.1.2-canary-7798cf7-1625130663940":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-7798cf7-1625130663940","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-7798cf7-1625130663940","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"da7a208933dd325faf16c2719d8d31e8a9f1cbaf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-7798cf7-1625130663940.tgz","fileCount":7,"integrity":"sha512-6FtSd4+j7m/EBtiilug+K2NjoD7DR+z15GUhQeEokGcQcveaiTboocC/sE9E13BQ5YAVbyIt3qrRMXa7LruXkA==","signatures":[{"sig":"MEQCIGungD7xO6Rbul0Fm+jyEzhyDBUznzethJIgLPmojBtOAiA8UirSilfzNdnUof0QI/fI8/ZMEAyL6lsVi6Z0N/Eqkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3YchCRA9TVsSAnZWagAAhXUP/0f2RearHh2Vwo8rEtnV\ntlQ4QrBNbUSN6tgvYJ9q/Zo7GvlaxMhNguE9ep1dyiTXw6ZJWC8KvoODFieI\nH3BbzqT7le/EnlUsEQsgHDTDJAv6JgYGMqYcGF34A4dyopV/tbj428H789+B\nDGnDrkbJiigf3lsdokLnXBxaQ54mQtpilFH+HumswDmDgFyfysQAmUIomJAs\nCvVsvYfjCqhXWIFe1vEzyPssp7RpPaF/dTjvQln3jDyPPtSUXwbAK992w5r5\nrdWtEi4pYiniwnAESj3NqQ+ZHyaaydS/zmtV7ptkInjEWi1OX6Trv+5WIv7m\nO82xAnnaq7iIUlSfSm/lKApXayj9r5aRuqEYz/0nykkyQXOxABAsdIn7MYDF\n4EGq1u/Rd78ZtVBZakogECNV1SDqFqyIECG2TF1yiZj7ulb7kLpWPt36IgSe\nptaAz50p0NxrIkIIfEYhWIoUE6rELkNJwWgQBEpiqiCtIlOP5Xpe4WwzV/mZ\nVUQV8MIZZecrSm4V0r/LOvDT0D1C8TisCQyRqyrTl3JvUoQ6TYkmQiDNnJbJ\nHODn3yZIeK30YHyjg3h21z4TrrongJ90OC6UwYtw6GFYvvI5Is/EPT7eabxu\nNgVJyjxHK8tKg6GS249qHuKS+axHfSE7L2eIAFy7Qu/nj3z/katNoMVOtFPA\ngpYv\r\n=zpn0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-7798cf7-1625130663940_1625130784640_0.8118952962887434","host":"s3://npm-registry-packages"}},"1.1.2-canary-c87127a-1625131302420":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c87127a-1625131302420","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c87127a-1625131302420","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3ef64ba7ed37041439f1460772925f1d5cab45bb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c87127a-1625131302420.tgz","fileCount":7,"integrity":"sha512-HeYx0LxJ5HgOuafqdJjzffPPcUQCbZ8Os/wwBi15hduUUDU+5YyhKRILZf9bJ5qIFHOcr9Dd75Jm4pyv8GgeGw==","signatures":[{"sig":"MEUCIQDl1BnOnT+0e2u0OScu/oE4qow2ABxsDOc6x+2yfTBuLQIgQzQTsMU9f8xY34BIc3aOjHbiQe6Q4gMj4Uyznu9tTdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3YlbCRA9TVsSAnZWagAA0foQAIU4b7piiG+1fmNRrUxX\n0g+2uIaHWMwPusy4h7ipnhw5YwOjPg5u9MhsYcBrDEBR+uZtgHxKFh9NGK8b\nlH3XQHVDCzDrzexk2B8hUQ7Vl6ALvNk1QFV1vKmGLbw2goDJlTPwWifIpfw5\n2z6zhqCqefUeV0zQbWs1Ye+Ss7zr1uP/r2Fmb/sg4hZ/Lb5SRMcyjHsXuvQF\ncK99KmzAweJCOsMhRV9L615iMf/ud3ZaqJY6Tt6epKtOyD+Ph9BcHqu2JvSW\nkBfgTS4azjSJnOLMn9hi7oMnUjlnQXtLCCOZ8r34gpEdAqi2FuI9qPFt4Ogg\nK7MPBkf+EWB8oim8K6KIdNlh0HmvYLpRJBmCtNa+yxEy9E7hPk3WNDOCYfHK\nGUoIwB08ivF0aXsbvwhMVoY2ikAle7y8igv0OFhyLeXy3m/E1Q/rust7ZaG9\nAjc1A5aQNUygc07OUd3GtdjdHxhvq+noAD54PAdc+3OhAF1rPm1O4UhLmGhi\n1REFS6HKaLd26D3WCrijIxjXCyNaam6cYqbIBtOI7MlSeOaBSfJkZ2oODLhr\nu3N2ZgQlYMaDsOeLuRaONaDMx91HiwkgoiSdR9dMY6QNev5ot5HEEZ3ytxTB\nJgieNKW4cwQn1Jk+otGGg4PpXx/y2M/mmrWTFUtqvbR39sdzax4r2pB62eqB\nevkQ\r\n=QK14\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c87127a-1625131302420_1625131354527_0.8126853218982486","host":"s3://npm-registry-packages"}},"1.1.2-canary-deb426b-1625145917074":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-deb426b-1625145917074","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-deb426b-1625145917074","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9d75c5d7a5e2bbb9337b5d07d1358d3064d0da3d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-deb426b-1625145917074.tgz","fileCount":7,"integrity":"sha512-SuBQ9CAfPARa4eET0ScKjL/116sYm7mOhFcX+UAFrth4XK19TxQute7vEG53W6plFKXyUys73B4XLkfEMON32Q==","signatures":[{"sig":"MEYCIQDBXNNx4nKxcGfu1D6XvDpmiZrtY/cSWJ9VILbCRXOo8wIhAKhzbpjtC5JlG25oBDC9pxDutsW6FivCmvv9qBwM8ZM/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3cJzCRA9TVsSAnZWagAAbbwQAJ+kJpvsqpTh5ZEPEuOA\nHrjceOsWr8+dZ+VvQrxHKYzJ11BK64WU2z1Gk3f4NbXdDAqYs5qvzK2YsiqK\n2MgMphi4sAbZAScHIDnGn5LdXy4r/gMePH+ePCTk35EH9ceZQWnpKkwMc6VB\nI1V1hXC6r+keSJhCxj5IAgWEkGXyFlRm9fUzjrf8L0eWQ6tyL4aY/UCHdyOa\nqbEiLv/3ECatD1T5DOj3UDj5u7FxNVdfn/1prta1SZrkkpFZcK3aoShniEPg\nNtCHUJIqF2FZcZU64iAdoy4x9YaqiSW65lBpPMTcHvPHPUzbYVWNhn8GETEu\nOqO/30/CfogSxG5rK3QUyWpJuMC82bMoBAzKQ9jV+QkoTaMoXNyiSR5oS1CS\nVH6KeRKkWXfSdm3+g1VICE2s+0iuQVz6c5uU3u3ScwJYH3TZhDgUM+53VwpM\nJ5HiV7BXXNlM8VCg4VUDDayHflhu9LdarXvFzyUOhEkH7eq9za33St+P/MkL\n3m6J7yLYwHRzd46klV18VDqrroBzYaBkm1PGRxDibXWG4J7TCIRyxflm2wiq\ndo0TqM5I+Eaj8fbw01DHqLgCXkapeRXelTVoDtlBTysknrl1q4kErDf6i2tj\nyGHIuwdwbUZTpueQzBofFf785Hnxbfu7NH0HYSAmf76Ekfg5P+PER2D3enSv\nKDzV\r\n=+l+d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-deb426b-1625145917074_1625145971131_0.2425263189745468","host":"s3://npm-registry-packages"}},"1.1.2-canary-f609f25-1625153819502":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f609f25-1625153819502","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f609f25-1625153819502","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7f93583a568d53003ca304b95af05c3be210e2ba","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f609f25-1625153819502.tgz","fileCount":7,"integrity":"sha512-jkJ1BXltxkddwA39W5+wrAcd0kGbz1g7cVocLeoh6WqYLM6L09jbahXDfnVns2q3GU1qWCVFZasasgW7qyLu0g==","signatures":[{"sig":"MEYCIQCM+CW79VzC5luKTIlPtfGpW/UcTjoOH1DHaO4rG5FIuwIhAKDauUZNsXFi+czIk0Mqpgzm9kgtjTA5FLNTOUA/DLRj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3eFNCRA9TVsSAnZWagAA2qYP+gP/MSJk/aPTmUpk39mb\nBpSUK08ie2ClkiEuj73nrlPxZcQ+s10cZ2BVe7Wia7U+dMDqaPzvlXD17IGV\nM1pvolshoLMrSIXOPZApk70F6UB1RoQvXadf+QS2ZOBk5GdBtAPtLH+7m6AD\nuU6gGqW2cxgyOO65n/gIUlaUokJE5+Z6DApY1i1Bt8P9P+LYfaud5V2DNxoV\ncWLz+1i6GrtVWQrlkFEqSy4g+UecUZEGeaMsbkYFHbuQTnp1/OPTmKVmFuci\nhHQDYdiIqWxRAY0yWvxnJgmE3PGJAzMf2JSlrvTFoOC2pABRZpIHlht4rcje\nglsnT5koo/O3DtsVxG7Jhc0NAmCRge1SFmndjE14ptCCpFc5NRfhGTzgWVSs\nPpXYGsBukMwqy0bKIzxGRoO5pkUHJ692hnopujjb/Kf8ZVhplAobdxmdVZTz\nEKLXEp2c9ilf4wzzLemNktMRNLWp7d7m5FUNyn7jy2Z1hAYn/juY9hZQPXjW\nXJ5Lwn7yE8U6h57UmpYuUzsZ+UC9rO3jdnQl9IjwJffblO07UTv7I6Df6T6n\nv5oLuEmGiucpzSd17F36KpaJi9Jn4FCIKwGdYeK27jkncG/D6MrwRogA6QQI\nGV1a8NizwIKOWOrPLFexomqgd55tlg22pOwhfJtuJjOtwUPr/6x8DyKQqu3v\nW+f3\r\n=L+WN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.4","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f609f25-1625153819502_1625153869237_0.7234347504367535","host":"s3://npm-registry-packages"}},"1.1.2-canary-64bebd5-1625154279831":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-64bebd5-1625154279831","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-64bebd5-1625154279831","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5bf7a4b33ac728c60b1c65032698c882b8240d0f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-64bebd5-1625154279831.tgz","fileCount":7,"integrity":"sha512-DDIQ3pb4pCL9dJPk9cOuWD5qWuF+5jgVGuDMIRGd6Omq3wj5JWla7aCZaC5kvUfO5u3+bX7fe+A0ZgZY9Sxq0w==","signatures":[{"sig":"MEUCIQDdFmbelaxj2eZbTH9pYiFKDizNmTi7C+1d8m6CtlyPNgIgOu/+t0JB0fOGeRddEg2G5wPxYyzme1JhSwaM4w4IRQs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3eMSCRA9TVsSAnZWagAAwo8P+weRKcjlhKR1Gaf7mozR\nR9ZJ9hOWI0aPTh9Sm6yxhOALctx6uS3vBotqfGwIb0d7KFycSMU1uVy4PJCG\n0p4YMVfa3is8Hy1SolZ4uCxUWkRX1JD3VbN2LZijtwJ40ojx0X/yVB7bR8wA\nDSyl7bXAfploPj1udlFPlWYLfaeMRZHTrCfSUvJr+2I9XV/GWpvLTx2II5Mg\nDnGXrrV3lHjSoTinbz124S9pcBstevM9vFMqV0dcZd8InCeRbvEf2ede2+sk\n2j6IeO5l31uvVCfXuQy2gw1X8GTQJ1JwqGa7TM69JGBQXXZLfNh1gucCwlLB\nk/yKMNZtpxbtIk0f/J9OREsWtLJM1HauTz646eQuxUaxjTYAt5I+2KHHfBSt\nTSD1p9jCWaTfpGegDw+dgt5ILeo2EVqshvGiefmraxiZts38WxYleVtKjQw+\nahimDZZIxhOZGeCK0XHGyapiChqFTIg8AQTqRGoopwiqYz65/iQCntc1EH75\n9P5yTBGZn6H3RAXjp/AHwhWyfArGudaSu81aDxxSZ3MbHZymZFt4S/hqCDQE\nS3H6ioTMU0gmv8DNmlzX/Nsfv6VW7fpnAy6nnDPEHyWE2P55rQHq8+xY/3xP\nS679b8T1hFKOLVznMicZDd7Rjrxwb2txdCAQP759k2CbHcsSTdyBiJOo/Xos\nu0J4\r\n=ADyH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-64bebd5-1625154279831_1625154321995_0.741614451583801","host":"s3://npm-registry-packages"}},"1.1.2-canary-4781e40-1625154639338":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4781e40-1625154639338","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4781e40-1625154639338","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0f6c52870d313ed8dfd246e0ece1494279f16e27","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4781e40-1625154639338.tgz","fileCount":7,"integrity":"sha512-QB1PVhCpv23VyRa50dKvXS9C44s0IgQUVCbPGRSCIXCOV4XvPGIDuV6l/HvjUp2BNqY3oxxO2olD9T+lTywN/A==","signatures":[{"sig":"MEUCICA0/T1DIbunGn/9xXxldL0IrAryFZT9hQnfl4O72LgmAiEAvRZkAxcpP8dJHvNxzkr4acUJ0UJtSMrtUV6hdXDrTFs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3eR/CRA9TVsSAnZWagAAc9MP/RgE2oMdpVPBFBDwJ5Qf\nQ46Y8GoXJq5/rchJevhS6bjkX4hLXaLH1wBrv87Ycn40Sdxm8Zp3flj7Napy\nje22S8ZllANZLSx2bEu6nYygXjzXnspcEvogP2AxfTr+4FuajyIjKxX8y009\nz890tNWDJOCZP+n0qwaOqVwUEa2/cOq9MUZbj/Hjcw30LKv4M58232O8WFfT\nd7lWa5k42sTzIHcYSxqu9vW7TgkN/Hz3ricftPb9ferGuvscnaM4HUnFkBcm\nnMQ051XbkOrdnGayAWS96/TU6N8HcPpKrlMJcgPb0xjWdScCpfVOVrQ11SPv\nNSXU0JQjq6tlAuYH5hYtjsk3OgDOi4wo/5f4zbmbrHP7YSLn79q9MrWshacK\nIXYaPDjb14OU3r7tY0naA6vMGi2t/hlz+pDtmz8H+82P91EW+hpKAwp47e/2\nRcjFwAhXsLtDviWt3MNA66t4XottyeP4cfX/Ytx4gwOSAksLmquuQUyU5C5c\nL92RDWpRNZZfjpyozwC5vhAhOIAEkK64tyHfN++/6uycoLY0zNo2q5kvw6jr\ng5fQGTDO2HwwehSXYWKDNyaEFPVOxEZU1DzAHb+GgOjq4y7vDjl5jjd1iYbp\nGYbA9ZGgZKfeTrayEUYhEbFi/7LErM57L7VGOPXhwZxzTRcH65ypX2fkadHu\nJxVh\r\n=vsMI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4781e40-1625154639338_1625154687058_0.07627098955118439","host":"s3://npm-registry-packages"}},"1.1.2-canary-1120031-1625450628689":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-1120031-1625450628689","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-1120031-1625450628689","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e13f5104d86b3bd688055b5b7bddf4613e93819e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-1120031-1625450628689.tgz","fileCount":7,"integrity":"sha512-ZqGbHiiP+gC1/rRluSDnwhSu1HR9v2AhtCQY1p1comItI3U6m0ncJS4ZT2MmnFJcZoU6EWvTGYnvgX0j+xU9+w==","signatures":[{"sig":"MEUCIAu56BaQ9OGEIitkkapUTDxYtsipF0eRrhZi6W4kuJsjAiEArUwJkpSFuwpeR20exZkZEfQ6oVz3v7bJKBRDQOqLJbo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4mi5CRA9TVsSAnZWagAAVqIQAKPC+/8WSsecB2uQGc95\nqe5ha34aIqbqmGDklbo8Kj0f1nWGtKhGK+yf7vgxPz9MZM0LF8yZxKwPOaI4\n2hHplCyF5I1FBsIqoURb2P09ustj+jN1zvZLDp7ZQMNTlXAgJwCnD8W/KQwj\nOacPyoyx8uUqfgdnjObKw+awju3BE0MImtD84x9ofQQTwWw8zpW3EuIQ/0Oi\n3RayPZDyPlQdNkBEQm212Hk6q8Unem3EBwojYBlge35woqbgU/dvaaE9Jn5h\n9J0W0suYZ7rst8DZe9PwvSjOL6iBJo/eHk/Vdq926FpkmK6Mxmx/uX9WKrdh\nRtjrbTN81tgHyn/m1/jlRp1SDEfmEUFqlZm7biX21s7Hj7pmXSqobLDQs4QV\nDfhLSsoVM4Q73fsKrOBLTSkK7hZYtYqRHyging4qnpNIRa/lx8UrHuOBnl6V\nL4vWYX8aRf6XALXBRHmq3W3Gxg6q7vCJ4f4k1yUEaNRomaZW+YdUM70G/eps\nGE6/HIERY2UhIuNggXNkvTMyhmW4x/okX6gaNCygrQ+V1nD7t1lboqb3xMiq\nEL5E6YdOoWDrgAniZs5al1RxTBDj16J7sT+Rutr0mbLzP71Q3FAw+RbvJ0Fy\nb8At2D1LxHWeNxfMUQ3xM8ygmrtqtCIl97kk3aupyzOOqc+EmtQPHbylfSMB\nCiTr\r\n=Uih1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-1120031-1625450628689_1625450680766_0.8429417675281567","host":"s3://npm-registry-packages"}},"1.1.2-canary-1120031-1625450630307":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-1120031-1625450630307","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-1120031-1625450630307","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"029d68fa234d48ae7b491ac154ecaf9317713794","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-1120031-1625450630307.tgz","fileCount":7,"integrity":"sha512-Y5K/dWR3Cyes2tL3sVpyDIFW9EusclhIvK8ZJgnY68BteLB2ctqznJ6F3m/ep+JwLO2DAnKwQjXDUJGfHIY10w==","signatures":[{"sig":"MEUCICUjVW2nT2r8h234rR8ymvgD/nBXdBedTZfpbqfQstIIAiEArGmxu1wqdcQ7pdV5W8Sz+jhVqrYQfulOpOVpUDaziQc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4mjECRA9TVsSAnZWagAAwdEP/ja6ZbGQ3pG02IzARANK\ngLxxwsQdZYInf6zI17V3Ey1uaA8HSpTGiNWVCw8AlhXim2JrIshPQO15Kp3B\nX49nk1PPIYzFT7XS2PcMIlQLLc5EZDtfPGg2qB0YX73REh2pKN69ebmDGxzB\niX3G4OR0Yqg4u5YBd7veiUQHebGAoW9Gl+72cnV2AoGUBiCbn2JQQcljitef\nThfsALCyJJ8/6lkYcmLGrv79IHbxJrojiAXinj7ZpbhmYnGmwu1V+RCiaxXT\nfK75SUcD3z55gW5Aapg0Dp4uUfXYDFCPIJncRK/3HQR9Q61VzLcuqM/B/qtj\nqMe1RIRy99nrrC8w4yjM5YkzWwjt17ZM4Kgoj9wFURJ87aM4e1KE2G1IqfnT\n3lajzrrSAeOiGFk7i2sufmKgwwUDhtXiiFgSRyin4CfORF9Av7aG+5CQhMOv\ndu2YRIaRZPgwFShqzDevXCZlW7v2pElVlDNa4HzWG9skS969fAWGCwZHxfSC\niAXslNGMknTV8m84BJfvYWSMGMT4ImXij/SRPb1O6uc2lH+ZSJZ4WyqpQPGy\nsPJMpj2bDNjn+0YRq3etjvTdkYlQM3s8G1HlfIJ6u6x4Cop9Y5l8YvXriWPu\ndjUI98H143oC/qNdH6YUi2lqPXxVEjpf/pFfVX4gw2AiuAOiJPCA0q4/EMEw\npqq6\r\n=Sabx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-1120031-1625450630307_1625450691656_0.0628916612237822","host":"s3://npm-registry-packages"}},"1.1.2-canary-1120031-1625450646678":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-1120031-1625450646678","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-1120031-1625450646678","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"200f40b3e975f0a44e3317e93cb21f65d59b0b11","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-1120031-1625450646678.tgz","fileCount":7,"integrity":"sha512-oBf3e++sl91+9/Pae2mTZmmjVmIVJRFcMCu5ixWzaiOiMAZPwBfzrQeKZQD23QmwDfbj4YVpPWPXxsGpRqGtbA==","signatures":[{"sig":"MEUCIQC2UQ9e0lmBsfc10tJZvgKWYgD7bAU2A7xHJVhTX/E2QgIgSNK6a4N5c1ZtqM4o0nrMVlp1Cb9exBesBrdpUC2xfAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4mjNCRA9TVsSAnZWagAAGXsP/Rtpx14pXUXynlngWxsr\nUyjLvweQ6MxjoCqfPfmtUvUOZorIWBDtGCUBtF3yqo8zzGoghF+bChmfi/eS\nqArybbDkWcLQ1npM07KKraWR3ppCwGkHtpz3tFp5D9ouu4/CNUMYZ/X+R/b+\nJGab/fKcFB+9I/AJjhYnwh6M/navK+jwcOnDI2KAMQE41W+eVpwwxxhRTqZy\n6xo+/1cDgGXOSN1ya2kOB50Rl+7k9+SFvt9aZ7WC0ZeHH+dbnBtfrlA7BN+5\nb7DdDE18GFmYUQnb2ToWa3nBek3aRVSRc+Lr8VOe5ytInx1qvuWxXOIc2Lxi\nZ7mRfstmTQOU6jsR86jU5jRkiF8PIc8I3p5zEBBnnJDh5g0GALqCBztFPll3\nLpQmSZfC2kRa+q7YT0ow5sNi2w46+ZQSPxAH6kbR62etEYoEqjSY7hyl36TS\nFwAleNQC7d9uX7Az5nGgyfyOlyiL7EkK5u6CRfnZrPbkEWSSSVizD8jpZxf1\n/Yb/CLxhyA6d6B30cC+YnrmD/OTQwtUEqUrYA4GAX1tP0gcxsVSEG8wktvZ/\nPwuqqBU3yz4IgxFjr05J8gHMS0bYoYm4wBl8/tDqnhz8WQqum6LOlNKd0/Ar\nxDvBQW9Xc0/SDvaSn53pQIviaz86xRJmq+U2HquD6pwY4pOQxhvPP352d/GQ\nHwVh\r\n=QYR6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-1120031-1625450646678_1625450700793_0.48477602619087423","host":"s3://npm-registry-packages"}},"1.1.2-canary-714cae9-1625471963924":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-714cae9-1625471963924","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-714cae9-1625471963924","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"00d66fd8d2a03d89a366b28c67ed4a6f26bb5f03","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-714cae9-1625471963924.tgz","fileCount":7,"integrity":"sha512-zzlsTpX9Yi2p7ASe9hZGqef3s+Z34fZqNjN6lWHD+05iXK9crowRXhvNvLRFNQhmbuz5/t9yNPIsogSMp9KCmw==","signatures":[{"sig":"MEYCIQC5HjSd9X7b+ouFLD1kP8/JCLX7A7NcxPo5UuT3nWusJAIhAOfF+MlhvZVluwaADoAJgSoO3XiH2rsNzyEUr/eQqD5l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4rwSCRA9TVsSAnZWagAAa6oP/iqxi2eQ5HbGjnbdIQKb\n+up46GagQ4/BbKd9/VoNYWH6Foxx2Xei7QyzjbBTqKOQR/cTOq2rNEdJp6AZ\nNR2/zMm2YU3y4HDls2OBrRbxyElZOP43QvuPQNyBehvYvgB4yvVuWS8Radnq\n4+5TrpDZnnwvrR392TPbq/TEoZcdeMhc40b5Ehu3xzwioQGdxLORXMwhNEzP\n/EoCuMYhK9oh9l6gcjRdJf8S6BF26awvwne4OgyhRRrRj1hd+jNLRY6trWOn\nzzzN+clcfiv8X2bfXA+yrcDmd6RTJtrqjhYx05SCIlysDsTUMfLJ3k0teLBu\nFT0u6XUlJQx2Y2IXZwQgIa3MQG7zJLOXBRCwR01xz5s9dwHQgOsmDwUYEJw6\nbp0fAjKrtcm2ZPmD7nUB3/j3ms6AhtfEU93qYMxUDoUFInc6atBO27Lx2LP0\neTmOZDlAD1w2lMzB3mWXcOan55NzpTvA8Zf0vMd2IYzmXDVUTQ8GbHYoGVP7\nD9PngBsS9jAGsa1hu98OEw10FQLQhK7H//fsWck7oXAKfxBB5VVyiccDwEHP\npO/GAaAgH/ZN/vX/Mrqwx/doKWahh+6IR0gqYhNLwcFR+V1pSsuJ0pu/EnWq\nryDzKOO5F9ZPl3mPBooFc47Tqqycn6wZi4i5L0jg6J1YDCegHcIcuca35jDN\njl/F\r\n=nAxo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-714cae9-1625471963924_1625472017845_0.45661019773814093","host":"s3://npm-registry-packages"}},"1.1.2-canary-9baaf07-1625472443909":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-9baaf07-1625472443909","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-9baaf07-1625472443909","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"92a8a65ccaf6fd26219eca5cab5e21a52fade7be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-9baaf07-1625472443909.tgz","fileCount":7,"integrity":"sha512-rN97HGLhGqQA2VfGnYoVOBOf3zp5dsNh5oYobOZuxoAydIL5oP2L+gKZazz85KhSVSklEQQyH6JIKyMcgr2ICA==","signatures":[{"sig":"MEYCIQCxHWsP6Wt6SGRzDCLb3lM2QvHZk485kqZZ6rKsUuw1gAIhALWwqWdjlzkd6aFZTzOtSHY9/0LwXPraYx4gIe6M/Y/P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4r3rCRA9TVsSAnZWagAALV8P/0CWecufh+972gjCPhJd\n7Lda3YIHOUCsG9T/a3abesNhWxtAcaftjUpGM1FTD5dIQeVq/++rfCEtHQFj\niKIR3dA1VPlYimgVdWzbQznoNyoU4tOt0/UgIIpa1oSikbO3EI8dFC36xXke\nXxjtJJbfaDm7vXT9GdGm9ACDnQL7zZf3t1bZP6bBSWkyvs/HkCA5xwPjW84O\nFEeyzKIHf6NpNfcYz60bEPYSk6J72wXnaSEO3AnutllOJJWB/WPgYUaEvonr\n98QWHtVHEcEleQTYBSHkBvg45si3sjom06Mt43ng5btfZypv2eSNT/7uSSU3\nPtXmLgooP0g1xgDDX9KTSZOxsYr8fN4AZKlJELARxzM9K/KlkMns4AZbIkes\noOKl45zo+BmdmWf5pUACQFqc7l/GytfvtRM7vDggikgnyrH26ao535cZ9sK4\nEbmWm5VK9YQKnBUQYyki5mTF27pymMHJAFDzT0LoFaFdRgVbrMRVZkqxNN/H\nwMceGaOjnKGuKmXiCDDdKml7ZgZEY1vz9Llyf5CMA94DcMZ8JNcRrmcnUuAi\nx2QtgboK7AkDKNKgQ32Iwph3HWh0oFQlxn+wlbFIQlq/xXAXVniY1FVZe2Qq\nEv1YQZOZb6yNW+CDC5ckQnFYoQurrw8+EaBdvGaSNf6Ccv6SXfiQ5F33FEHP\nCsX8\r\n=eds4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-9baaf07-1625472443909_1625472490958_0.2199528452357744","host":"s3://npm-registry-packages"}},"1.1.2-canary-9baaf07-1625472468852":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-9baaf07-1625472468852","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-9baaf07-1625472468852","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b96a16d1803e644c05114115246473ae95111957","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-9baaf07-1625472468852.tgz","fileCount":7,"integrity":"sha512-iFvoCMPj+if5ffWcuxVlvexIMvr+sxa2gl+X8f/H++u7WescAsyzt6KpXkIgea1zQI/RtK9AHDBW6Ek6XwX6GA==","signatures":[{"sig":"MEUCIGdhUaVdIlBbZBWaQQpRfiQy+rd1R2LOs4jvPK2O/8STAiEAh7uk9yuZhhitkzhJVLxhhg30jP7Efaf5o4FG4Wja2t8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4r4FCRA9TVsSAnZWagAA6sEQAIvLmbhNF1iFnU9B0M72\ncKVwwtzI47mndagMzDD8mYVCtqmUM4EynAJEyxTFrCwOHkfmmrI4LLQyMPyN\nf54iw/FpRpDQapXNGUHgK5qO/IbRcp16TZLMlJL5OQU6sjWqmLH7VGGwdDLB\nJayQpV61telWpKnlwthzi/3bcEg0ongjr2W2diBRM8uT3ur7u9I0yD9SPuTx\n9ca+ChaV6FZ223ymwpZT5Xc11xyDengBUd2UozL1x5tJApgY6sxbiEm3yGnc\nCt0HU7mDU5bgKWrrBANgMbSzLdNgr1TPtS9TUoxcRVjz8QWhVbMuLO3I3yj0\nxZVEf2YkpDdOCSrfEVu7/6rfcV3XaLP6QwMrYLJkqRQDcdq43hqDMq7pK9Fd\nMfpCYNxpQCoYHzvizQRnThhoJUXUmTP+me8vL9iYV5xcKCOsje+EXrIVJD0y\nk6jb9MwGyC6Uy1lCqy194Wz9W3p3pGc2BGZnRDaathlgO4MOXFWt8WfsJr4a\ncN0nViEp2Bp08dclx/gOSH9p1xV2nCXb8WK7PxVI9yQITgOPmxDcbMumMD+3\nARNPOqOcU2QLXL1zhMCbckhryzYbfI4zLrPe3TU2PmIqQ6iNDQ8r9OWhhrp2\nSIXc2uQEgYh6cT2W88QQKoKFMDSc26Ne1/lDAkBkEPDy1rv46noDV6zXocx2\ne6jz\r\n=tuGq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-9baaf07-1625472468852_1625472516605_0.4740446248343877","host":"s3://npm-registry-packages"}},"1.1.2-canary-57dab38-1625472787207":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-57dab38-1625472787207","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-57dab38-1625472787207","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"78e325e48b3116f0669c399c1fd9d2db1c6efb55","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-57dab38-1625472787207.tgz","fileCount":7,"integrity":"sha512-qp2VJ8Qj/Zm0fOq3DhjAoCJ6B6RoHVoyJjOBKdHjMXwyHAH8aSs0Jzw3W9TCVMrzGZc3rrhdAZQu9J8I/bx8Dg==","signatures":[{"sig":"MEUCIQCvPSG+4j4ORtJPzuDsFFEEiiczQVX4HRly9mEnBmo2pQIgZoQzxV+Rquxr+YSWTHSK3pBY6cb7aeMAwb49xT4SK68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4r9NCRA9TVsSAnZWagAAvHgP/i4I7jVdcvJ8SxPQxQpG\nFIp/ZfZOiELCCQ9ZjzBd1EqtdO8i5qpqKSkdm6hiTK9/XsVwnLvhqXJp+nlm\n5kB+UjkbJt2anIC61wXOa+QSPENpvw2+H9/JH6l8U2PHmgkRkOj6eAWprU4U\nLS74iCaD3uf88tfZrcMzbnzbRfrTNnCYyPa+NnQcnNMnHSQAgNhPd4faYb2L\neozetIVjKDbzRqHmmyLpIzQdHT1u7zcxHLGBfd+7TOGV641bb5XxQxrCzshZ\n/wc3ZVrGZLFjtvtYolguBd83q1Lg8Qo9m8b7lpfEDy9fTSVRCmI+sUoOxA6g\nPwhQYdB/+4iVquvC0WQnkIRhxT24ye2qDxRWW+cc3rjZDcPRJ0v18iD0pViR\nhrXHvb8s0/u6HjhpYRLA46vVy58BfH44hns4NoKty2dhWwwllXqXoRiUQwSy\nBR77hLCKfWiMNaj3gNqM2Nmi+izG56f2hArdfHcxm2eXjNnRRSagtfrL3icU\nwMHDBXW8anMTk6X+/yJUqgrPRfOI4qpThoKP9vLKUuklgQcOCQv0oxJu2r01\nxyNFxxR8Jj+Qdr10ssy6fW2gKD9WEPCwmgnbhj2b8i1+dWyW/GRJTSH9h1C0\nzJb8UYs/hm4MWOdd1uBbSzpDE3Tjw0b+/djgtpv+fMauX0WQ7hW+8apW6bx8\nBZ1w\r\n=cRoO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-57dab38-1625472787207_1625472845443_0.096873239313221","host":"s3://npm-registry-packages"}},"1.1.2-canary-354d723-1625473028819":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-354d723-1625473028819","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-354d723-1625473028819","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5df8fed33ea901ec398f14041c58aaedbd329850","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-354d723-1625473028819.tgz","fileCount":7,"integrity":"sha512-be4rEPzIH82HMzyxdgirbegIzYmMxR9FnAVOvygt9fJS5Y9uo6fk7CKLlnzNwBDlSh0tX06BTqXRnvNF8756ug==","signatures":[{"sig":"MEUCIDOxjJCw5cbbR8Ez8r7W7Rseztx38MugDMZelP27Ls9qAiEAqKL7PlWKrRq9YcYTsrQAhWvamuR7QDCaBYiMeN4O7nQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4sA7CRA9TVsSAnZWagAAC5IP/3mieSmncfMD95ltsCG5\nlVO+GqWs257QxO4JytRO43da64bS24fOCqAt6iktB7RRgyzQ5fcu89zMKK1X\nEhqYPL5TIs1qZq3MdwLhBlTAxhg7ks+c/j2Qzl0KB8ATy2S/eJSzCIzMMNJ7\n6Dp0Si6fbDJ0GOOf+XYMyaAg/hQZqadgCyUjMNnhWHGFx+tIj5OBMtapmBIp\nELMjaLexnLH05xP59QoJ6ghR7BZblC4MEimpgP9TLL9DomCZ4yBKnVJFo3+5\nDFiRyCiRbkCGvJuN91yY3mRFICScmr4KxnWpCvYGxz0BKYW0m9myPnmZTK0C\nJKyZmH1ov7rvGeP3Vt8+bZTIeQ2gw3IiEumYns8c7AI92U7HYFXh877r7aA+\neo+Qv/G1ZVds23NggVLL8krep958r88tBiT8YZ56u60qIcEVvt6BpDAn6EB3\nJ7IgQuiS28Hn78lK/dS6tFT+bYBH62y/GSEBe1j6GtoV0q0Fn7sCHHlVzGmq\n5xXMeXdj12OIGza4nlA9fjEwNuf/Ni61gpU/5F/G6LA7h40oMpEiUCjkgaVr\nqnjovPyITzMFjBXIlZFWtAjULkAofBRuNayRu96O+4L0w/dBDcsTQSOPPjnm\n/dpsORm0dnrzcmLmiChDMKVBi6F/2K6WDrSWhynqut+D+Tk9Nl4tdQzgGRY5\ng6vK\r\n=/Tie\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-354d723-1625473028819_1625473082904_0.5298909013389239","host":"s3://npm-registry-packages"}},"1.1.2-canary-354d723-1625473060404":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-354d723-1625473060404","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-354d723-1625473060404","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9787da4dcc7f2df424005a1a2b728433bc4557ff","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-354d723-1625473060404.tgz","fileCount":7,"integrity":"sha512-/wqP9HpKNuqwHQpwCgNFzSeeTk6nPUMYKIS5VlVSGJH8ptMhjZhc4Fh0QPZ7JR588M0VfjCzW88cOp5wfwA2jA==","signatures":[{"sig":"MEUCIQCpzIXOTwarytWIP1lkHW/Y8Wnnn0lN3DLKwLexiY8lxgIgM1k1+AD/k7OFvGqnSE3Psg8tTZjJO3DH93f1hPTaZN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4sBbCRA9TVsSAnZWagAAjvsP/1NL08nH3Y/yo/SgWEWJ\n6rVXBGfxZ/WcsS5Kt8rCPaqNdr8pTV2ZzAdn9vG0yC4iymRyLxm/zVSyLQGD\nxa6lHxJHUiQgO8hZtxJbVH1iKaISbZXTfyJEfZIfAKrLTf+Xb+hN4Yh45/36\neNEFWfM16UP9k6CfOQbdb0rX1MAxa0HzGwjZVT4OAQ6s8b+gWkFS3UYpppB3\nxduUoSIoHdzU7n1iZvKa1hjf+S9afD+ugaMUkzkiAUX0pUmor2dgRpRxex5g\n6ltocrpEIPtZoZhaHTw4o0VLRqtxigcrWbBAKBJy4VPD8Dxy8B83J1i5L135\nDLFjrVukYjnV2wcHpre0+VuCTo1iQJLuLy+CigDa8bNlpKKjhCdgRyZRnwn8\npW0QpI0dc3PojGovlt/KPEpElaR2rsMb/MKakcP4OMIKWlODLREeHX5aIaAM\nWlHLtu0yZMfUDKZvD62MvQ4AnB9TO2BDgjxK1eTwFE//Gv/ERvge5giDqCzl\nNiXcmVM9d3jVRpkJRcaUGLn3i433esFXgDuptfnwoh8q+RbgR8qyUIbeu0lx\nZZGI5FYmkEPADvhZwxPEhnHF9xPCMnkZINK8yY6ieFr7emTuSKTBw2BhaKmV\nSx5qVsdlk+HHXZOs2HN18B07utOfH4GhmDM+k/Kan4kAhT/KviWKJuHoCZlM\nJpB/\r\n=XM3n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-354d723-1625473060404_1625473115262_0.5538054862348387","host":"s3://npm-registry-packages"}},"1.1.2-canary-e2cc81d-1625473278576":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-e2cc81d-1625473278576","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-e2cc81d-1625473278576","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a66541b9e91f9dbe30dbbd52c7e48e70a33d37b8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-e2cc81d-1625473278576.tgz","fileCount":7,"integrity":"sha512-XgisL2kuuFdGSX4OjuOqnwGG7FXB+QVj1hMaV9k5rt2cZPua+C27jZMaEnDy/9HdHqojFU0nvnU339FU19mIVg==","signatures":[{"sig":"MEQCIHR7/ebILFsS9JUBCgcxRwSp3KaqBxScXHKXWheYNH2rAiAaO2RL+gilayxWiInDECpS685Xlenr3z57E1DlnLAA7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4sE3CRA9TVsSAnZWagAAKzgP/jQBwo1hhTBEgPMU1l8M\ng14qlUqhcRHOi2gJi1DVZ2Gm5nfndCYiCFhQDrtoA/UZuKccwwM3c7qhGzLP\nM7RUGtz/CKAZJc45Y2bRSVojd4MzuwPonFSJTOyq553SqQpLSK1z6Jf1vkoZ\nIa8DndOVUabg2QQfacorTLh/n94Om7H6Mnvptk6IBZ87X2awd/XLuSHWvcv+\ntVOJnJIhMRmXq53D8XgNDI42zPES1Zm9ta1yqAinoouaTcoi8XYWKTWVsbp8\nsuP7diosXzyztwdFx7COMl7CgtgJlip2VcU9whwwkcKoJEOAXtzvhG70jVP0\nv/f8ftPXcuLLa50BG/pP8IKow+xJdOqQkk63HlX7NwUuWcp5udKUiHKmWfRu\n0NsVmaPJaUyMpd01WyMAva13SDqQPmpD9oABZ2O6iaymPztSvZkMLepcDA2p\nALShY4cvrMXMmWmppaB24zIrQOUv5F9E8H1B0EKxoEfv+Ka79TAHGsF+bJhW\n5qzLdtWTZCHHIu7I/Cw08jGjasSgib/j2tWYEkNVIhd2qBev06WaDSYQhJrQ\nDkHUkZ1pA137sa/5dSon1o1Dd8ZB2rrUYMBV/XPT2ANTTYpAvO9vXd4ypdB0\n6a2v549RNQhL8XKlYMUTyjpTir/UYbJrhSW15i+lRkRQXAJM2vyquh7aP5Zj\n1gXd\r\n=cnrD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-e2cc81d-1625473278576_1625473334844_0.17487664370668266","host":"s3://npm-registry-packages"}},"1.1.2-canary-dc8fb96-1625623432508":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dc8fb96-1625623432508","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dc8fb96-1625623432508","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8551397f7e2855edc3b0ee294e86a023e49f0784","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dc8fb96-1625623432508.tgz","fileCount":7,"integrity":"sha512-65iygx3FFZy5RCmTvaq/tzEsFP2Ji3LrpPz/0zZnRsLayS3tn5eJT2cxqyEDPM6BPraScd2xZUm7h2ochfVpIA==","signatures":[{"sig":"MEUCIQCBh/bdK5ttVV6J3BqvCruXunrZAwrBgHY/Qvn3REyr1wIgfrsyDtesdv3FkXxnaT+aYKEpYTLIX9itMlN0h0Tm1Ak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5Qu4CRA9TVsSAnZWagAAF/cP/3n9pK4HbYSWmUDXFlRX\n0SuK+etOglGdOtzOsXLjRsCOrYqxlIpfYphd73K/EryXvX7R2cQCowZhuZjw\nIMJNUqrNNpTyd9nnimkUNYDjsjHarX9x2zdeqlb3rSlh+cdzHCHKhdQy2ljY\nWwEKP+iTZCc46yaGdE8rMN+WIL8Sxj+134WUoiuj6vw0Bn/2GddHXvqhaFsw\nI7sIjVP49RBC3yCASCC6vIElOn5CUZ77I+wTvvkyZsqXVzb3iqq4Q217kvGM\nkP8SZ1NDSMe7KRfnbG8bUy6Nb+yAYbHAEyE0CgvflSNzko22smFDAvF14rVk\nM1084+KZ2KN/hn9Fnyy75+xE0cds/ru17ZjhJjYih4Pe9EIuNHuQkk7yEnbJ\nj9R/Cln2zfRqpET8tMZN76YDaQcXBzhFvCnCgy2WqizTkPV4QqD1wou8fhOg\nMrG9t3u/E8NqikEWdsWH1q6mEE4t/CeW+HJwZjupt4Q3jj6FfxlrmxrKUNiy\ney5UMNPZQn0XJfifAYNj0/aqYhSHA4Y/jkmymGIZTXnUYq6JwfEvTbWbN209\nAaN+bx9XDujbW3BslW9gZ6we8nApr0CjCq3ba7Pa4NR3crIXHuIeoUf1a3Ja\nL8P1EXZd3qPGohyU2B5VpSUAQgGJXEdo7cAfoglh9il8XLq7EYuFVBvJYcBl\no9bs\r\n=747y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dc8fb96-1625623432508_1625623480457_0.4687921274313902","host":"s3://npm-registry-packages"}},"1.1.2-canary-dc8fb96-1625623432445":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dc8fb96-1625623432445","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dc8fb96-1625623432445","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"64a8a54d2ca7f9c19b71bbf742dbf8d0d12dae9a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dc8fb96-1625623432445.tgz","fileCount":7,"integrity":"sha512-At6oDYEfhxRgzm0F12IDeQkzxrOBfHUjcHRVuyi8sHaZKGoKBwiC8zH+n45x/t82nCLuiICSkSeazhBejfSVjA==","signatures":[{"sig":"MEUCIG2tULqi9G2jPYnWWqe3hzza1MAn88vB86xGN7IpEbgmAiEAwJbq0i3SZTcLwK73exwFL0avt0L3qxeFGdMGvg2zU4g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5QvBCRA9TVsSAnZWagAAKvEP+wQJ0/vw8y+2WwXauGDt\nvfTQqUrOJYkyihFkAmGD91mGlmMPgTCvlnt/kjPtk8S4xxf76MR/9zOHJk0Y\ngM+laYYJeQW8k/YVspkE5BJ069PMtgoZ4QULmeGGAp2uk6ioH4ae/Q1xwbtF\nidErXjIAHvOeMH4B/Xm7junRYjKvufAfMK8dRKRdBVBn44m9f7ES2T14uDa+\nW4DSO9qfrwL0dTpF9+y+k34CFFCWVbxtRY8zunCMWOU08ODark6pfxWloHWK\ndd6t0mgXeGlMg2YDnz8vP7Zoq/7sS2Wo5JFFiprvLV0mhiayxZIyFHHX7hiW\nyI55XGmwRvlM8BhkGeKpLA9E4dZ0i2MgVW3Ds8Jq/aqfIA3auG0vNOcrJQBF\nT/C1J3lqKik/cagrnHFZB4zCVXJkLuWMyQSJshpJ4BrFeoHunTYTYFxUsXq1\nx5AgduLxAGju/f8QNhdkM5Ig3DwoC8JOvUJVfPpQKjs9Z4HU1b4vdxhBBBmx\ni+T4VjG+Ez0SNGX9LqQ1NaWpPlUKwmNxVscDm0wcYjTMUINDazIb5UOXLGDS\nc5glb6Yd+EYRBZsAsy0wawXVCvICm1Pr6xpdCPS/9BbsIj9rO1/JCG7VSw48\nfl3DwQxnqCSijCSChLvd6XFOpCGaYfP+5EdKMSyvF7U6ZQtWUcT+/Rh3usIS\nFbsY\r\n=7ae+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dc8fb96-1625623432445_1625623489153_0.9046282813684219","host":"s3://npm-registry-packages"}},"1.1.2-canary-647f947-1625642850628":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-647f947-1625642850628","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-647f947-1625642850628","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c38e63f61b57edd70233a64f36c5e2dbde04b06a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-647f947-1625642850628.tgz","fileCount":7,"integrity":"sha512-nfumCSA1zfzkYlaaoxBEjC7PtBWteZ+xDsYzzlIuZ6bt/bbjP1rdpDsarqCtWtzmQUgbktTtoss1k0MxWVZeJw==","signatures":[{"sig":"MEYCIQCFF/LtcsUYVfsnVO1VTchFaHzKLewn2i02FZWbePHONQIhAOGuJ6tMck39sTNPa/KZZTl7eqiYtVPQsWtX0JgDt3j+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5VeTCRA9TVsSAnZWagAAencP/1VeHxc/ohOC/oBPIwDQ\nUVT/C1y/3hBjpD5uGpC/oRmvNzBRLzc7/nYnWJxjS20OQGKuYKnCsJxMU1Zx\n2xhhgqQckC7LIFyOgY/POrs7m6J+5UxtOtiXHcdUaWRypb7S07pr/vekogZu\ngFnYhhdQCXO6NlrVVIt4K+MU3mYsDThkO744kOgoajrlynKembHswVUpp7Pl\n6TOVrcOstjawD4DV3XCZW2xBlfjMgQyZPyBCYH11EHrx7FvoRCz9Ry6hovWg\nY43G3Y3qWFfWA0AhBxywYbQgSkHQzv/v1pvLHNR07sBmhP4mrMv9LNPM6FG1\nH8meI0k1Lfl8bnsT8N8GaM9wRMDl52OMvFt6bZjqVmyD2LzJv2RWGUzA6xki\nq4cKkWULBXTCvCTD539WPk353PWSiWfUnevz+osNuDoAlwUymAZ6Yn6306uf\nRdBoysA74SdfyeXyg2UgKyUvBUSO8ZCujwknPJWz3Ts6UrF+r4qIghhLIG1y\nYOEaQFBbjWsnbdsZLgUN6h+uCBq3VorXGuopIKLAOpMcfGXbXFo7SHlL22pZ\n+XC2NL9Ckue0PIu/D1w+AgOLMV7mgu+T+ulekEJfsPRviNQr9uKyko8JR5s0\nf8dQJt79yCCEQuEeqBP73NWd8a1u+Bfisg1bVEQhAMuyEocY0XzWnepTX4Vc\nRgal\r\n=m/ln\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-647f947-1625642850628_1625642899291_0.4499708058511174","host":"s3://npm-registry-packages"}},"1.1.2-canary-e77fddd-1625709892995":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-e77fddd-1625709892995","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-e77fddd-1625709892995","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4208ce1114874d91894c9c968536860dca306a95","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-e77fddd-1625709892995.tgz","fileCount":7,"integrity":"sha512-/MkyO2Wk291q+WAm7DV5iLqhbc2VA0Fw03J/8B2I2iO8QJ5VRqMnBHob8y40KB9XbfUoaiOn1ZUrE2ysuAZwWA==","signatures":[{"sig":"MEUCIQD7xGIGPl/MRmm+lje8Ufu6ca9LnG/IBRYzIjozIOOpowIgd4mEMOkyy4zQgAPVcMzPo3yKX7M5f5lZVQl3oWJh59Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5l2BCRA9TVsSAnZWagAA48IP/16ARPFt+oHpq1ppayWy\nifc0xUT+m9iY+jjjGeIE5HP0vvhsWSnw4lPJdzZYGRWmQosRxetH7mRyQMpB\nNFGffnjN1dtBN9ryNmrhzhAaXZaytBChe8VQhqUN5SbleSiPN9YCMpojWJ9b\npMHmcN6XJxCD1UAEIfUlOtAYJ21iXUFePNfVsjL13Xq3TznARg/ahoHzHYLE\n+9b+OynxLzLJc9rq0XchJDxvh5yQDXoELfJCfVq+R7pRmcwnRD4Zx/oje60E\nhEpA+AgFcuvQOpw2mWDLTOK7GFZGfVX//r1oJkmV5ctjpKi+tfJg4/evE7fI\nNN2aNXF76gyr93m1x2RUCuoNQpO+kHrcFpD8d+1wzjY9EMxZogTPa3wHTWQg\nPZZWdUuVCFDKd6x81m4JjezPeCkTZUPwt22ARFdba9K+lXy92sPSp6d+03va\nHLc0cF6zLKQTkVp8+ETH6A7ItDGYH0YeyLcWbWKMWNhFG4O6BTJETBtHhurM\ngPdHoSsoli4vMATrcfsQrbd8qmUJKUyw/RNyk2cS8p0NhF6L5BNRcLADMMwd\nnZqeoBoCqsjpPieeOoMz7UnUBwps5aJ/5vBb0PRk18rHea8ruNK677EXqrLD\nEU44m0Fijqaf7/8xWplcphXSEhMtBw/hjL/DXo/M56u6PspGAwOqNYaeENMj\n+jkI\r\n=G6Ze\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-e77fddd-1625709892995_1625709952719_0.9006835448190136","host":"s3://npm-registry-packages"}},"1.1.2-canary-e77fddd-1625709892737":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-e77fddd-1625709892737","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-e77fddd-1625709892737","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b96c9563ed29c8f1a5d0b47b674f62b387830bb7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-e77fddd-1625709892737.tgz","fileCount":7,"integrity":"sha512-fVI91qEyzw2zoChGOtxn3RjE6PsBrpqIwtjT127CaQ5f0gQCB9vqJrOoM8HgrCQPtyik5dug9aTvt3wpNv5DYQ==","signatures":[{"sig":"MEUCIGa+WgolVMKb1Zd0d20wrcB+Q6X50/AcQAy/Izjsnkk/AiEAuNJOPtYsJKzU2sISR1kLY9ql2xPqeHuIew9mxcOASgQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5l2sCRA9TVsSAnZWagAAysMP/iQ2iYAat61MfzEAdhrk\n9SojAZ7BRpWeRRopKDrNIfbKU08Mt+K6oRqt5fDvZfzvJDkCASWJsDz3eWN+\ny6zcSO/4zapPcu2pxxj0tzhpbtZnFf9d0R0TUWaL2Lx/rkWFhGOxUHzdncIA\n/UjN06zySjzwknR/UY8lxvV3Hj60w6ahmYKP7rSzcsDM+OBThwnKZMwNUIPg\nZTrDrK3cXikek46F6it7Mn2kwB5WKwsKSeq75/0pskCre0ZLfNzxPzWByD22\nmGEVXzA4gKKG1uXe9tVnxHPncfDzamgEoF5XU3lOz+jWaz5MqkoEhS/B3SUS\nQwl0pC6qCeVvynOb8qHtwlpWVzoTpfY8xCR66w1fDa3IXnZZN2dlA2lujltr\nvIWYSZO1opn0/ZF7Ihs8YFgIYNx1T1vRTscrkHzkxy2M0vGQH/H05ADv5w3v\nyn1KOj+2gCMolAp96cJhRpVyTJJFYLe4BT7DEWy3lXT6571km43jT8BB1uTx\nUNu4vBbtzLdIbZGrqlo0EgsYi6Atx4FeT04uMQsy751vqqIvSMggn+Qxtq/i\nwX5mqq1ByRY93AVFVp+MB8PmtR+CB3xGWXSpIUh0MVpEbrTz15n5N1hv3gr5\nQqneA8IXYYhWF7AYnpKPDZO53QuUXjJAtLonNW5ONg6XpmIRNxwhGadLyakc\nhe2U\r\n=uLC9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-e77fddd-1625709892737_1625709995919_0.8518810358645295","host":"s3://npm-registry-packages"}},"1.1.2-canary-ba8a7bc-1625735918032":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-ba8a7bc-1625735918032","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-ba8a7bc-1625735918032","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a7f60f8abd99c4dd06a204db33a1b5199b358e60","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-ba8a7bc-1625735918032.tgz","fileCount":7,"integrity":"sha512-TLm/tB/FM+hl6JM/KQj0YJZrKneMOtnVj4xbuQmq4SCa11526jSNoBDaId78mM4Kj4Ic0bosY0RnI9czxBnoCg==","signatures":[{"sig":"MEUCIB/uPLv1lcO67eIyIXWpFh06U/z6sCGyHJQ3XH+nBHtBAiEArHVKsm+WUPdas0lFp2rnQFniCSomVRjkNSpxct5Cvyw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5sMnCRA9TVsSAnZWagAA3hQP/if2Eb7TED9ZSFCGo45G\n/vqqvxYYtfbui1a8KM3gUCQnKT4BiC+Cdi952Jr0mxrxsJ8MkVUynHlXFMUr\ntcDCr14adi7ItJ6gJJ1UsTfa4+cbizJLYSmQUVowCn6nkEtlXyQD37+Dra2P\n/3+1gDLf9/L0dYg43GVbMD4ql9QGHmFTMf5qWqwXWSUHzBH+PiUI/kFGK3Ts\nWdJwnxjXr9rFgOZj88GScTc9ZS+lZOszYSml3an+Yn0DTFaLo/hUeSl2NzQ1\nC3KpCsMnIWalZFg75Ql5XPvjrbekzM2lVBYYBnHyeB770h64ArkLJEyHP5Tw\n3AP+10tr7Qb06YA7DJbDSTTfZVYQUAh6fY7f10QniwaRIqkZ0Mg9LDe132S6\nPfxJoptv1z4U5j6x+UDcw4mmgj4QjWCPblyEXukhhdn9wt+R1b/ph/ZA6ESY\n6NlAU2tQk+E68d8cMqa3ItcX91a1YtVAJivZMQBqWOGxQfv9FwGiwxtd5CDC\nq9TQH+O28ds4kKtQe9YUQw6I7DcRdLf7GAIqhID+MyNZ21PA+9Gj4C61Mm3i\nqazFnv/VZjy9MWGVpPQCiYRESu66UL/kTZkxRlfe2426Orls26Kmo/ZS38hD\nl+xYJ5LYskfFWXkGLi/qK0sC9ATfgdITcui2K8tn5/z12CWEasOIw5NHXkk9\nkUDF\r\n=Fmvq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-ba8a7bc-1625735918032_1625735975465_0.7288846558153677","host":"s3://npm-registry-packages"}},"1.1.2-canary-fe80256-1625736432477":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-fe80256-1625736432477","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-fe80256-1625736432477","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"50c1cd4896801fde6bb44222827469d8ad79d65f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-fe80256-1625736432477.tgz","fileCount":7,"integrity":"sha512-+bSFZJ4/bXE7tdphOkH7CslfX3IgBCsdPVUxBrqHF1UmEtrPTjbMiz9RASBVn7zB2umMAbk9dGn6pZXs1VHrnA==","signatures":[{"sig":"MEUCIEp9lmWnCGADzTkTrog5TYWzQjxFc5SxKCWx7YcewjLdAiEAh6pxjPUVWk8IE/gfzzTWpN0l74s1mEizVfoRVgD58vs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5sUiCRA9TVsSAnZWagAALFMP/1VWjqoHIesGpFn2WXpo\nnPyaHdiltS3WDham/GYBAwUYb0ri4e7da+ZZ/7G8Kob7ALts3SHiV7qfmaoT\nAK9/Fqhugi4Pvj13HmMv2lYK1yCPWkBN1ZxcP1r500/jWBv42RPHJtUY+lPR\nQ/BJaDLgEMeP3QdFZtmazVc4LmPkcb/Jq3DVuaUJZtPaL63ddbidlwRRcVr5\nuz4Ak3TKOaTBcL1HgNnOKx9A3Yom7Bll5UpAnEeEC5idZBaRfcUMvnLQuxCJ\nrqwoVwR2K1t1oDDTDtp6pXLqlMBE+FAqFzaJ+3RRvtp0gPNukRTbM+mQnL7a\no4yeAyI3htvso/ejQTUFmnJ9tUwQabK3PVwPY+b9N2a5S2e+Gf8h/zdElH3H\n2FT4mwyMwG7ZIYtgKTre6vv9wDF3KSfDma+A6jVUcP07ife4prVm2zWXUZg+\nTYsuLhZfAtdRfCIhFHNxxA8rWPHx2uJFBnZ+1KN9zE0YSDlQ/Pu6yNKCyldJ\nI+guMy0mo6iUzJ97GIvu0FN7WN1hKSRQAC7+9SWxYkHMgZ4WopEorL5FKSLN\n/oplaOqULHY8E4HlSqhACsYv0i0L/2NkycjKi83AvWyFt0RYDfynTcBQxhU1\njqJxbJHhG7AVujBVS32mu2ur4IjpuaHe2eslZQhUuubsCD53w5xqwpG3H+VY\neIN1\r\n=z+mv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-fe80256-1625736432477_1625736482225_0.4166462642515083","host":"s3://npm-registry-packages"}},"1.1.2-canary-902548c-1625736694643":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-902548c-1625736694643","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-902548c-1625736694643","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4b35a3c03061692ef555dd3583d65e77d82fc92f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-902548c-1625736694643.tgz","fileCount":7,"integrity":"sha512-eMyP5N3UbWemRvUGpN36KUVjZ53Z0o/pJ1VYWWp1BJtbg2Zim8jYxhmvjVk9XpEvuHlm9/0/XX1Gq5yKxzNpFQ==","signatures":[{"sig":"MEYCIQDBPulNhNj0zOevHmu+YzevQ2m2/+XErXZW9fXX9f4isgIhALzIO9oR8umE0sqgZBzSyGQFZZxrQ2B56jfn7mb7bNx0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5sYlCRA9TVsSAnZWagAAg/QP/iWxj9hvpZo8tPOpTVG/\n1zoYyqMbSIoKaRmCrZu7Pt8paNMuqAfTxjXOxHLMPVA7/t4ld8+lE+6BB6E7\nSiC6KwTPnyf78oe6oM6auJzn8oX/NzFzK7fk+EwMbBnd4BuklKXyRQj/Dlp/\n69vV2SF+soa5jqy3BEJJtRta0GHdhH4DX0DF0UrFB5LA1/HgTzja+gNkceig\noZ/e6qJPt0Q/8gmJJloxKcynkj3uLR38Sr/YrbMIP4TFH59y25or0Ngeu2Yp\nBYueQpSb1tytYTPMLjmC1nbtiRp3xbpPlldu34tDtYh/Nyanv1qE6faJqbNd\n+gZNQoOSvV7/uwqUHIPFhQR6I0J3aDbIXs5XWG3JMeBqR7TbC9OoRqxWXUZ8\nshL9YY6vs8CVYB8OADJ4uf+pHitsYzbyxHFmfVtR11jNlHock8s+R53CADl0\nxeaIh7Rg3YUQFIlNipy9bFv/V86iiArE7aiLoL9sei+CDzyjQU3POAhL/b39\nSF3IFQOnHIe3SxzVhcKNROdRxNqX277PfFyEAac+zfc17NfRXoJKQhXT0Wzd\n9N8EYjVpFuwLqaGR1ltupmIWio/GGPuZBYm9Z3JsrMHR/P/4C6dCMgsnCFiR\npwMtbYwwf9kGSCkOItt3Hw/dBinFMZHfzf42cMpAG1iXQfeZrsTis20k9wSK\nwHru\r\n=Mioc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-902548c-1625736694643_1625736740697_0.14454289660839303","host":"s3://npm-registry-packages"}},"1.1.2-canary-c1c3e4a-1626055530212":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c1c3e4a-1626055530212","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c1c3e4a-1626055530212","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c61f702acfc176e2c85b9d442751f71473cbd6e9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c1c3e4a-1626055530212.tgz","fileCount":7,"integrity":"sha512-HJiAYNUzPHO8BCafeeumeeLEyZmb8RyfzaI7qwUeFvZnU+wTBAhTczLHjxFVTx8o/IqmR20NqL4Pl3I+51lwNQ==","signatures":[{"sig":"MEUCIAsIK3yLMcFwVnIP4nNqS7eA33m5/8RMmJxoiByZ6FP7AiEA8Dorbv34echvMie0ime+lodkg9oSpmDOkvEIgRLnNXU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg66ObCRA9TVsSAnZWagAATfMP/0NDx4i8oyot6kgKgR7+\nDEhEclx1xCvK9UhlrU2dUcXg8SuRdhYupmX0a10VTkyK4nfZFob8oqDBHHS2\nHYl4kJC9XRSnRnxGaLv17e/tmSEdCMyVyouspZgDnn44bX3fKHuqkf0t9JBw\nsQebhhePl5n4CNjSxkr0+IDSA6Uz+0+IJlXHA5BAWkC2oYKRyvtGUpi9CmuH\n1IOs6l0dDzpQdtc2VlP2iiF/KFibKDzTAXLWLILK8Aa0Pk2nZku6Vifj/FfL\nrqcH72PwIfDJTcUxC7qd9clrMsWhnKZWrOF+N+52125sqCPfTfhLe9WQ6mlx\ny26DBbRfgbAvwiaWtWcuuiIZptfNPSGOMD1ULpt9Z41S1xscdQCPlYuGacq4\noiUCkZC2ePwV7Zw2Zd+bGy2YK+CMlYaIK9kwoY9TrPJUAZSA9fzfMsAsOfR1\nuvhgVAh2NpnUbCa6FvFbl5OSwE9zit0C4eH6u3MIaIC12s8MpIbbFhZtvKMY\nQJhWIdfe8O7hU3+JcnoC3u/sKH6ogmih0ZbI1sCc5QQegOpCMe5yJDWS1J6y\n/V5fz8W6cOIGI2yCH+X80dhSF9O2Ap3tBJCAmxVGcVUYL/71/ynbg72LEnCV\nNjBRAW/NvT7OSSDtoGfdKGx5IEv6ExUZPouR0xnpRWjoWsV946+0Zq11mU7q\nPT9G\r\n=Vf9x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c1c3e4a-1626055530212_1626055578977_0.6393566440199705","host":"s3://npm-registry-packages"}},"1.1.2-canary-c1c3e4a-1626055527988":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c1c3e4a-1626055527988","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c1c3e4a-1626055527988","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"58463722541bfae817cb370930d3c10a6064128b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c1c3e4a-1626055527988.tgz","fileCount":7,"integrity":"sha512-i6kHGYas6aEbfOXmBy7zrxfkIkyjMYIQVh8xmRvE4raTXkG8+5ElZJ227QGNKvprp87HPnzxvWincCR0ybmZ2A==","signatures":[{"sig":"MEUCIAMWFsR2JDnAhGTrp0UA/l/hGzw0vlCBZIhBdwZy9BclAiEArp8I9ceFmSfzRFbo1MlDSwqWXdX4sYhFqyntaLrax8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg66OhCRA9TVsSAnZWagAATp8QAJM+8E/Zs78vLCa42w1y\nF1LI2upfuYNrii+TRZepLSTSs5PdU70SfwrYu7iLkNRwA+F1mEbrvfVN7pzr\nDdSrxNXWocBEiTBTKi3jDJWIzCqXeJGzvs9OGrb+dYjVhfXOVgUuydRUgrN2\nxF/3DylsUOcytiOL4Y1zJujuBspDaJZLuWH92I0/+fuCPW2ecRTPy7lofVqw\nn+fL9qyM7MVsEM5P+MZo7JCkr1cLUVw2i5SX/5RGlve29nJw1FmZ8jRpkPsL\n9Nlv3RgryobdzugfIegx+X782tLvgF/5voRDh6zrB7gTTzLO0BNcctxbTMEx\npmoMzafm9ocy5OJ/G3pNc5kzpW7iwd0eJ/SDbJguR2QZkU6EUdlXCscubaCw\nVL4yUC6UQgwG4fo1F7oNhCJ675X09EEjgI6UvC3cIckpwp2OuljvHglj/bda\nAW80lIlFJv9DPKcKE752qgI6gDFo3Xd8pZv/uc47s9Jro0JcNEZd81DA246W\nYJ4kMB420b9CNypy+3OHGYY8brx0OxffHPMY13cVJ8Dvo9rx5U37PKR4YCzk\nYXINAenx0M/ExmefrKaMOCl4UdGonQ+NLBDQJQ1Rk2Ho6gddHJhBdjHTn8g5\nQFqRDwiWOozuhJ2I0rvXQKJ624bn+wcNkwvarr8pS65ap/mYsUnHqVaLNExD\nm5cR\r\n=sBFc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c1c3e4a-1626055527988_1626055585021_0.8263561448123258","host":"s3://npm-registry-packages"}},"1.1.2-canary-c1c3e4a-1626055543332":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c1c3e4a-1626055543332","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c1c3e4a-1626055543332","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dcd47fac3ae5bf0323b89a587b6d1fbe17487455","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c1c3e4a-1626055543332.tgz","fileCount":7,"integrity":"sha512-LgeUlWR1atAZkWoWgZRoUPMJM8V85PxL/jPml23MUnQJCf7ajeC2LvFY+gnEYCLFr781syDqOSrxkq/7CMJDsA==","signatures":[{"sig":"MEQCIGkKWA0/Nly05gm82ff1Wh50HX0RJRv5tZdk7SIJXGWMAiAzmMI1TUzQ+ZwihmBI8Jiagaz8cPzIhZu+tfo1vetI3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg66O0CRA9TVsSAnZWagAAGo0QAI6InGD6J2ub4IFcYIzi\nyiNuULG7NdzVYfP0UIqW5vvEEqzW7PHFx3i4HE0tPF/UP81fnhcdwCawS6+e\n5AedN3QOIO/1GpG5hCiasFPAzdBO32/1EsQl2q4zLEkbCW/8Drx9XBaxxNSL\nELDJ9coXfsGpcgNyDp+ZDchvjAOHH5DabQi9F0H1rGBFdGYIkTx7PNfb0+di\nlMUp/C6oboTaDaoLUg7AjyEgvmCorysFZWjeTjFHA3JFaK70yOt8teMxG0BC\nYipaQo2efVdG8FL6AyAwvKcOQ1RKf4a4fs0lTd6O8Oz9w+PdakVSK1TFbTRo\nDv3duoCl/2K81g6oAlOY81Tpzm67Y66aDJdkVkoNQeo4CgdgRMc6a1MCnfeh\nkrDp36zVZe+RSTW/QwU41ysXFoBcc4o1vOaJtJF30HfpVCV4lLd/SdLdpjKL\nnVJToEnY4UCTAu90N2Il591msKUnFM8jiejaHEuQn9ZUSGrz8TA0fJttxTKR\n0h3tjHL2iue1Ta7yuoTxvU6+rUp3HfUtGkHa8zk9LDeJw8XA09XqeXbpSlyk\ncZavZm1Uzkie3qnQlSEn55dKNmVZC+ByC2cgKhb4BTqQ40nk0B9vwdc55238\nr3sPHclrKFm5ykIubefz5P2Isbp/1WAI5igA2xjzOF10Ip5xjyyXTR3ll4wH\ng1A2\r\n=O1iM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c1c3e4a-1626055543332_1626055604373_0.1414528980654708","host":"s3://npm-registry-packages"}},"1.1.2-canary-81a1526-1626082510856":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-81a1526-1626082510856","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-81a1526-1626082510856","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3576caee3b15f0f21bf53b0a1134cf44c7e5c40b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-81a1526-1626082510856.tgz","fileCount":7,"integrity":"sha512-zYY7hX63NHzD022ds3dwCgRobA+NosYNrL9ILa5iD3r5DWTxxEK4eiUjPjZI3R+mIJDDeUgc0ANWJ/OrRAaEow==","signatures":[{"sig":"MEYCIQCyRitr0Tlo5llc9ln6HmVzOc7TzguGhcgCMMeMvuyUSAIhAMY9FLXL0g0aNjnk6YdtchSMf7YGPGfxjXF+GMtl+Nzf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7A0ICRA9TVsSAnZWagAAWrQP/0si0sGdwB2uB6WoVMH3\neRBy2lvMrttkLWGTfYXrT7jVJO2m6Npe5MkWal/c94WGJEB/bragrhbpAbRl\nVxm3bwtWOP5Q8baynC8cjISVuXjrZPHD0hIjQVnrC3a/sJTOYoKX2YzJ11cF\nboicwZxoOCSaoau3f5QyJy0czP6xYf1+93yhKtbhColtkreE23DM9FWw8fw+\nd8RoLo9hJTMKyo68JSvGRqQ6IQJa/1sl43vyAedxAPx1OfuslnedaZ7IBTq/\nAVK914cfaxFMXMVRQlmUSZQLwDgW96xtHlVXu9m7Pz/iodn7YN2gQgXZfcPW\nqBwL5obJ1Z6X6nwQYURNF28xfnHTALFj1fwZZ81OO+WVVnGChYsFbG6t/s1R\nWsaoIpNAJPPKH+uthBBdeDoKXzXGab6DbOp6EHl3MGT2eQ6ck2lB5wFG1V12\nzwGY4cys7DtcORUKCAAS54faTZqIWz/B0tEqbXcs7Ftkb9hQj6cv1bPYEzdB\nnbnkKaa6mTFVNRAjrXbQnyhHbqRq8ygjTLF7bNXeRwPMuM6qVfz/tyjNKlf4\nvQWf7GTP3zAEDaf8OzpcEB0ZYjEfdOEzcMDW//nK0f68z6k/JV5ASBM4FE5L\nbj2EK8lpK4fc6kjyeFRevfqpZ8xJ08Ve2iztHsJAuES9HVAR3nLbdNGIr958\nT+op\r\n=XtR7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-81a1526-1626082510856_1626082568062_0.8691130734106833","host":"s3://npm-registry-packages"}},"1.1.2-canary-4bf046d-1626082707337":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4bf046d-1626082707337","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4bf046d-1626082707337","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fc1f6430c833cc4ceb2ba3b4ecb46f8a9f7728a8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4bf046d-1626082707337.tgz","fileCount":7,"integrity":"sha512-lU180bP5NVCOwK9B9nL91/C8jO9/ocbrpIJunkm9RzvLXmhceUeNMIMNHVUtdLpjmI8UPIyG3nPqVjZbCXw28g==","signatures":[{"sig":"MEYCIQC8o2qJIE50CZ6brSBDY30tLImfleloOWasLs7PLCm5twIhAPQdqNnttheJ6loLxA3JdGJhjGrXgEUH9mSfm+bfbpOV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7A3HCRA9TVsSAnZWagAAZ/MP/A44GWyQ9qaZzu7IpENh\nYIDUzUnPit+lkJTXA3K6Dtv8K+FEJsCWOyhfZeZEESxe7KvUcqrfApXAi/yV\nEse5+rcqoj6im4wapi1rV2hCm0/p+nHeE+LAGTxN6pipcm9ITRmzajUpm6Ba\n7DO3Qtx2RURXGYafvexzMHxcGoicAQg0y5u74uNg3Bnlq99byvwe4u3W2K3W\n3pNrmjeWsXxP0k94eUASgW/AVIz8D6q5FAiwpgon24o7v9yaZ74FXoFKciFS\nCnzasD+ppHkM2ZkCAqfAKYA/pcCBGM0EAi6aIbUnFoXgdsNFzsSP1uIKWaoE\n07+7GYd89YIBrFJ1yJ8PN4apDRfMmeXXNW3OO//Eg4249K+vI1KJu2ezNzc+\n/Q41SLZs4PR5cA2eGY/yB9VXAeHnO248ZGjSKTFB+t2FfuH0tM3aTBCRK8Pa\nGYtkn4aX9R96Jim6FRJNFDYwlxr2fdOC2Q0HWDRYLgllYNbcPPjQAiwmq/Dp\nBW8vboTFZgXYXvrgfRnS0x2Nv7f7V7RmFGrRjtooHOrV6SPLIKH6kdADWjxt\njxZDqV7i/Wj7pld0S8VAkVB0XuwAjTTzWvXlrCsm2nuKbQ3iZOGyx8zKuiEh\nCHcIWzYcSRk/IhZH8P/U+WWxMz5r1d06/xBscFRfGFsLX8SQRIt2sJTAGrl8\n68bS\r\n=I3wj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4bf046d-1626082707337_1626082759016_0.37768015661926047","host":"s3://npm-registry-packages"}},"1.1.2-canary-4bf046d-1626082709031":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4bf046d-1626082709031","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4bf046d-1626082709031","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4fd9a1f223ae2909bdb89875aae4e6705fdd472d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4bf046d-1626082709031.tgz","fileCount":7,"integrity":"sha512-zRoIqWNOycobVu8IaVN9j12MVTnIVSnlUKtqfxV7iOl6hEShA+RP3iBpWXEBC6gqXPTUSXGQE3PCwGWKIJ/D8w==","signatures":[{"sig":"MEUCIAl1IvCkEMVzSwuQf+TXzBvTjT90U0e3ysI64WZJLNC9AiEAgvzcRVmDf9k3O4EjfMP5z8RkmbNIUY/SHaR1khjaWnc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7A3NCRA9TVsSAnZWagAAZ9gP/3eOiBMiJnV70OGJsQ0U\nZP8AIFM1ciDiVTY5gKZFGQXNQjLnqhkd51NvNXuaSMKAXIwIRuU8MS+YNqew\n3kmG0YqPfQuyaxleqi3HU9Rmo9VNoVglzzjCu2nc0bzutDzbI4lC5sJ2/YIz\nQbO4sBu6ORkuR57KZn0uPePdfcfzq54+lExrp/w6WB7j9FerJcn57fphFEWZ\nMbFniGZAv1eGGYx2294HYyEnf4SK2F6se8sfqls11c/j9G8kAexJeKoJK+Hc\nrK+K8zforL7+OK4AGbPr5sZQjFj3aGUItZIsthTGIyZx2qbZ/ADSHdyGOARv\nXORa4jRm0whHQNics3DNxOrADjJNfmhRdR6vfu27Qkb5QL1fNtwAEE+u5Caf\ng2yN51aXi/72Jbu4ag3H2ZjwMLqLIaDftT5GHv2BD51HvW+mNJffs5PmZNFb\n5X7LLgAjsH5THyv1XQuFUGAXBYierTvybc8Xk8aaxx7MOO2BF/xTjAyeBMHH\nKqJBko3Xv0MhVI0INEKSxKFR23RzPahQXKj0+a0DuxjYqMKaAHOdTR8qlJ+W\naZXa0hjJe48kPW59XqPP5L8oXTOJCBZvxGJD//RtTECVOC2GiL0/XGYJCmoA\nyAxw2r/AEbKQWfkailJYHTZha8e60p72hbjFcjHhc4EEVH5glBHiSj6dqck8\n5IbW\r\n=O/Nh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4bf046d-1626082709031_1626082764639_0.6626693381115163","host":"s3://npm-registry-packages"}},"1.1.2-canary-27ecd91-1626091651551":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-27ecd91-1626091651551","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-27ecd91-1626091651551","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"92ffcb0922f3016e9a576f57c4d709e8938b80d2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-27ecd91-1626091651551.tgz","fileCount":7,"integrity":"sha512-Xhvb6adQF2DgjhvecClsb+6VRoYI4Exhh4sryavv9NgQkoZWH691LGVhZ7C285/5kWXNVihja1mB54a3KCDcpg==","signatures":[{"sig":"MEQCIHxl7ImwryWuftgV+I79keMtpe09r6qakqx48o0pyXQqAiA+kHA0cFo/M612iRBHe8/vLrqZlV9NLhyKn8EvkNNhaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7DC0CRA9TVsSAnZWagAAPZwP/RAh6qSXG8Q9272wkzyk\nYuZc9gwaJp94drQvyVHRr6w6r0nCEjmJwXoJvITd4ns6W9TDJe/nPjA3rzb3\npiKqyzbEnOk6L49V34SDrKdTeWc9ohxySzseGPfAbvue562IRfEg4uoDpv4x\n+geYqrBZeR+4DqbpBm2k/cUb8xYKT0GBvnHiv0yD3KWPOblToTpnWauY38Z3\njKdxF6Hoo/8W3SLbzxjXLFiG8E6Fw4VdvYk3g1n3H6mDqeAAIpD/JJqez0SQ\n9xLoMRLbEkQrae58Zg2n+iMwlB2b575jDyDmSySLhpS84zboa0ezFCqKtshm\nUwANZ00O2l+dNs8WGYhC8KG6s9EC/wLMgM7qt7ijh5gsBeJYW1zv+3WncSdy\npiZ+OMGd0ndtgQ/wLtUWEz7xt2p0IdqLOarpYXcsdK4+xLVYeg3BC3YhNjgo\nRv0kb+ohTWogAs22GQEDsQZpdwV09jxURgjWbVSsSXhSu6KGAgPkqk9Rz9SX\nOpqgXAXAqcTHVVLL5AcARboG5RFhQNP65Kf4RJcVLB+8KUzWmjN/EC39uk33\n2fQPkqY6WhvcKcueu1hxAhjDtMnCCorAG4NiCdikNySE86AnbsBMvvsEQz4u\n5RQzbD7jvQEGi4rFgP26zUB9VGq3uaPLKdKVx+I8atyhbJ4nQNO6AxZsBOSa\nDeYi\r\n=/X2R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-27ecd91-1626091651551_1626091700234_0.5009447558541693","host":"s3://npm-registry-packages"}},"1.1.2-canary-27ecd91-1626091665955":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-27ecd91-1626091665955","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-27ecd91-1626091665955","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"df55326e03efe0dc6fe57202056845008a9d91ea","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-27ecd91-1626091665955.tgz","fileCount":7,"integrity":"sha512-pg3ImkqpsC/0addgRvoI9D416w1mH4Oo4ga8ILpCLXlS7Bg+OVID2zabgG9MkkaUr34liQiP5ll5N1q7GQ5Gsw==","signatures":[{"sig":"MEUCIQCMix69BV2Mlt7I6fdieG80fmBsvqG8tyeTdwCwbkF2ZAIgbdBvetk/XBf747SljfxYzxVJpxdWWsFwInRxYLnLlYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7DDCCRA9TVsSAnZWagAAYd4P/AzRl3IrfOH9uY/wLqnS\nv40NZGpJZ8wB3wCjgxGoaIhLDxYxr/VSUCMNdH0s2Vtx8xuZbwYsIYxFLTUl\n8JWqYDWyRf4KL6JcbnnZWQWSwuPGoOlXQc5KHKsnMF3myRfwl88zIQRuKtrq\nvGYXuIinKozTqqC+sn96zj95OLnJTFhY2S3vkQbwNemFJKR+//g3uOkr1oG+\n5ReHzZQGwyWq3y9UQ+pdzFQkJrAm4jhsOKOasJE88VF1UOF/8u2k4sFOKjAy\nbGMVVP2i6wUm8CBn2VnhgbriqHVqsC36oNINLXGDRtM4wZpU02HliCBQx3TN\nLPGw3AEbr6W4AreF76peksDBbCp6GS4tmE2n3a23D3+ePa02YBuT13c2t9bY\nUlNIuEO9Vx8a8te1E8CSs7yKVQNswJ5DoiL5iZosxXm837huW3iy5r+HGu3o\nHadvu0+gFlA3e439Z901Z0GzTyqlbh1CJop7W2rRz0DnhDGk/p+AD9lkRL2T\n8vSJkaNBeI34/MXyeYIys2wumdDeUKz1XUUnrvixFgRcYM90W8fc2PW26d8Z\nqvFNfMGxQpIUtAV848bLl9ch6kSfJEyIq4dpIJPq08wZZipzZnqqOj5O2aAN\n3xuJNQ4oiIba9Fv/0SrnAwBevsfZjobtmXavskm7c1qlpq9I+xulb+uEXXeF\npOMz\r\n=WUas\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-27ecd91-1626091665955_1626091714237_0.3028196534441714","host":"s3://npm-registry-packages"}},"1.1.2-canary-4c912ac-1626091888801":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4c912ac-1626091888801","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4c912ac-1626091888801","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"176da702d7b0fa291b8c52facf67cbe76d543acc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4c912ac-1626091888801.tgz","fileCount":7,"integrity":"sha512-5CLt3sy/EXGYi7Uaknq2tlH2MSO5M2LdVV9OKZpDHbaxfqTCP1466BctuO4kafYL1QKqxo71sT2Z8ipWtN5d5g==","signatures":[{"sig":"MEUCIGv+HRvzs26QdwRi/sTkk2PoNAudC1MPP2UTuTk05YhYAiEAibAMwsnW5/cTkKHWY/zyUzs6NNPWT2+RoLlML0/vHn0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7DGkCRA9TVsSAnZWagAAu8YP/jzMwxsmoabRBVv9yWJR\nIfos8jZm0880kDRHhpiEeihgJ1camR7seNkGy6X3oUv9he8gkJk+vuo/B181\ntiEwsaf1I8q3gUst9d/uJZS7tvrUefiAp+ApHMym4A7oalStoA/oYbsI1Xii\nVcTpWWcWdAbUISlZTgHvY25Lmp5WcwUeMstXBGX2f3j3S7OsjMVwtDjo2ktI\n6e2IyP53b2HcGxf5Kbew4sZN51NzrztPg54qugTXtGFatw3j2zudHZG8ieMi\n53wckUOi1PTwmtC76ZtvHCeCsu37QVD3DoVF3lUiWPH0Cj0xYvFIHTZJTgBz\nIJ0SliHc0afKa6CGm34wQiI8pkj11qkIoYK9GO8BxTJnjGw+iB1bKvDPxbgR\ntmn3JD6ny/gUqCt6/OEsMu6l6sAbjlQkD9iQIKuwztk6Ke0Xg4ExVFHrRRI2\niAUjE6Y4Y+kFJpaJyMvP+0UKT8jqPbmP8DnLsi35ShDKkh1imTYob2kOXfpR\nbQ7R502eXBqirGv1FMwad1OvlliIth2rSPmK5d6arHyVr9OSUdpt+lcQHFQ+\nUBOxSQG5MZMkiF14qpsIDmDGe6EEXDHp/gWPsn0QdXfu76/xj9mj80JnQWTq\n0sH5KM9IhHGKfyDGry44NtTyW8DHGA/O3yn9peSLBt1/J2qJtyMS23vxyRPN\nAecl\r\n=+YNA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4c912ac-1626091888801_1626091939575_0.8036102982759061","host":"s3://npm-registry-packages"}},"1.1.2-canary-4c912ac-1626091898757":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4c912ac-1626091898757","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4c912ac-1626091898757","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3213795a73dda67ec6737f95c67b66a29bfd6a90","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4c912ac-1626091898757.tgz","fileCount":7,"integrity":"sha512-mbPVc1YFfX/LJgF0+nh2gOSwV7Jb+Dy3EBBZMK/E2lSeROwnNd5OMjlcm9BoB8eJT6RrNEw6dKs+pSq5d9CENA==","signatures":[{"sig":"MEQCICXb5NG7vHoBXrpH9owLvLSwM97fZEdLgjDaqjO6SyHNAiB8ei2DpW4XW80pj/7xIBSsOLJXQeruGIa2BuyjXsUjkg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7DGvCRA9TVsSAnZWagAAXswP/j1v0/63J2dSCDt6pKAC\nYWJs02v/AbU3qGrqn9acZ8gHShXKKfxHqMggo2jFfVba5Gjvqzkal6Gy2gX4\n2li5C2d3sqtuovKo+JqM++WvpvAh5NSTrRGFS5l4sa/WVck5fnqxYocuFzRQ\nXdw6Kou2UVMCQmc8VP4TmmAQ+c4W7SE5I0icaFw3KI0lnRDVVyLp1XvB9zH+\nwZ0LR5zHu4kikVq5Bl2+Ov077btxTmlM+FqRaPAXN2xBcNcZ9e1vVHtCDX1F\nrwEyn7H/foViRwi4jZdSQsCsqBfNp9AyvpOLoltS2PDTldfju/Z4PoXWi3/k\nYz3SaU/G9nVCveO3U/l9RR0HMe43uKgPbtENUs7NtCdYCoyd9JgsQYx4PSqf\nKhljDC8aIxMaOWEis2TLauTuSNiahrOYiJB0nYo9Q01xSDAHDl/HMkLxC15a\nIa5H1ALqBtZdFRx02M9GJxfo/T6851bLzGNPhi9Nkw3J8o5RAH7lCpnNBBYm\nFmijoXgMmCuLzLzHFxnvvKrCvqfLzsszHDYzZgPO83lnn3FZVa/18G/mcGy7\nJDt8cFQz43OyFbG/MD77/17tRGGUsBkxZOvOw087fItT/O1qpSls8mwJXQpp\n+P/az6rDSTa3FvlBAklP0sZihrik2A3z+dDK2YhBrW1rqV3xPxG6ey4ZxoJu\nV7xo\r\n=55kB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4c912ac-1626091898757_1626091950819_0.2382667131805405","host":"s3://npm-registry-packages"}},"1.1.2-canary-a130203-1626095470562":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a130203-1626095470562","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a130203-1626095470562","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"457aa56711b3c820c3c8cb99455c376b4c571563","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a130203-1626095470562.tgz","fileCount":7,"integrity":"sha512-SHo5E5p4ahPU1eQwpM/Gn6i0gxgtZLyHfk71KBH6Cv+6j/KFQdyLSNnLYUSPKQoSJNPPotL7dMZo8widpf14Nw==","signatures":[{"sig":"MEQCIFiIm7xwULSknz/8fRn9S3lL94cGJQILrCkdkXv7Zl0tAiBfTl7fLn2e1yBomuFu19KTYcxTeBpE9Ig8M+wter1nJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7D+fCRA9TVsSAnZWagAA0BQP/ReTgz6qV/Akx7MUMLzl\ngVKl4gjN/tfImqHvH8nJuJhh2pY7dB7RZevyCCXQzv545MXgl48J89p7hUEH\nUlv3z6M1ptQz9WjxjUbResYdII80XwwTu9WrCZFJMMav2QvjdA290JM6hYtS\nMmQawALwLFDegTfmKlXQ0CLj3bfLFlYLOSXR7TAjui47DclP5v3gXdIKAo0O\n+vkDEwNCjmzI1bSmrMqXFw0/yNyOBFzBoTYvUHcLcUQ3zAjN1ps4TbHteA2+\nnruCJYPMe05JplZMj5ir3Xn+YFEc7O0zz1g9ImZzjS+enIa1SL7I0haf2gjm\nC2i/M09n1wkUCzQFBqLPh/1X50l53BngqxBK6JqXH3wXS+ZMvh9uO/ZxXCuc\nwqvXsghZ+8hUvNjGyaH1mHCs5kWLagQuaHnt0vFBxnrvBFc27AIAY4DIYJS7\n5wKnxGzW8YjL9RBuvSGpdSvjUcVfnwT9BXk/TKfORUu9I3/pWE0mxfCQumyO\nN4/ptvWBgku/pV2Y1WGAmcthxZQ91PkIfJKbgFZx7r3jrUSq3Zvg1J3Mtuia\nShGtvWzlkDZw57gUnRI+6dawbowOBPaYYwMkKtDINKO0A1Sg8eFXk0loEhoQ\nZfiYCXaLYmtLQ3XhbMNnRrIDPAGhNCrplQUUXrSx1IRtIJ4tdKjMShRnTtpL\nGF/B\r\n=mXJU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a130203-1626095470562_1626095518959_0.18449354876255897","host":"s3://npm-registry-packages"}},"1.1.2-canary-a130203-1626095519564":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a130203-1626095519564","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a130203-1626095519564","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c938edcce53e120c2a539fb3384c7edf1734098a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a130203-1626095519564.tgz","fileCount":7,"integrity":"sha512-xHGXSspRXlWHzRnJnh2IuvIWDAzf7PSl6HXoOINkMluoOpDpdeEKcRA8KAYKQsAXos5a21bg3LtGsr6WBtvX3w==","signatures":[{"sig":"MEQCIHRbfdggwZIS1kvD4w424FNzq/WJbo02KUr1xPFtxtFRAiAC0g0PcqTxaJJ5rqNnzoAV8G6TWATlTynOhJX9IPvtqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7D/WCRA9TVsSAnZWagAACr8P/A69xFHZMRLcaIGqbhTQ\nUj84H8q3XR9jaJ9tJ8gyGM9o2quLsvHqZhrZEOmx3nMk5PGa25WCr5bFeYmx\n94NBgUwARaLM5TUzhIFzEPYgF+CNQ5tcFBaeQIhZYH5jOQQolux9EMwmGoTm\nF9FQkb02+BphblRBYqkpQfcjemd1hJvOWbNJJ4m4ZL/KjLiJkzRmYDC2Mxn1\nYHu0X+bva0RHukZfBlOgqSwPiDnBrLeE0B+87E3bOLbi7ehWnhj12yvpQkMM\nerKbwDNFskFc6YE7TV6wjoaMkCb+l1vN/z/FZXphN7bj440FsX8xIADahk1V\nAhXVNijerApIK5yBZDBNmOFjCT2RyYFZts6gEgFLly8H0ERCWMGAeRisj0Pf\nWQZ8GKUO1Mg5WVHip9AR93v2H4kcCcK0mHLTHOFoyQJHEYJqXXZtDhzZA+JZ\nAFYAslrJnby34F+XreWU4XRFFDPkcTp3TKwanAtuWDC7+/jtB61eExkSWVTN\n2OAcg6vikPx+00XCXQfDFkUCrpkCxs+a7f35SvWBSSEXImpnvUQAJ/E1etyk\ni00HS/2xgfIPxpNiKTozH/tLG7g5cnrf9mG88cL2UbhDfHeXR5YVi6L2aUwp\n532NjVl/ILornT0r2ixjkxoKyLUAeaSLDeSVR/apcDZjQKPdg1iJeIqPNrgk\nMnXM\r\n=ScJO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a130203-1626095519564_1626095574502_0.7975371473986628","host":"s3://npm-registry-packages"}},"1.1.2-canary-e9c6db7-1626097496816":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-e9c6db7-1626097496816","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-e9c6db7-1626097496816","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6bfbdc1e19293a48d8c46bb66c9974ea7df401de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-e9c6db7-1626097496816.tgz","fileCount":7,"integrity":"sha512-P2o90U/V+aDJWdRjxpGFt3nuaQeyhWhyZ0sHxXz30kxPmalDxFGzguXzGY8AFghZKlRR87UrjC6deyfv1KSqxw==","signatures":[{"sig":"MEUCIQChw5N2rI0DjDTzMYfrZLU2XFF9tJ8wBFelmlulI58QVAIgZaqVT0Mr0++Zo06VZ7sowMRHblmXsHj9cCfiDEvIy4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7EeNCRA9TVsSAnZWagAA+KsQAIk2UQP/Xup/jdZwtMcy\n9tQdAGqqrXoeY8srU9lR3zkTr4uN0pOMYmeXMJJMTVB6Ancq9qgPm6pyy40s\nKmZ3aEWiyLTHv+j11xPTSbIfQBcwsDqZ0ACpLMOnTXtRt3ceerDHYlsHJh1N\nzWEDgfNPtRo/tOISMIA+BneR5QLHQTti2WNWJSMLX9YTREIZtMuh+9Nobyxa\nMY7uIvQWkzgWUz39oxF8VtjSBef8FltxogwyncSz/kdUE9JWicPNJj/QR61c\nY6oynhUdqs1ou1IazZnyxECfQtEd8Tdc3ncDdz5JQeiouy+FiK2PpRgYDnW2\nk8wEx5w4IiLLjtbeGaE3FszIPaYUa34f4s/m133+BoMWg7Hx/gcgflC/bgQk\nrm6JvY4hnUh7EUsNE22DLuQfib4XwAplfRSfvoMY096C2rlKTNAGkWbG/Rr4\nXYMUtPrF87N8MHIdz61BLsSm8tvDGxjRN9sX5PhJSZnSOXWNbz4+mR0JM12u\ns/1+5wBqXm8rFY2LbLsP028eAG6vvrQ2HwTNso8BoyuJTdZiwPY1McEOis67\noonvx0kC9e/vIzhn8PJ/zCEjoAGohUiRBZESeNL2Mhu1idPSW9F/erU5TEYB\neqse7evrzqDlqrQ2IJ40rQDTSExk7vpARmMBpB2YmB1hDLvGsFtjrsrJS8Nl\nKpjE\r\n=gWVn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-e9c6db7-1626097496816_1626097549059_0.8174312193746389","host":"s3://npm-registry-packages"}},"1.1.2-canary-915464f-1626401109463":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-915464f-1626401109463","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-915464f-1626401109463","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b8bd9693218d3ef5b81430c52fd78fbad3e4be5a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-915464f-1626401109463.tgz","fileCount":7,"integrity":"sha512-zE2BUudGBATNxEvKx1wzoai+DGFCTBBee/h3mdyuZSa5p3/nZFMQB6nkGWNreMBR7St4hk+8r1XOVf62iy9N8A==","signatures":[{"sig":"MEQCIGG0EKtVBXzm00Khx79oFgUK8bWBfCESQbHmpy3wbsHEAiAlSxUGBq9U4HUS7I88ZI/M0/cmzK963hmNp3j8lnkTrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8OmQCRA9TVsSAnZWagAALo8P/19oBuLsxg0s7nkw5SuP\nobzMW1b3+lsctifTRkRZw0BKrsU0g/B50ddIyOqpZ++0kcAs3yBY0hgK/XHO\nJWq26cc+LvQiYwJz/XLSjvu+yETQUpe/OF57xHGpS/YVSvQwapmutRbyd6ym\n0kbQCD5/DSauPkYak4F9/Url06Lxxj0zQkrB/SNv3MTylazGWNsfKNhxzzvu\nNjp6l/fcC+hhVOYWyyQmIT2bQE6mZYC+IlWZmpp8zPEtKuLAp23bQusL49ai\ndrFNPkjIEX3SoXgOPBJ51QDRmWKKKw8juI2t3JxKLCgx/dk7dOmk+S+f+k+7\n09DF1A61LwzgPFe/uxBjnpCNRN+wScPuaDBZD/xA7WCtu31x25LR8k8m/0xa\niRVCs+EOdueso+4GEPusEl8AFTEBK5FxA9fsSsQacnXCdBqudoHTj7R0A2Rl\n0rGLcS5IeTDkshB8/kNJzlWClA2X6/VBgy/00ndqNZ/A4LDJNNZx7nVK5l3Y\n1jCFjGqlFSrQ12qvW2kBFkCSOW7YA2mFwwJ+uYFMEU0WyYgTjpUH9J3n/3fE\nKtq7GgzeDbncCwjPsseS8oK631xzIzbBUrPQ6IlDafeCB4ELgzNxmaSq2pSO\nSLVEoiajPsQk3P58SCcEpf6B3BQAJPpH/3gvXJ3ySk0fGP9bvJyFM49XqBes\n10d9\r\n=WfSr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-915464f-1626401109463_1626401168534_0.7409811076267923","host":"s3://npm-registry-packages"}},"1.1.2-canary-915464f-1626401109668":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-915464f-1626401109668","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-915464f-1626401109668","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7d22d455b5bb145649fd22a4e9486d9ead2c0a41","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-915464f-1626401109668.tgz","fileCount":7,"integrity":"sha512-o7WoTo/nh103q5zBYjdQEJe1jdvBnAbKpvqlDCbVXvIzdzygXFr1XuCaNlYtbYKYmCY/3iUBNsG8q7SCACPyvA==","signatures":[{"sig":"MEYCIQClQSNY9SVLuJb5LnnSi0ap2oQhvGnoJHgiITgDRKl5tQIhAPBgCtFed8IMENcgTmz2OEUQ2q/XkWrXvVLDz/ae3A7W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8OmZCRA9TVsSAnZWagAALogP/Ao/eOR+elT3cCRwDmtt\nexL6S2zMecjtU9olidjCOoNvshG/7y0tysBDjNiwMrA6nkJHlnizMUQ93caT\nwqnVT9INLp00DoutLfKHl+P5m1z6PcoNB112Oh5dvrWTuIzr9MJHjym84DGf\nFOR9Ro1JjR9Mi4K/Qm4i1WYEC3nYIe9SaZDYPqhRYzL28d5UcB3019/iUp/a\nza7cr1WAAIyOVdYPnj0sTlvNYKGQdS5e0ka5e881XuIPf2FMWIKw1TfQcKtG\neyPoHOg31vYgI/5Mu1LF/KoCxLiFcpJXmbL4retpiktInCzJuW6wXQebXUoV\nPu6ZeJooP2fwMBs4GbQVxTZqOpbQEj8f0lsrtiCPcew3+H6WY9428itwvGts\nCnaWrz1N1eyGB3hDG6uEKGH89Ibp5J1SxrkbnlF5CpvUaSgrkXY16XdmrhlO\nwajgVoJY3qOhqVHHiYgLFlZHPkHqhrygleMPNIKiozVqUvPkGdogMkOXBEHC\nCmwU5vMJ/gmYm2sPQgbmXlJTlcPHLuwD8kzPSEUSiJ1SfN1aqruExv4NNDzP\ngN9GC6OhcbNSh1j5sUcE/cR0ZNXi7uBz83pvC01+EiUkdzndCm+9ycCEoeth\nDOHP4HIQMd/rVJQfyD7s39KVPulBbg8rIIVhxophSIEtwAmIdDXoATQCHacI\npXoK\r\n=MTht\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-915464f-1626401109668_1626401176849_0.4932926661709698","host":"s3://npm-registry-packages"}},"1.1.2-canary-915464f-1626401123773":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-915464f-1626401123773","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-915464f-1626401123773","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6b20fb1b33ef9730cb1846f8a64da6ccb2dd84cc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-915464f-1626401123773.tgz","fileCount":7,"integrity":"sha512-spJua41t9tAVKTfze2w0g0YHeV5OZ2V5RfXNuT8pQQ1L9tvx9Ns3mbDMPLjFVSbD7lBc6Uh7vC0vePBs5iUkjw==","signatures":[{"sig":"MEQCIBZozLzOh+4nNI4RMTK9zLZOP4eXJL+Qy3+MTKiE+y6cAiByjEvP5g3thcexNxidoQa55q2evmA/oiLf34pye2EvsQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8OmgCRA9TVsSAnZWagAALPwP/jiunbTUDbvnRRj3e+vF\nbv6UQHOmtVwiV5OqB9IygG2vCjy3+HFv6P+lD3C6HN6EQjxPlkOMKCMZSsS4\naMLWQyh/7A9FE5SbxAN80hTBSd/YiqGEKTWTSdfJuotghuVEvTTERPMwI40A\n2XI+AJf1WlVSVlPCHyIJdtl5Xtbblyw0KN+vOAid3q5mUDv2SEHNaMckAoKf\nppfp67QHmpIeiayLFq1RlKcXxNOp3xOTaPNLiL6KybDKvugRuYlLefjWqssn\nzQbZCbn2/S6ER33DaHxnvxPpRreB+MMlrUPSetcbwhkYU6j0UxXfYhR5QvzI\nkPFO9mUnFqbDZ/8RblLPZ0cCn2pEW4ZqyIZoHpwa7C18FWYPUt4SY3IRQRG9\nzCjtLWDfXJjmFG3jSXS+d+lvEknOHfN8f+eYXa9OMjsnG5opEJlKK1OxXj1J\nQelNGR24bupRrn7yx4U7YcMRpV0/SJqfHQtZ21tdF0rAFtGJNZtcROQ0YhB9\nQDwTFDVNPD8+eXzGcdRoN71rxzIj2BlJbaozcPg+XysuCV79TL17i9Mxg7zm\nCDfoL1ylrlv8AvbiQV9KXqSRU0838CqVPiZmE7r2KVcmYuJksDP2PoQQ/vUU\nwRKEbaHn1ZjUuSlnIr4Tp8nfmi17XmBxoypj87kAn6U1zJFOoabbHMBW00OZ\n9cHQ\r\n=Xhcd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-915464f-1626401123773_1626401184304_0.94164129611506","host":"s3://npm-registry-packages"}},"1.1.2-canary-915464f-1626401135040":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-915464f-1626401135040","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-915464f-1626401135040","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cf8e297557dc4d3f7e670feeeddd60762f1e83da","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-915464f-1626401135040.tgz","fileCount":7,"integrity":"sha512-bc1GtykvflYm0QEZ+CqRsPQMZHOHSIdf8RE+ZXBylwBKhJQnQxhrgvQT6rXjvnS90OeZA83/uDYsE7tW2CLzdA==","signatures":[{"sig":"MEQCIBbIVPWMDnomxXuupAkd1rzsNnYNQ6HAS58Hc5TudOxLAiBl7X+jaganEnJlXJWh42OydcWGfLz1YNYUQDrun8H2ug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8OmpCRA9TVsSAnZWagAASjEP/32C51mcggHDhWx7BrK5\nTaJrf6ArnfhIs62vOrtROfGT5X98FZRBtwb9YATc3ZeHBGXg1vHSwTFVNLS7\nB+3mfaWl7HRQmdoaTj6Qb5YGcc1g8yAmycrxMAYWp9EnRLRysStSoXeUbCwj\nHhlD2ieG7KdDmOm5QwsNRvtoanxtqib8770WYu5gH4NrCxeOxANH7lFfd6xZ\n8E9IjzYKUo8vPknbGbrRhEYqUy84K1Sl3DGC7QOMRZWITZgk/zX/crtsAiWK\n1M4rIFqIF6HYM792MJ4/LvjDZAlGPhXrn+vQ6d3Pa87xHKgylp0q5u5XxgQU\nost++VjsZmEX2R5fiMrPWBeMe1PgX5i1GPjStmrSDdOw/fFh8BftJyGj4cJg\nJaYQ8+fns4joFW65RRN1jvFCSOa6bJwdoUFMY0uEjXi7ydxxS9s6Gr4iCMhF\n4LqwwCdUQYltuuJhaEZhg2M13HPLPBgbTQyQkpMAbHPMFV5z39qzY86w9D8H\nuXdop98AS3qLSbbKhJPQsn+liht2BU2tJ9Iohbm3n/R98Wr0ZBidiuEWb9c2\n4IQVypHric8Rtie8IVq0X0HvbtxY3u90VrlosclfE6zv3bnEmenaFVUahfn5\nPOpMgWrAzJATLiWAb5F1bEDIgRQGQ4pQ2URH4jm+fZE16sJY6gIaR8wwk05A\nOVzz\r\n=xLPR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-915464f-1626401135040_1626401193545_0.4574384224537096","host":"s3://npm-registry-packages"}},"1.1.2-canary-cacbfe4-1626424818157":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-cacbfe4-1626424818157","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-cacbfe4-1626424818157","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1b15c48235793f6dd2912c727986824686603f42","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-cacbfe4-1626424818157.tgz","fileCount":7,"integrity":"sha512-FLKh/Qqhosw6ppUCAVBqoZszjjR8dvLfsBa5OffT4jgbuQ1VFAUqrrU6HlASi3n8RNid9J17f++e078x68p00g==","signatures":[{"sig":"MEUCIAhsbLNQz0JO14YRQOlVQ9R7cZUcaYCBIsulO6ct9EHNAiEAopRR+QFW+yHRVza7Rzjv0JbG+LgudBtNcn0MO8KNirI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8UYkCRA9TVsSAnZWagAAclAP/0j3yX/I7iDCPH6/OAU6\nkoGzcdeHrUa+N9JNyFsRcAix54zFoFDU6IjaQrLTf9TEINvnvunfysIuMTDl\n3Ec/nxY7ZdRZmvYMsz/Lb0fAq7mZB2Z5oQoU/xWCFJZ9OBSFToH34hSxOYNv\nS2tPREdaxBf6T1MyYOH1SIbQSq7NLIaRdAMdhurHaUx+TZRTdFfwSOZLC8q3\nDdK7L6h8p9wBr09h/lIf+jkBa6V3+tvmrumN8rjyhhBiBcNMwn0BMfCP2pkz\nLSKzT9Vd8cU1kPp08bngKVVXkRogkYPfFvNoMBJkIyRLNEYeU6eLE3FB1YHv\nlJcWNCcOkfrHrvHgotGGtc4Ic90MbE8Z0EsEmJOk8va5UAEligNGNxldOWzl\nSHolXEIes45VTpym/DXycxEnC4qUbi5ZGtnKaxYM61I3RGNHKcbbtuNXhs2l\ngCK5xDM5c/PTchOCFB3CygtMUB1T4U1lnl8jzZd+022OyUM++XMvBYNMMMnL\nWWKZiGSSkolbLEbOLYfejgRXvk4/uTXSvbjnFTWMMgyw8Fp7czCRN9jLkjjs\n2lSDaqZ6AOs8DsCSM8Cjj5NrsEK0/pN7wHzmXDSvvkpsi7Hr0Tlz8VibdPqP\n00lMf1TdKy8WnWYDgcmYGmco3YnaWGtZQpkovPSko59W2xXl4O4on5I80a5L\n+U0O\r\n=89Lp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-cacbfe4-1626424818157_1626424868221_0.20646368693943362","host":"s3://npm-registry-packages"}},"1.1.2-canary-cacbfe4-1626424819036":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-cacbfe4-1626424819036","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-cacbfe4-1626424819036","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6773b35ef197ccdbe0237334b240bd34d905caad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-cacbfe4-1626424819036.tgz","fileCount":7,"integrity":"sha512-wXrREQh74N1LMYId4sYvYnIJTkcw5NT6NnPaszVebqQPsDbif6w+zUs2UxnpNK9lD+ys9tSst6G8oH+xaQMfLw==","signatures":[{"sig":"MEUCIFgAIPbp4GV62bJeRgQfx457graeV4SGcLUkJV1BYVwIAiEAhBQM6crdK3MFSMJrhtpShjI+fD2MafHmB+q6elSh9Kk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8UYtCRA9TVsSAnZWagAArvEP/2vRjDgYTqNLzWj7nCWE\nFOsd91Rp5xzL1auQ6DNofsgoKYKKakeOXX2SUzlziGp45mzZs1mWdg5DU9Me\nNa6e9+/7SP3IdG4TV3W9baPd/PqmHiwZtO+A+E7tKv4BV8nOY5w5H2NbHfQ/\nNiDN+GFRiuPZYYGgm16M2DjEOpIChBL1toDJkIwUy0H0DFRhOhZuDPuQWzhh\n0pgK0dQPYXxV4SrnzKkgB5RrjsV3a0jnvcypkHgtO+wJDqFLT0JPPZ3sirhf\ns+lOU+fddfCWWwm8OSEog3FffAw5RXT7I1ok0S7MhU9h0metJN61AMnbRqNf\n8Ah3+WgCf76fpzYWA7bzn9sBKL2gPHPi2uVOtBZkGus4MOMmKb9KlmhdzsC6\nhWztadNReAZc2sd5gjOWEBygHuQqT0Vl+Lr4ii8OorvFTHdB9gDrxxy7hX8G\nVVQ4qm2PYxovt1NuDEoGBiRi3fvOfmPgU+YIJc5A09r3FuqSCK30hnmdkzw1\nlBgaVp1zGHEKSoyE73bOmHraw8qo66aJls+lsQrr+DtQzEJ3zCX8+/1oKz9x\nqowWivJL5YNYkiukenQ8Nh8S74Y4HY+JeYtcj6bGvlRvK6XooU8K8dl2Lx7P\nSxbF+asPgru+tJdC3tSkH81qhrrD77QKkXMHHnRzypHOM3MWTApBDO1d7L59\noQ2a\r\n=Xx4N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-cacbfe4-1626424819036_1626424877000_0.07106606815913019","host":"s3://npm-registry-packages"}},"1.1.2-canary-ab4e76d-1626435190370":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-ab4e76d-1626435190370","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-ab4e76d-1626435190370","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a7ecf11e0de1466e5d18948ad6834d95e7333bb5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-ab4e76d-1626435190370.tgz","fileCount":7,"integrity":"sha512-omxTbY4LgWcAhexkZ05NtDgKMLguSl++vrRdo2qy7Oa7FDPCciTS2CqGrFbo1SRaZNrePPfXS+o9DJR/myq+hg==","signatures":[{"sig":"MEQCH07Ig3TpVed1obR8GMcezzuKkV/SIYcxivUweptjw1QCIQD6+Mn9/ShXaoWPqTweBAqFhysbs9qEUfp4QQpXVnpUTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8W6pCRA9TVsSAnZWagAA9xIP+QD+d1zW9leMBalflhzX\n+S26RDm/bFsBErMb8rcYA6vCtt1nMOSVmPv7FYS3kf9J5CruA3ASiNFPkvbQ\nzm1cD+KE7ni2LicGEx1oQM7GslmRfFzRkRU81kf61M+jZupOpqz4HbCY6eBV\nc2nzwDajMFN+5sTACOGmLvzQdlUhVEsWJ2edvbSIV4sVmosTsPXWjd2sYPHa\nMVyztoxK0lWyBJQbxdfk9myZ05uUiKk5yDGo80+oB3VmwIcLYXdOM4RFRlWe\nA9JOEomCSTe0BUi0h7s2mqb7YfZqtJtWTvK1ZtyuEI7OjPq1LUACz6ygkRs3\nME/GcT5l43ZRO0Wsrx7pCDM6ikHAtQ1z6WU7PjgbLkAXZFFwalBjhZDWRtLm\npW0U9MvV2/k9X7gor8qafav2gzLO0ralzyv6fkMjQI5KrN8XyFNlEdvlYte3\nO3dnDqCdlupfJlSDfslgJP4WgLW2sxVtEE4ox2iZrMYo94xb6Dm1XJxc0hpb\nyiqeT6qUmXV1zsCiN+i9+qrAk1B3u8uXbZ15PiPS45OG1TZHm3d/fDlYRuLZ\nEpdLQ1jCUpXvRoieNSwoctMCYd55oQe/bTB+HZVztQa4pcT2xciaXLZBXqi0\nzCnpdTPTmoZK6/0+46ZYQfsvqkbqI7jIHL/rBVva11dDMdkIjp9Qls9U54fn\nrZy9\r\n=uahu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-ab4e76d-1626435190370_1626435240999_0.5646483979947099","host":"s3://npm-registry-packages"}},"1.1.2-canary-ab4e76d-1626435189645":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-ab4e76d-1626435189645","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-ab4e76d-1626435189645","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"74a241a1d96411ae0485378955679aada8128615","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-ab4e76d-1626435189645.tgz","fileCount":7,"integrity":"sha512-nukzTKnC3G5bX1BA5vlp7Mpafq+3kn2+nxQIVLMPXPBWRl+vXIwNvaPe579Hdvaswbk45+aBYSYvhL5/iQPL/w==","signatures":[{"sig":"MEQCIELqyvK17JTY/TqbVywDQ3CC/uwJV8qyWPXPYLpEHWQYAiBA8XTv9s8iA9PI6egGnP04z/GG/B60kZvdpylm40TGPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8W6wCRA9TVsSAnZWagAAjM4P/2jX34cMq6gxbqUNuNZ8\n55GZzHquCAVwlLUAalADC6VkvkOaMsTsg0HhCw1A8tOJxqkbW6Sf8Kvjz5S0\nNMlghr66DfYCdXVD6fhS4vR6LO5DfW3GUsQNFDjuDB8dk5vqrT6krIL11ZdW\nJeTfTO1GUwFNUdZrfQqhr8FCel+aFrAZEfkkwW+6u49pjvZSgQaAac+htfv1\n3RG+rqNuTyc6H8tZeCxIQA4ETlz2WbgA5XR/Jtcul1GI3SoMvwR2011yop7x\nglAxGOTX2UxmGHuUXb1tFvgkkVEVUyyT5eDA0TQr4TxlqBjydkPmRiMS/4DE\ns19G0e1Kg8KyZ/9536VtmYCkP/MUajmaqHl2Kf4pI6t7aMyeUCc36adCdkaV\nBr4ba9nj05JGkLMfrB1jTgaC8AeLV8eKZoO8f95pUoGRtobcpUScgwCXjXRL\nvQV6QG46VHbNRo/dWYdueALwGRjjzZ1Ms3W+eMQHVOOQq1uu7Y3FNhbzYIc/\nc+EE3vsiPtynCKbdPmSyR8oyJQSwLV6s6NNBaPvblKiWfLpEqPBUdFcJny1l\npVSwXWyBKXaqlcCooEZnobaE83btUQ3AMFG2Is7mHMD+N+Fplvcl0Cd4f+kJ\narWVFrc42JKSYhHyeCExEYYFTuHx7ETBcw17DZ94vOnawrqjQ5TRa065oP3a\nv8Tt\r\n=ygkv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-ab4e76d-1626435189645_1626435248618_0.09836501578089152","host":"s3://npm-registry-packages"}},"1.1.2-canary-0868351-1626435354401":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-0868351-1626435354401","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-0868351-1626435354401","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a3999f055e4b842307e5d4b595a1992422c2b2e3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-0868351-1626435354401.tgz","fileCount":7,"integrity":"sha512-A/7f7HvZymI7f3VUZANDA78btRX2FB23I1NAV8NFLTGkluq1xd5ZHpUzKpPILfSweWmfX60ZT3YjyJaIUJUXsA==","signatures":[{"sig":"MEUCIQD+UAoaMxiXQR/JUbTJP8x/9X0J9zix/zC/J5DtCxKpzgIgAWCtLMuZx6Tdb+MRTxJy4ybovgDIAHTCDlDTllUd4KU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8W9KCRA9TVsSAnZWagAA+/EP/0hdQUzz2fFJ2omGVwaC\n+xKfvyM3EmALRRmFi128yYZVekx+j6mSGAOJiolDrTw56jYKT4LT8z9gD6EU\nCDjHKOa6tMqvjvFvICxMy9pI1jHpzDE5hSYt6hR6opolDII23QorXsDI+Tj6\n6nTeOjAEwQwwt3DhyxWUO5XsgXb6+EnKoz++DADC4fhmjLsLU0F9eszk/1y4\nC0ryXe1YO/bodKom7/6liY0FVSWHj/64js2YLFIca26n6fO6LOQb9lG8hc5i\niIJHr98mI+V4VVmO5twmq4jxnM/KBO2BWt2FcwjlxW4Lr+imM04IqLYKtc9A\nze1trCTxWJw4m4Wr0eXbmVjKeRglPPiQlDg+VlviiNHSiZjg2cM5quI0y6Ff\n2WsM9VN9wEaiDiVx4RG5UKtGRjgJ8eUyXDb6kuHFN0a9e8gM9Z3L+5pYawY9\nS5KIsc1BAuSwirRVDzrqsfM2ea3sk5/AVasi2/HdeUlen4rnnjLMl/KLZ0Xu\nTLfLeY74A99qaZiep5vmFUCQpOAblCwZPi4yOZyn09frrn0uACryOE0ygBsU\n1duNlELF0Q4kxv4aGRgwGQ9c5n6C1+UhhRsZM8V5VUZOOyFRZfINXD8EahfV\nYInCDNocE5UoK6df3WidwOwJoXwigQ5E2NPVgU5LKnqw7j6H2RDw+bPPnQTM\nfbGb\r\n=Ung0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-0868351-1626435354401_1626435402570_0.49700773861813174","host":"s3://npm-registry-packages"}},"1.1.2-canary-518a1ec-1626436937408":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-518a1ec-1626436937408","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-518a1ec-1626436937408","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"739f80dfa1e823b1edd52b5e29d33f0a9368c8eb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-518a1ec-1626436937408.tgz","fileCount":7,"integrity":"sha512-MEvVuNLBObcuRoq0SEuDVOEd+JFasT7tkoj4WS+TskCL16GYXW3lDJfZXEwGe+niG0M+AJozL9KM47+Fa5rKCw==","signatures":[{"sig":"MEQCIBQ5Md5in5kW2cH5KqkqnzgzD8MRlYiZYMra0SLn65mAAiA71zA7p0wDEt4iSlx/+zfhNxaBC8HQYDxX7xFIMAtmoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8XV6CRA9TVsSAnZWagAApnkP/jDzGLp5P5vAoFtSPbYU\n4uwcK4NLKJcc3aEJYD0i9IVtVQqNRLDUErsG0IT5Ql+yv6SUcTHEZ4VTkAr0\nJO2+ZGC4uoyYY7R3fLRNNedbYhO7zzXDZ66AZc0PYIIa183LH8nBDSAvzHvD\n9p5rrwpEyJJXd/hVAzPblhehunS1pVmQLLK22LnOZA0d9PQevlJgR0a7fnEI\nlmQoSq6jbnAa/97GU3Wn2JPTbOSMCQM40WCrtkvFmsEaTSikU+W3I3woLFMU\nrD4PWb2DhMz9MShiE+DoUx3O1tvt5pcOKePDHLwiPh3T5ht58R0TXK8z1jDJ\nNZkM1jJGlAceRU9ySWOmN/2HI44LFAeE1r6XYHBjiilIjVPeq0Fl/JDSMbwh\nxvMLsI2m+EbMhOOWSIrUavpeSMNlXjb8Mb1AyKNRhzmvnyRmRztUkbmdJQuM\nS372kneW+aSawqUGtoMLChHH3NI3n5BcBXmpW8KyQ+wq3OuYGk7OcNVozgPy\nIJWlt+9HbmIkL+A7cdFfCfjuzuJWj37lXwv9kDUEthoeUijhVpRpGmtdI9C5\nI36V+osRzEvVBKnCx9m5adiEse+H/WefnayZPc4ojZTWvJlYvhI94RBMwTpK\npzIjB468ht6X8pt+8IlvElLPTq9a0hstK/NdPtXnGijKu6vFU0IbVMEnBSB+\n9+ae\r\n=BOIe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-518a1ec-1626436937408_1626436986634_0.6837473545690047","host":"s3://npm-registry-packages"}},"1.1.2-canary-31a768f-1626437935067":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-31a768f-1626437935067","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-31a768f-1626437935067","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d39212b1f44489d068ffdf1948672f9e75d27cf9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-31a768f-1626437935067.tgz","fileCount":7,"integrity":"sha512-WZOhYU6odlLSfLb+RK/MwmWOJsTbuD6LIm1+dGY33xOeGnSOZc0WQQL1Hwmr5KrxCmB5r2lPFa7KqxeM/0AK5g==","signatures":[{"sig":"MEUCIQD86uuFsd9cbFT8gGD1Q37r1kESTKxI5VI7XAmSWM7QZwIgQ3d8alfLMBY8l+qk4/IFJRlU62AVIsN0CdKvzZ/3THQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8XlfCRA9TVsSAnZWagAAniAQAIHyPfhqOQsglQTfGvoZ\nWWb87z4NGgwfqhH6HBjW6/2307cIsGq9aBfy07vrRbe6uHenl0L1i0XcmntC\nD791j6VZo5KRZ2F+WDzVDus8xfeeLa5LQ/eyO2dbR8Fv4m/6eID1rHS8di1R\n/eYT+FdJmFqbInth7kXzO3NcnT55uYx6KcPt4FcsIj21+v4Drua98zcZ/m5s\nyqhr2BcpU2XdtfIu526zV3sUkqq147ivqQJ3Im6CeztVWGQS5u2vY/SFN6jJ\nKCAxN/t2DcPCkLpBOCq5I6Crzp7+k78OdKsWVoqKqiUa6ufFIFHeWI9R7cnU\nH4jGR+TGJzoi0TXVmRsmDyIq8NIXcLe5a8X0X9JQBQ07K+4JuwJAwEbcvpil\nMcSwmFSffsNpdFZeeZkwMOu0F4cvyVnCdOUW/9DiD1nDSI5dN4wzC2ShSzQ8\nIhLOhdfzHdXSnL4PRRvrIqVpLRi7c5LYiPdkzsppkaDc0Ae1NR6XFr43NwCp\nUVQGQtQbMJyy7UehFzTZs04+te7NPDnd2uqG0aOOT9jVyfdz5WXiX/xJvVqE\nXDXrwbsXQj/9OEx7te19jcamxseuw3feoYfSHktTo3YfRZMxPbBZqPVyCS/r\nvKG9zP1toBOfRvgMyfY3RMhuO0R3E4B2EpyH/iDoLmExti/sMumXiPaD/ys8\nzEGD\r\n=XR9C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-31a768f-1626437935067_1626437982903_0.9429992358385706","host":"s3://npm-registry-packages"}},"1.1.2-canary-31a768f-1626437973147":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-31a768f-1626437973147","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-31a768f-1626437973147","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7e28489ee22471938e7fc9d16fda0dc2ac2f8ad4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-31a768f-1626437973147.tgz","fileCount":7,"integrity":"sha512-MQFtQyJ/BtcIiw0TqEC9rOVqk6zHgPyer6AF9cbKzcTnWMscUcK2K7zWZZ1DQxvxRg1N4C4J2hlYGRGuLkpd6A==","signatures":[{"sig":"MEUCIQCmdNt+5lss2uFBVuDZi5CLbIGd6bob2kH88v2Bs7fUCAIgK7LUFKTLPptkSV/DZISa65vE27JCf2DrYdFjE8N2JS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8XmCCRA9TVsSAnZWagAAzUMP/RXW0T2WAGOE4nnZDUIi\nQhIuqNUVaNzdmCx9AfNciwQLJbZYi3PDtUFOkJslxvIPIGScrD6kxCS4Hg06\nQoGbDFxtJOXzRRIhF3LNuI5toDWr6AVMdvLGz0p7Ww96mAL3vD3QinO1Qi7w\n1tJSql693R6IJ+oCXIhU/W0Gd1TFtR+y3MIt/dGcQ+OUPP0EJ/FKXk9UDFYS\n2tWrWwx38Rks1S1E9OeX7SEwfqXCidiL+9eauErsnBmIMstU1XjeiV30Yifd\ndoPVENL8qEnnWNvcuM4IL/UUcNo5+Ff/doash4hYDMZXnHANdwNw/CTTyDc6\nKb96UL33hS9kzv5iHSTuVX2IbYHGih75if/+oLb1T6r1xUqog80YpipVAS/3\nbHRhxNC2vDHwUhpGNLWx7Z6tRdoyzTX6IhP/1vb8GuThMSMc3VaXFEv66HBE\nbZivTtxkT4iPKKOoW0XB5fog8R37fGmtoTHEFpjbw/t5DpCbbSa2a9CtAoVx\niDDtktxqNOJZsuWeFWyRhGQl8kq6isVPAb31O6VGdBYWySiIthf55A0jPEvs\nKmfhl7dB2E5mL96PHOMlUiWFkO2N6OnBG5ZXn7IYichRn4ZUIbr8VSJg1VvB\nG/FpmmhIv/WsWgPGCxXPxsXGsqTqxJzBvwjSw7ry7ybWcixkh9TzRbLD7Nk+\n4Qc0\r\n=8IiX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-31a768f-1626437973147_1626438018750_0.46033135466186703","host":"s3://npm-registry-packages"}},"1.1.2-canary-e450628-1626439139686":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-e450628-1626439139686","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-e450628-1626439139686","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9179878d4b08bd89afcaced9450bc50e2f4f784c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-e450628-1626439139686.tgz","fileCount":7,"integrity":"sha512-JVwj0RRKYQ9iVfe6WH+k7Rm7D5xtOt/EB9FAK2RZXOk4O/fMrvPoByODFuR8zt/t+yTMqkL66IjypdyxUryxEA==","signatures":[{"sig":"MEUCIQChfd7fesybO8P3mBocoo/gTSlJVdlT1Wk+QIiPg4+IkAIgbQNpt8xCX0T8GhP1rb+1XgZxugV38BK3cnH71WpCeF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8X4SCRA9TVsSAnZWagAAbGEQAI2yhMPpFZ2L1MwP6I6R\nCN3oelZV4VGsZjcEEfZCPV2Th9fXWGqd7e9Nj4VFeH9GpxehQNrHnnAUxOch\nT2578iLaW73m0k5HpdPvNeuahDx9CK5wSano0d0mDIlkbhPAEZXkyBO6qkrw\nzDzCdNWzkprSjmBZLZMqvFRVX92PvEuwRznC9TVIJkzMzVv76hucgCcUxRAO\n2ccxP9HaqBKAtvbDaOUSRpBvIUWWHoe0wr2T97KvdzchX0BMHQ2UYdC9pbgX\ng6fFSnB69l4NHSD8K0gqHoRirYIK3w/yT4MV/gmSb+8zm0/EFeGSJoCcBtUv\nODsIsMeBEsp9ct6oPZh1mLQu/MCaiKhNGuQw40R6xXimuDu+/oujyfU9CEaC\nDk54QUd+aJhTmWOMAT8FG9ZimKBpb3PGYFmuUsLx0iIIAGouQT6zzO7g3DmF\nYSKJcbB82oXXSw2b6e1FIKRh60AdjAjlds9rKC/J7ZShJE5wld9sEt6SEhTR\n4X4EQysyWeNK5JwZJZAuvTlXhkgDmpqVq2XvRwRnwkpoBtfyClvE/wPXWmLo\nQfGTnCZ6im2RXpBqWcqUEcr28sJW+K4e5sZpttNH6Ka6LCd6jmvl/1Apwp34\n1RFD4caGduBdxH+Nm6sgMv7nx18N7Fx2KK6IuPzdw7MszTXOPF4lcRMEXUc3\nbcLm\r\n=gzOA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-e450628-1626439139686_1626439186124_0.08171551061969273","host":"s3://npm-registry-packages"}},"1.1.2-canary-6977596-1626660713690":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-6977596-1626660713690","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-6977596-1626660713690","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"788c09c9f8081578f3cd3fa7e01c8039d7e2d4f9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-6977596-1626660713690.tgz","fileCount":7,"integrity":"sha512-5nxHi6B/caJW29mkVKIonNuvEO/Ha+XNp9Yy+Rqsk3Q5osEy6FytO1vswjggbQBIrBQpx32edPsjGluA2+8vUg==","signatures":[{"sig":"MEQCIFIrgAGYUcvX/U0GEOJT5aIk6rjgYKCSsL2+n/UxAwbEAiB1nKEzyEiHQTeawAXsz/EOWQKpAUcfIy3fNBU/XrBciw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9N+gCRA9TVsSAnZWagAAix0P/il1ToASD8DtZmXTBCO1\nl+2wO6kIaXrblnPMgCxnpwcBixvADTRVs5rtMmcIGVE4GRsCr6VDnPrRWF+F\nV6s5OhFsh6v4rqPrguRzts9430zWXoVyCaDJscRnbA5BjbCn7CwZ6hFUbO2U\nFjCxn3E0aFNgmwdujy9tKfQFhdoHftLKCiRaNAeV7Jts9gfzPiwVpJEbIqvg\ns3zmW4YeVbmJaupMe67TZG7uzmgJvWnV/ZSsZgbgyw/5ZsS/l/Vgmsm8BiPO\nyUN7imfYZuUSTsAsS8qLMChva3L2vS0+Ug5dpJBwwB2BLAs6anPmQGlUwaqO\noa45b5rM4P1Xu4hd+Z0L+BOSKgg5LbG38KrFevkbbnlqZp6/J0lM3bj9+nrc\nyR7xBC4Xat0HzIDvWLyRO5+L0423pwCiwb+sEyhNjP15JgDOUwgxY7B5jBaO\nyYyGMeuExRbrdcxpFrotJWbIPHt0OB6REHSxpCqhT4lYwOCfgcuvfXBqf1YP\n3/uSscN1Yb+krvNo6+iKyq7A2r9RPWtd9V/kuNSVCZFf2CmI5PU4Dfpph/NN\nmrXzboKNcB5R+KNzAnvHDAyGThjP0W2uSX5Kf90rlo4wP3qxzU5LDjkSwynI\npkIos5SUmCQvmM8A1NcZaIDAbAUaNwniafvuOzC775ssMiF1M0tP93/n7w2S\nUXaJ\r\n=nJ/c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-6977596-1626660713690_1626660767987_0.9171605147241659","host":"s3://npm-registry-packages"}},"1.1.2-canary-aef25c5-1626686804588":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-aef25c5-1626686804588","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-aef25c5-1626686804588","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4995a002a7ab8519595b0f3171c744c266de5bcb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-aef25c5-1626686804588.tgz","fileCount":7,"integrity":"sha512-TI75F/TbToU/A7DNGlbTne/6qPcrg14Fnl6JUBNP8k6EC/fodxYLkhi2wPlGKZTR2rTuTC/YiNbsKq0jn+xQBA==","signatures":[{"sig":"MEYCIQD4xg7LLeSc5JzMzyR7T0Lq4XSkIKh9AlfKJ+hI7ekALgIhAJrgrVKNqQVEit9dFUBwZVzBWDJeaNsjJiLu1WEk85s+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9UWKCRA9TVsSAnZWagAA85YP/1CbYShSUpad7mDKjVvI\n0N3s4dl4FRzNwY/L35zuyAj8pSZVXeIbPT0hVSFNLiLV+D0xcbdqaJuRNP4X\nzA3wHkLxn986b/AvM/O2fJlnH4drXQ8yZc4oKJjhx3WyuUQJ5tkUg+zIf6VO\nphdPnGzfvhK7vKIBtGNUJ3J3Oy1cPPI0UCG98stmZFulw9/QWWP0gvav4Y2F\n5NjukkgdnydpqUXWDZAc9orHb97T6wwwWGsVFZbSkN2jp33PVeREn1ZNzFVh\n2Qk+nEyZ2GxuF9/EbXS3f7Pyb0MB3UY0eWrP26u1DVgV+6v+hRytZ+HBjtK/\nHFsgqncEB1WUIoEWrQhTKOOg7XQZVcQZOli52fvXIe62PEGW7huuZuu/6YIL\nr4+38hPfxR0mMw/mutAGjeb4cZG2paZNhA/Dfld0/uh9eizdq4tDVHVJ5bPv\nGAWvywhRlfwOpuopF2PvUHZiYUW/z7rVxHfqhz7NvrEBZfZkZokerjbCFUxa\nXQTbjuALZJTIempQGCQuU+QmFV+Enk2LCNe2AOnONoFg5L7EDaW9LZRw0Sdx\nAoO2gDnm1uiU0iiutODiSgx5mDh0+LSL84kY+ewd8jeDJWgkxNBPBBg6tjVE\nOO8FFtuonzP0ZNpXub88tYCTQXAf5LaLwAx1a8VMnbpcBLfSOSWb1Jf1y8Uk\nKTkB\r\n=wyT6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-aef25c5-1626686804588_1626686858373_0.8152700254397784","host":"s3://npm-registry-packages"}},"1.1.2-canary-f798224-1626687403415":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f798224-1626687403415","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f798224-1626687403415","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bdb32847c96d88b9d47719437b982d69b4ad07b6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f798224-1626687403415.tgz","fileCount":7,"integrity":"sha512-g1obLa5GfHvdZXBvwJLjHXuz+WO8r9eThZ5kNsT9n2PVcZLD/PRvZDLFs5ji+GVK4q/xmC/Sru0uJm8u/G52BQ==","signatures":[{"sig":"MEUCIQC4GEgIazSMsc/aTf+0+TTgZB+hzhVyZUmIWSkUMydMdAIgLvae1sIOgn+AlMV+eUlux1m7/VTUS/NSSHkO7ASPoFI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9UflCRA9TVsSAnZWagAAdA4P+wYjRh3pqNZ1nVwTSKpP\nrUTRE4Dh9xacmECPD0odtip72SwRFult9/5UW5LJteUDHuWqdSBgXAVMc4Wy\nJW/gA69VAGCtkZemxlHoCS82MOHsm9x56D1WszPShvxOECY4WREt5ufiBfEP\nriOgCHq7ZepheQHtWv70u3UsT9qr6NxcLJoppn1bleYskHne+h3Fx/A+I0vY\nCQ1ShHEhoVCYYjq1pb6bOZuHI9Pr2x74Lin1sgJaR+dFBgk0BTV2QvftGMxS\nvSdTwx7FOI6120uF525Cgps8/qj225em4dVrS+CQI2C+XstMS0HQWn+bX67F\npMEsPUcol7uic13lcozN9XF3+mkxrUb8whWPydX/A24FKq+9GrViRXdCkObl\n997ZQIHEgReOUF3ThUmTcp5zqio3gSEYt9bZgOqdvcFkIw49WIpexU/9EywX\ns3obO0IZkPnHtgXi7ku/XLxcgcaNim4u9pouHyQ7JrvfxnDqPplTiWoGO905\nhaUraFgJ3RBjQz9q9dxmFs6ZK1oLVJ0/yILX8DWsBHABcIW6OvQxllvTzBrq\nBOly8G492CK+3IhrWF1gJ0XWVrB/wjfr9IKYvnUwWLQIx8SRp4fqncxv5Ow5\nmBvzjpnj5CQViJ5le3EvCgdJ3LkTCTZFDxZavBeEBvuSmSWIheFRAV8lDU7w\no4sL\r\n=XoLt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f798224-1626687403415_1626687461057_0.8235111040296255","host":"s3://npm-registry-packages"}},"1.1.2-canary-70dde0d-1626695472724":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-70dde0d-1626695472724","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-70dde0d-1626695472724","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c582399736e59190e77ae85e55c858becb3820bd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-70dde0d-1626695472724.tgz","fileCount":7,"integrity":"sha512-OMZLsFi/CfJQEsfEqZoiXPWm2TEvwNZXumHiXeIWOPGpF2WNgG3g9PR8+kPBNu6JCcGuMsQx3FmI9CRIreAHAw==","signatures":[{"sig":"MEQCIEqbXtpn+I1iaYuwsyeMFBPnl+/hqg73zIQceASVNy9iAiBlsi21DoSi0SO+Y4vIuC7qXFz/98MotuLOJh26Cqd18w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9WddCRA9TVsSAnZWagAANB4P/RhBR60cy01sOW+/KbB3\nZcTV+LohvR/5ro9sLZOsQUCMO09zkSpxNTGl02ki75JeiIR9pkzBOMVssYBJ\nYUnO2qGGfkzjDFiiQ/ZmmhNlnfpTOWOW1a5ZJk+/mTk86Rj6sUYUsRAYB7KG\ndiMvbp/etCvQERa6c7gSe7ramUoX/c7vyMpB0nssDXeIVf9wBdbs073xgp2c\n76iI3ynrKGx2EoTtXwJBDU/IT3+GLiSrzcseZT8lyl8Az7nOkhPxsjEbTigk\nII1XJpR3OePt5jWF29y1UKMBlpXkdPmWFArngek7Iu4vL/elao4yO7E8pspt\nFyWlyKicu1nRW526iOdAhqrjw3XcHnrgsrhkAjQRbU4399VcWcFScESkaMOt\nSjCg6qYIqUFXM1eJ8cUU+TcJym7iGhH51o8J0lUXwMcq92QwrvT7IgaT0NHa\npeqFXwz8RGZxPzRd6Vqjiu5VQzvOrD3IFe7jcu5cyrjWoS7DQAbYrdaKInnm\ncrFweTrT6knxfFubKub75LUg/lxeGXLd22sIJk0k+g+tPEW8UNO60hyovxe2\nn91gXdvqGDYeW6oa4EFx99bk6n9g871cRQipIJzV/nBXKFezDNz6laviK9eM\nfzNXF5ODJW4SpEC3Nbm1Kx1GHKSg4yj4KYcnTAddfMNMgYxxHNeFSvy/EAdQ\nqXom\r\n=QJ5+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-70dde0d-1626695472724_1626695517658_0.9459389408631018","host":"s3://npm-registry-packages"}},"1.1.2-canary-8c247e4-1626919444465":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8c247e4-1626919444465","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8c247e4-1626919444465","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"765a4a96a5decaefaa39e373797d5ac2bc716df4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8c247e4-1626919444465.tgz","fileCount":7,"integrity":"sha512-GOC22vYpyjsT70Ai2X64/uI3IxAYtOiTQlRyoyPVhCXN/U8DlRgeoSHaxo6rayT5EXPHtvXDFiJt9OahyxDVUg==","signatures":[{"sig":"MEUCIAV+bFHVzVIiJdmjJpO77ErPYW0eivY91nYjOIoPQYmpAiEAmgj9u7YgceI445erLTCzWHXlqwfIG9HpAIUjVKBQw5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+NJDCRA9TVsSAnZWagAAq+YP+QHexeRF6np9sHqE9MDk\n9LX/RK+80RMSuWxf7l7fcKJjLqqKoqnUyBRMLK8StSuqn1k5wv0F+NUuex91\nPXu03xH6P184gkRe6KdKLCZMHP4b38EnLuOQjUCNXWsW+58Uw2Dqvu7/gq4m\nTKq3D7AaihOm6nfTngBcMu00O0D+pyo9RI8KK524aeKH0wwav27/MnLQIguq\n7ganS9wib4n62wogvrDG7eUsu25rPcxr7jy1xkX7Eeke7azFZ6UgMJPY/s9E\nrnSsd6ltqMU+BmBVFjTmwM70TPVadK6+0a4YNOOhexJ0yRni6daZqfA+JnHW\nKB5u2N7ZtLnvveakX1qYyCxGL4vx1HsxUyZ8wtg0Xp7l6pDiZzYlkdtFGgfM\nmGaIYmc48GkR7MqwKqtQC0XIveYJlEOtp3PX9JbHciqGiUHJIHFluOPKzpU0\n0RPthxMYGXgGftU6DyEI82KSRZmz/408jDA9L+jr8B6AfB0/IJd4RDJlxrXV\na0HCem6+vPCAErTT/laMRDAIO7GffDxkSwdyhF8HQQAox4SZveC/7VgdGmwf\nuNjP0NpHsEbULtL36DoFOQyh6SZ3Dfx2eaKqj4FNnYK1iVoAXN3tLPNJHTcg\n1NbHGzYeF9265r4wrUTsIgGJEiUJLJk5CNKpLOL661lr93APvtxURBUFIw4h\nl704\r\n=VXPW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8c247e4-1626919444465_1626919491372_0.5899959128841623","host":"s3://npm-registry-packages"}},"1.1.2-canary-8c247e4-1626919458163":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8c247e4-1626919458163","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8c247e4-1626919458163","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a5624aff3be26291fa8bbdd8462b87bbe46ba7c3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8c247e4-1626919458163.tgz","fileCount":7,"integrity":"sha512-b/NJgjyu3qCUvpaExHGbxpJvFvfvv+o3f9/RySUCboIhw77RsrximEMrJw3bzHQxi/m01kXYAHb/DA9k93vO5Q==","signatures":[{"sig":"MEUCIQDWyQ8zgoPwq2Dp1UR0jdXqwmcyvmHY9Gleb5Kz6JwulAIgcqMkoq7SWifQp6Fhm9YXIQOqCLZ+D7TEpPWWEl1z610=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+NJQCRA9TVsSAnZWagAA2AIP/1ZQsTBrrsRR8ykfV4C0\nKcRhsIlVHRz86KlGVlGSpKJR2QXeNh58w8kPtvecWu9VVWlIFhq/epSkoPgy\niB1u0Ys/xW6bD52vgw1MUzZss70VWqShxRlXx1cmGQHgxW/14pBljeqRkIq6\naFfSRrwBxyUxcuoO5yE0ROWkhC8iP/LsgPo3lqndsLPZJrvLLAu/bvfZbza2\nwbMvGZ+Fh4zu4IgvNmAIETEVC/ehnffN0fVxTiVqTKGkdiUw1eUel2w2dzAq\nF+0hzIOiogYA6lCMP1hv0Ww6nof3FTBM8GXYX61gl9ErzBKPdvMVZI4BImhn\n1k/b6A+mMTfY5JrR+tekKclFKc94qLMBuoxZgs063FUCmqF/jWOixNPwT0T5\nEFUeMdd5YTzqAdWxrF1RdZs50yPiepS84/HWrIJvMTtb6wsAryCzPkogORiY\nKNkxZGXmjDJqomC1rJN8v0O3CyWT56cr0QNwtSmOLPMkqo50ByFul+JKbN5F\nh/1H8c7ADLmZ1OskmzlGy76/OQsvpXZAxKdxvDhht5RiZh9tgiPF3tsNish0\n1P9bCMts2Gr67nt9/x6DvWPOpP2buwoFkgI4F1gXkn68RqniXiHvCdlbbeWh\nyqHFHAciW10UwRQFqImRw+tqGd17D9xJzuPYBgQ6+ofa7QV598mewHZTpBWK\nYIRL\r\n=Ygaf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8c247e4-1626919458163_1626919504574_0.5794286486632705","host":"s3://npm-registry-packages"}},"1.1.2-canary-8c247e4-1626919455650":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8c247e4-1626919455650","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8c247e4-1626919455650","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0a32a258fd06a33eca007f0a74911997584b8645","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8c247e4-1626919455650.tgz","fileCount":7,"integrity":"sha512-A/Ho1Lt2slmaSaXMPbDaAhtVV53o+9+wuGVQj6pzbO6IHshGXLiStcUbSSkTKnv4VgNXJQae9ABlFMxWNOWcDw==","signatures":[{"sig":"MEQCIFdvELy+ZYhJC8YUZraokBaXOyM0aWwNPiqHOTSoM80DAiBrBgoWN5T+DuwpL8juoTdoX20/D6Kz/HqpUrXvIWdEpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+NJaCRA9TVsSAnZWagAA5akP/0LWSTrYtTvjBr/oRLme\noSmoCjTbVPZCNxwnp0f+sUbgKpejfgIb6BAVOEQCdww06CEDUY2InA2Mh5yz\n2aOPYw62tApVozoDs+ZCekPYIM3ZJ+cS4vM5TVX18Si1fJSgEPVMnxP8uSWj\nOTJkwe8UlYSB668YDkocBNh0z/slhwk2ma5luqJRw3LazTxjPbzxz2AYr+MS\n9kkyqRBxHkoXINU8pM4huQmknOm8GTn8GTOcwqdIe0V/19MVtULIapkJQklY\n6BQzJGbbBu+HA43FrxE11lOD/axHFnJbCalf7GRhQ0mWyJr/SG2rSLKgKRmD\nh/28i7X6r9RjY5BrLtkX67EDqjg4Hc91+R4Ql4HzWDCkYCQOU3A027tOICgw\nypbsmVJxGNbhayaNIN49bgZvlqFz9J9DHNZNL4PWjc/R+ehwz6XHiplrO1xy\noQP6kvZgBuG+t3V+c1T+4XK6i30pnw4pOKeUhCnNj5Afwg/U5yD18bZFGs+k\nEP/JBcrOe0hXHvV3N8Q7hX040mMF8HR2iPeZL/GFxNHG9OZHrqyCB7G9y2lK\nehoJ/oQui69ePlw2PR5NqCFN0Hleqgp9FBMOazt6aNtbY+5d7CjF3kRB6RdY\nAPdK4qFw5z1cZkiQdAlBxBKrCE1hPvt1IJ4LTUVlY6C/Nwz5idEIA1eoONel\niQPT\r\n=8jGz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8c247e4-1626919455650_1626919514660_0.26020112905448745","host":"s3://npm-registry-packages"}},"1.1.2-canary-f46f94b-1626941026566":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f46f94b-1626941026566","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f46f94b-1626941026566","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a5fe05ff53a163110dfa9ede7055bbb35a926773","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f46f94b-1626941026566.tgz","fileCount":7,"integrity":"sha512-YTHmEcmRssCQo5Gqu7YvK6sdzxYzi2JIG63iVKVmrzRW32AEZWsyNDFXlcIQU+8OystmaTgQoqP0klEgsIXayQ==","signatures":[{"sig":"MEYCIQD0Oaiu8JrwTMUuqZ+sgIKU+bk4glkhG86UzLVOTGZMhgIhALyzEyf+Q7GUPCjqN2i7XXp8UNqO6KbsTS4CxZidWYGh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+SaZCRA9TVsSAnZWagAA0vEP/03rWCnIqmgEwBxl6UnA\nxhbFt6tSnxm3+rd6uwq6fI90BuIkGF6nrb1S1hVg8LQHQ7N4/JSM+5qz3kuq\nJ1uKQ68FDfjx7Tpah8BhHkHL/gdH3EtTrbwPlWs7kRhHIydyz975KqnS74bq\nouvHNlUxO9Gv53kPTw/UsVwKv37TibttvVJqdyL85O0pt5F8WncS7Hfw+AFD\nr8pkCuyZkGg8UxEi4yhyBsgNcJp+N29BHUls2gXghrw4On/AdjYbNYIux7iB\n0NRud78DmpuxLJN9hby84Z6MB2XLI/TCcXavo4X+UiGl6oXvZLHiEfAVYOv9\n6DAQ0zkEvdyVY6OQ/nsoMCMjhlD1Ed86LBG9QTNIR6DkANEOaBfUSaCp9MBI\ncX79FQeJv8t0jD6SpQEueF/KGnksaNjHTgWeWbhzK9Atbn0JfhT5J+3PBeil\n70HNwwbZiDyXBhN7xKh5aLwee0CshnWDpNAvJGoZicy3g5fX6Mj0RAw/7NFk\nrLfvfwx3Q1ZBY0cjBBZlZ5+tUdlUhZORnMgbCwl7oRlHkRrIz/chbivTIv/Z\nQHpvuNE+ZK/8HTm+KnmqT/jK9Hx2GeuvlKk3Lt8E62fu5N7YbRFilhOT0fTj\nlEHh3LhKcqGfyJ/4r8PIdaEeIBxwqFoDXpPhiKEz5fAumXHaH1J7G+jp+gGJ\npXS7\r\n=qDvq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f46f94b-1626941026566_1626941081553_0.6607816646005538","host":"s3://npm-registry-packages"}},"1.1.2-canary-f46f94b-1626941045753":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f46f94b-1626941045753","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f46f94b-1626941045753","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d27acdba29b3a367b3712fbe1915f03132bec199","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f46f94b-1626941045753.tgz","fileCount":7,"integrity":"sha512-ZFGpVWgQUSrggfZ3pvzD/LEgC0CluZtN1pwbG2qtR9KYJDL8yoBEh1di77p8HWHr9yJSt06Z8Ad6J+RfcSpf6w==","signatures":[{"sig":"MEQCIGnqWFcwSYEmsrXZfxNXuZ+fd1LTmAfsFmVE4UZ//iRUAiB8/mJ5dWDcPj0IpxDh1/CCLM7h3p60gW6kL11E7ssvuQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+Sa6CRA9TVsSAnZWagAAaa4P/0JNIOKBx1pjs34OxJ0x\nVewMzm14SUbtBtejutkJphP+G7iScC9LMd+GIUqfjn7Jvf0//MBXDGK8lhqa\n+0KPJnOcUyFZNlbaBw9C1nBtrvCKyG5J92QrFemZP8Kc1P5cDpxj8nKSCNJa\n1zlGRleWkxp3BojfYJeXpDT6Wl2yLOOV+LW7HZzc1qh6D9POUOREiurwIj/L\nRZSpqx1TSVroMAIy+uUEzrp+GbPvsLRNLd2Et+DnAO4ZZUdKSPTOwge8LNMc\nb6zS8vAEQoWfFIrfaoEPvKGIYnRvBfw5dTg9F33x0Mg6KIXSSbLfdZXnj/zv\nqi4l0aH98xXE2swW6A6r2R79MhoSfWTfdbp28QypzC4pDIN60/FjE5paXAG2\ndobGpHqmBDbjAV4xzDHBudLC/dPlO6IrCSWGKBpVPFEzc8YvPGkirUku1eh/\nCA2ZzaZCnCSLFQ756k92QyuAX3UV48ehQqi+ZDJ8dYv/IZSbNISY6Advnbut\nZHCv+5XZ0YMcBJfzbEJwjuYlltD5gbuJrKYI8RkS3k8Eok9qfQ0gssrxQagk\n3R+OO3Uy7K6OefqSGcfgP8HJTSlBHbL6A/H8vviFQXQUj9DjNx3xsfr59rq5\no6BtK81AiGUKCGhklNvP862U8Ld+QOTogqq/oaUsDApo13RY95DrlpX7zIqa\nK99V\r\n=NqO0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f46f94b-1626941045753_1626941114075_0.4321511398637232","host":"s3://npm-registry-packages"}},"1.1.2-canary-9a9224c-1626941912938":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-9a9224c-1626941912938","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-9a9224c-1626941912938","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a360bdb44843b688f90bd67165153f81775df61e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-9a9224c-1626941912938.tgz","fileCount":7,"integrity":"sha512-W317TVT3WSqyfpJjP9yNdA2LJDpxNpVgJupvKNVDp3PXLys33TwCeYSa3jplnNCSS1UrOkL7COcbDGw2M+SudA==","signatures":[{"sig":"MEYCIQDha0tFoZWPQUPC2LdFoUos7jmjEkdfLVXo4wVsqE+OCwIhAL/S1mTeIdbh6XhijthG3ZntsGnzf4p4ri/MfMShRHnD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+SoDCRA9TVsSAnZWagAAUFMQAKNfKOcDCTjg62Swk09Z\n9YdvlW68TuMvhqgIE8Gv9ci0c7t+pW/1RA3dRHC5dfRfSdttU3y8BqbF5Cnj\nISBxT9ZUcH8VEZlnW7bSahsw6k2cO9rf1CtWbfYQIqbFHd0rqQCYGUbJEc4f\nPrUwgmvPqk6+E5M2a0U5EzlFCoUu/6WLhgCvSmWwIyuBc8mfElEp0F3eS6IA\n6JiHnrRnJiMgtBu7oSmOOqhfgHrV6Rpryco+0/NVm9llQV2mFfYjsIHoi4vS\nmZ02mYzKIcDAoGF7ftg1jlZlvgL80BJlgqU6UTP4IOOsZUOHT9LhtC609EDn\nTMc51bCWiqw0Oakv8Cz9Z7wivkanUq+1X43NlabPtTyMRd84XrrhDJE/6ex4\n377lWZDGNBShGy0SNI9X0VQG0o2PgqgpMeguIu+HfBS1TKvXANY8Pze8sxKD\nljQ1N5pQzQ8EKDGISatEtgevmSnrglA/p5E8sApFne+WZ6vajCJxacsAcILn\nY3tsKgc5V8x5JE1PBQzDJB5JDSOQl0l1dwcI9AH/JADnXL3SSXMEYFmVE5hz\n57tePCqzhlzbU7QOU8FoHCemJlQHGzflSfRQaS04P3RHOhRwEupaBAslVhuu\n+bzg3Y9kd3Hmua/x7o+UMVL0pbKKZZwMlh31WQqiTxjb/jCQVI0ViZmoak9S\nBSuX\r\n=m854\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-9a9224c-1626941912938_1626941955195_0.35603531210222394","host":"s3://npm-registry-packages"}},"1.1.2-canary-7142b3e-1626942125284":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-7142b3e-1626942125284","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-7142b3e-1626942125284","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9b2df9b5bdac233afab75f407480021690799890","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-7142b3e-1626942125284.tgz","fileCount":7,"integrity":"sha512-ZFmSreD0RTAsVt0nEAe+wNlf6O7uRd0SFurcyEOng+JKVdP3fm4+YVhnUAbKYABBpj/SvcuVlqRgcPsu9V3hgQ==","signatures":[{"sig":"MEUCIQCDHvOEG/BnKwRh0oW2IM6cG6Abs6w0Vh2eDG++d1JzsgIgGCbfKhYuNTH63Gc0s14ifjf5m8gwm6FeyQGzhYzRxxE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+SrlCRA9TVsSAnZWagAAMN4QAIRQhKw+ZtFvh/dzrhnh\nhY7QKPkDxVMGGseM1e7BsOJVgUXtqoXujkiFC3/s/PNkKNMSNPIq2pv5BJeY\nqPyzYYFZnTT1POOdLLC9+I1UyBn+XSA/lKvMxLi8imFojAEIYZM5yTvNEhU9\nO/HgdPd0sHUY1N8bWOlxnYwp7A9ahV6Ze2y/qh1GdBD/0OQLqaUNuHh1J+pA\niXgAru1R2S8UqcIlMujIXhuyiFlM60qa1+HdmlgWf4ykb1XY3HPhzyryB+q9\nRrtjv8oQwR4ZaN46B0SebLSNVlu96tMnq/E4Wh6yDJSPM76ohILxLNFOW1Am\nutmqlcndqAC1Tyvk+gOYSp9xC3M7z/aeDz5DiFRow8bUwkfchQGwUNl/F7b+\nrJt9mhEJp1J4dHIgtHVdNNuq52/NHX41oJ5Qz3hNJtyeTTQ+IawryDraj9+W\nvj4MG0ag6G+Jalho67q/HHiNcnqXloxVKhh0fy/MwLv1M7MmmcqCC8UHrFxz\n2anxyu8XnwhdOi09r0gV41auRH/DRNo64NVZeguvBuDvyD8e5yAIRDGuLRS+\nZpTwhi6U89/WmkYu8cXCbkb5DGJZGIPd+BHke48n/u413PnLzOoMd0AzVlB+\nsVyUWm+jMsCiZFQ9XIFpo32WIAh7EfvD3UDfMbhFy6wVLB/AdMkackBj+y+I\nqJVk\r\n=C81R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-7142b3e-1626942125284_1626942180961_0.3543645269671636","host":"s3://npm-registry-packages"}},"1.1.2-canary-298df1f-1626942588853":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-298df1f-1626942588853","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-298df1f-1626942588853","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"04a95f8daebb68b239f17c2e38da58d93c6c7301","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-298df1f-1626942588853.tgz","fileCount":7,"integrity":"sha512-mQ5GFTmzxCrzdOmuNMZVgdxFzfOcfOarSCpmNAOPx4PHsVPLKRurXkZF7bAk6ge0QKVAalqchUFoHMwJ6XgceQ==","signatures":[{"sig":"MEQCICDg9IK5EwkU9uQNiSTyNNk+9/Ueb+jVSTD2T6X/VT6UAiAegIETfhigJCvJyhCt3WMM+f856aJeZrvHJGMoZRdxWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+SyqCRA9TVsSAnZWagAAAR8P/j7Fk1U5CxgWbIH6INMd\nZoEqF6BLGGhJe5YN+lR6yG0F6Dg128u2c4yqfr1rEx6Pz79NDYJ5Q/81Jywm\n3zu8uh0CjmxP7oqgF4pqEfwaeuncaxph1o73dNjk4/Nl2f7/i+wvvoC+Vt1l\n5rTy2ObA9fL6UX2pcbUhtifm3+epYlJCIfyXOWJKUyJuzGLv7yE7mCER3hSc\nHPo8eS+I27k0b6A7OlXxHL8KHjMjKzlZuIMJEnHCd2GyuKuq4YDQbXC3vLh5\nE42BbcuhGJvKDeLfzGFQJhR1qezB50yUJjnTPAVI3wZKHCc9KuvS0gsauYRu\nD114ZXzJj83L9JHCu/CXgLh3uyUzSwvQiHzbWwpvXpAnt1QUQ5cNn38gvTLT\nRGgyW+lPsMc3FFg5x+EHI6IHft6wogdQfq4mw2MFxIjEzRP3bncwoYE1fx9F\n9JWsAuyjpXP2SZ2vPzx6n4+X1HJRj4YF+Wpsi13hD9owtgBlV4SrINW9/N41\nY4dvCEXVooNvkM2U7jqhe/vQ1HIN9JIDToiBoTI5BC2e98/373Tu5uLVxdAI\n5qCWM5Q/hKDh7QfdWPj9l4o6dRgpFqTnlSbD//JMqMkEcQIGTBS+YqI87V50\nie9JTqBTdlcsaUb0BSSgV9O++yxMRepmeHfS7bfNnaYQAkJ3x9Qwl8IFxar9\nqUaV\r\n=diXe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-298df1f-1626942588853_1626942633984_0.6917067791743108","host":"s3://npm-registry-packages"}},"1.1.2-canary-39a7cc7-1627265038188":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-39a7cc7-1627265038188","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-39a7cc7-1627265038188","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ce776e8a6bb1c08e35bb3b8c06770b024e6eee04","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-39a7cc7-1627265038188.tgz","fileCount":7,"integrity":"sha512-sB1QbAEev5g/EV3GCQhCSDDd4fD5hC/WfoYHJDABrFrRrlCanF4lm3CL7Q7XeT0hb97PFVqxSgyUTlW6ASX1nw==","signatures":[{"sig":"MEUCIQC34WRgpkuwZIG6Y+OtYlaAnYRtuAUXjtVSZzDpG9lIugIgcWXYW0tmtxFtgFMhk2+i7fhCFo/pALaLzYf6qOeWLxw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/hhDCRA9TVsSAnZWagAAPKkP/3TPrLSPGuV1Pb23Cf0y\n6bMzvOz8KruU1vG3OnhHGj4cxGfR47SggVrKWqDjoseN4KTu4iyFlB0UL0b3\nAi8sWmpo3BnNw52b1ID/HztSlMRHVOdjC+ak+TeWNEG7oRkYHhOWf+d4MyNV\nYG43M/V/QO7+0+reNC1Awqu028ny8gwRmoAEaKl0chfMObqTzWHMdWCRn3+t\nfeTKcerJDsAFKZPsbV9NCflt/80Tz59kCVOZf+9iWoEzS2DSpenYxaZ4DeB8\ntDa2zQkLPqT6QYr6mBUhvwW3z4zFkBSm5fIHRq9z3iOnMHk4xf7FMkrSPL0L\nUF0Aq39zRQzHkATtX8cnJ7KyKQyKfcta+UbqgljO1qE4EPsLjv1F27akwWp2\nrrBin03f4v2DqiZkF3B4ddsC63bpF30D+S0Xmq3hbS66EaEUCQMCYFwovvpe\n9hDXY8gkqFvsSery66ugygb7ceWWm12IGqilTrXcbObt0vwoR/Nmg2fqJGoE\nSY7HTrZN/f89Bbeu37ncmbNqO3DQrowWaM1hEnICQKtI2BAnXjYXeQwLMiWC\nx4rL4Elq8U0SGumiRhuSJ0wUwAATRCgZ/C9j4o22jqFboUYHkufpQa+w04OA\nv910IuomRwseTG1dJ7JmBeUlx6TLbIWrZ1TzQz7kuSy6GV7EtR8pZi+4sRAy\nfFkY\r\n=7jd0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-39a7cc7-1627265038188_1627265091170_0.33774819356158936","host":"s3://npm-registry-packages"}},"1.1.2-canary-39a7cc7-1627265041495":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-39a7cc7-1627265041495","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-39a7cc7-1627265041495","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1a47cfebdd6d05427bdd1263075044beb3516fef","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-39a7cc7-1627265041495.tgz","fileCount":7,"integrity":"sha512-2aK3v93r4yetunJqoCiFbiIHNY1api+wVkKnqJJ9LqXidiKwEE6Tezk8B/9YHYDGoOHnmjBj7DznYrvQQFSPGw==","signatures":[{"sig":"MEYCIQDgehAXbXbN9b8m5byZj+nZyu38jvaPM4fLkrhqPaA8HQIhAKhHiK9phb2i4bvnTYFJlSOkFWIkrLJVcA2CHC7ZJgBI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/hhMCRA9TVsSAnZWagAAVogQAJqyCkbpenqXEI7JBPEq\nvzoVL/8GwgFYnFzrTpZiKdcV/S9CklCaBIlhGzkKpqgNO0pvjveHz2yP36t4\nwVP0SVoASZW8t7Zk0E2pUij3kjEZCYwY2IozyNVEW07GNkp1r/nFJ6VfpbK6\nwIpFk4YmTRBlWdcEDc4M7Mvpb5W3yKF5zmtrzFwf5/jYsRwDfDOE/tdzE2/8\nvTJhFul1AzL1VsuYTBvVsENlc+Gt0ugsw/quAZQ6MS1tzp4HC8hEakeuZZr8\nV6y+6dGXSAJRY1dsnQ8vog4fa7Q9ZX8Jf5ItJB6OEAs4yI5u0O3TsHjkc/4E\nhkV9jalSc+kWLO0cwZbYHLCLTObW2UtEsrojHcPaJZmYi9l34kVdKWlEAyij\nRNXT+hHf4CoSxU1FOD+5SMzEkJywFa8Q8yRN4Xvh5Xf/BmG3MlW1R+A8KBJB\nyMB3B1V7m2VeDlZhO1sUAf1yNLIbq7JXce/8htAwSJMix2/rdLLG4wKBZbbd\ntQsXjDnYljEIU1VLaspyQjKZvPRQ6sdClmRp0h16aX7KMBaZWUWX09H0IGJC\nn5Zn1S0Fo/EaZ7E711cJXzKx5j5xKb4CBev3+UIkFyZ57JvJ6bCKLSSYRERU\ny4u7+3b/EwZw2Lgjyp0WAYsMckZWJeefm6gvWLcDE+mq2Rc557lIMqpHhGQl\nPLq4\r\n=0Opi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-39a7cc7-1627265041495_1627265099942_0.6451443622349395","host":"s3://npm-registry-packages"}},"1.1.2-canary-39a7cc7-1627265050993":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-39a7cc7-1627265050993","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-39a7cc7-1627265050993","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6f49462c07e27af7eed0c4eb41a1251113d7faec","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-39a7cc7-1627265050993.tgz","fileCount":7,"integrity":"sha512-97IPxVTyztDnt6Q8sng+FYXkRsE7fwnts0ZLGot2TmddKze+F+uhVgDJtkI8kGbEskIJZn74Kd/ijh/lEBDpqQ==","signatures":[{"sig":"MEUCIQCJGlmcBr09g4fK9S74ipug1jbQxTN0c1588H6E8Dm9+wIgaEuqb5p9qnKinO8d2vYAeEBf6xW5xkW46sB4+9teDdI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/hhTCRA9TVsSAnZWagAA7dsP/0toGhJp3PPn6N1OOaQI\nwv/pjyvO1OJMuoRsPxJArjMy2RAx2HlSB6fbEEFd/TATntHrzwmW5HvRF9EV\n9ESlOPNDDzwUAbvQwu0tF7/kN4dou2oAEc47d76U+ClPjiY++LM2BCWiApEZ\neZnlCfhcM2YT3ro+AmaN7iStqOBpnH6EL7/za2mMV0sk5FdgvrSPrv+Un5lY\nQ6DGGr5/FgyNcZMnBVVk3j2kzUOU4/dlYJJ5f1qeZ5ClT+gkwpJRskUIAJjb\nnA8XJyj+CrRlAR8klYFqQHlag1uSDxzoWxZgTei4AcIpp2cUazntLoKTxK4m\nGWEryjZZ6xOucToZ/hPP3DvdobyGSdomjh2jQTz5YZZIeekaAFX1V5jTKzrP\nd76qDnQ7i9ps3CP5VKdNesceY3BSASMNRn+LBwSCp9u7taZUTtY7A55MKTsR\nbYZ/QjIhefCjc4pXYHdzhXUt9hsYHMHuqKKKf+fBPgnO8z9W9eug930C8N28\nby95d9YoiXdLNyWqNMylwp/8mWk4tRT+soXwXrBsM/FCjoli48+GE+RhvtWY\n69W27YvCJx92CWAsl3iM/LNUhi6JvNF0sHFqWMytpSdE6eK/YN/iSU4eI9h8\nOQwYy0Bb7ThNXMoT73yNntNhM+pgu8IH2IH13Dnnd8/3cUUHfBmri5oFQ4am\nqSqu\r\n=Hs4w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-39a7cc7-1627265050993_1627265107696_0.8386166300693123","host":"s3://npm-registry-packages"}},"1.1.2-canary-c54119f-1627287728287":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c54119f-1627287728287","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c54119f-1627287728287","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2967e0978abea856dbb3cd0d9260671226988111","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c54119f-1627287728287.tgz","fileCount":7,"integrity":"sha512-XC4KpJSgqx0WaYLEmPgxB597n0kPZX1b6ov3uh+PwUdxJcZdb/j/X/kYFrMKLwiMLCTEp+9vQtLgCgfyvFxTOg==","signatures":[{"sig":"MEUCIQCEDIKPuWvaJorEjAvUKb0t6bLBoNGH5toRufcd4tX+GQIgMSovIFYH2OHge2Te25aJ08AqbAvXntafGS+00HMbffQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/nDlCRA9TVsSAnZWagAAoZsQAJOVX9ruA7cgL44clwna\nOWWBytw1gDAJfxBlkMroVYXioAbpK3EoWfQ8hDWqn9MDGDwZXklYfCspWvR6\nJA7nDveKt2zSTS5SguFCfnPmcGUqffTMboO8CF4l+YcFsSPWqRejNbTkG8gV\nAGmtVXgBsNmReWc84lzDDa9LD40NPBZjuviDA103i913AG03fUDf+Kqh6W/S\n2g49zMLnjatEItZ4vVCDbnUXg6FlPCJo/H0TqVwZ8m/k/3AgbP5JQNeR6oRH\na+Y4u1iI+sJ7Ek2emyCYyeJy2CnlmL+t0l0R9C3lkxMpzJhPJ1gPfkDKO+AI\n7l9sbgHwx0PUS4EDhHEyWfvbUbY6CkOK0bfN/Y12UVgG3FVrnOoS4go67yzw\nzCEOVaY6qikrDJt4VIB/tjXgmljIsttp0WNUHn9pLwiai72P8Zj3Y9TCN1qu\nnH3AzxHIDJb+syJp9HmO1qQXwTSEphy6C92JVTcKZVN6EVqYSHw4sSr9+F73\nUzMEsSpEd9w3aqbSXc8jrMAZtc91PGCIcmh+sMYmpXyxWY95klOGi6c+HjDQ\nV85P4m/eFlszZeLagxcGjaCFxp6svjXGJcxkNmCjIoy+DUtcZU5z23LWnx+c\nSrvrB7VGUzSFGHFE5CV1YXHUQRUxNoxYpaZBWzWUbraW2iX36YbnMqCxNwvW\nr37L\r\n=zLVi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c54119f-1627287728287_1627287781783_0.8859388400204233","host":"s3://npm-registry-packages"}},"1.1.2-canary-c54119f-1627287732725":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c54119f-1627287732725","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c54119f-1627287732725","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"30ad49d1b3c46386551412e9d7ab66e428207262","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c54119f-1627287732725.tgz","fileCount":7,"integrity":"sha512-eVrnLDcfAFHqkTgKAGcgHf/Did88dpARItIt9ShrkFqvs46zjOsQHXjv1UL59Pk3RzOdKG0Vjg8MMzzVWR+UGg==","signatures":[{"sig":"MEUCIQDm+6Te36voTn7e5jwINYg5GkNxFaJyJvgZKrEr23nlPAIgLhv+u7hm65xREc+b2SrPbQ0ZTU2+/CGq7lMXndGgqaM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/nDtCRA9TVsSAnZWagAA5CAP/3xYdEX5qDSso1Lmfmcc\nqo/c4UJw98xEcHRTXxOY2CQ2t/98Bix7740gjXCuJKXEx+yMosNcchI7otGR\nvz7JRTPOPWsq83ZDlJH6LoOoPGoxxGrXxb97pj5qp+jklAUSmrkebreTDd++\n06yFFQg6qm9UPo7UtdVWJx3Czd1QppVeOhdrArZmBKGvtUCHjCnPXRJeqFRB\nledHJ5uRIGJdR3mfU1Z8T5SCYIMbn0b3BKaK4WkJZ7Segb5v8lW9JnbWiQP1\nqjXkbCtm4PenimuAkQxO/ii3DIPkgQB6dndyNkdmKJo/YF0Cum7Yg0nWZOf4\n3M2rCc8rfO1/gSjXa5B7X8MpaN308xE2D3wbnC85IGWpZW154KXosydmbznb\n5RgyWUFFuOiiYI3nni1xro4GWvgL3+k0ATXT0ubzuzUOZuEEtDGYBMPP6LPK\nAYOiVGfetK4/4MmAiV7LBLw/FDvDeYL58BXQE8TSm7qdGt4o5zf9Ck8Mkurp\nK09CEqwjS3Ht/E9ksas5ThFe963DsbLMG+iNsAunwQ77aFTuoPw2v1WvjhNR\nwoxsKbuMRc4KuXa07HUqb0Te3x98/Cy/jZedKBpex7/3CssI83tWn39W9JhR\nMSee9CFDdPJOl3tmm2kqgSG/z/Yn9faDquDgTHwY4axaFjYjTSRNKiXljnaj\npZFg\r\n=F8T0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c54119f-1627287732725_1627287789548_0.3602317708042284","host":"s3://npm-registry-packages"}},"1.1.2-canary-c1f0c3c-1627292744352":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c1f0c3c-1627292744352","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c1f0c3c-1627292744352","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b68a92631fc4a0e868246d24775b16182512167a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c1f0c3c-1627292744352.tgz","fileCount":7,"integrity":"sha512-vaOAa1mtF3hewqKJhLZ3FGjMit9wh2HK71ViItjARQk2a6py+pRcGUcOeH+f+PS1SpfKbB1WIHPf7FBS2W169Q==","signatures":[{"sig":"MEYCIQDy/EVAUjkvXGZGR9JtwZJ/eStImqPM9LDod3IGInXDFgIhALW+5PPgfOImIkNHu2lAHl/R5fFLGyMlx0POzypQRnj0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/oTBCRA9TVsSAnZWagAAGeUP/1Nt2wIJlxYn5zzjMJWC\nnUyX/BcfCj9tjG32uq9oUMjDTHx8LZHMI+uGG40HavBxY6KbrIG4Hf2aMXaI\nfqBaQo07hljXVxvfMNAwGZInVj/03+oSgQ7dMaVk1nLXPjhmSBYX9+eSBXEP\nLq4eAqv4TVl99ffLSdrzygaGjv6OtfEhRzHIHKRR6HrnmG0zJFL+ZMl5kRZJ\ne9C3I6H7fPFnUlvwcaa3lJbK3ILGRr7bruEWMayRj2piGZ9ZaZvgJjIRqiLW\nRHA9741blzaqWLlpfa586punx7mFLca4PEm1FoHFNXyPlEnpqxwmkCzO+r6A\nsR0ShzAQh72D5/njkDIyBF0RbiyRgQrZW5O0xseobOeeYbUNEp7mZRrd5Nxc\nKIxSYxGmQPbzyzqhAx7EqdvGXaUQKwsOB7VF6CLjpy11NWyoTmmNldVEsy8c\nfQX4H+6dlReed52VI/KsCxxaiAJAh/IrVcAR+O16RF/O2t2gBkFYjJFvzfyw\nG+4YXgLyrRGwLeabm+Xtqx2rF1t3j8/bfyPHS61LcwGewcofH9489jICvZqI\nbzHlAAbj4J+IsweNG8XhRKSmn57aPu+x/aWnPmNagjy8R28OdYwnylYj3p/g\nMqO5qkfpvbRCyrbweYWk0RWeMffI5d/KN+GPV1TIk/5wQ8/epT827B2203Xk\nik5d\r\n=tdUB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c1f0c3c-1627292744352_1627292865774_0.6676956359788069","host":"s3://npm-registry-packages"}},"1.1.2-canary-c1f0c3c-1627292757238":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-c1f0c3c-1627292757238","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-c1f0c3c-1627292757238","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fe9a8d9f54e58d6c25ef0bd67469828c75d5286f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-c1f0c3c-1627292757238.tgz","fileCount":7,"integrity":"sha512-03Eumx8IbrhfBvyl6Zq7K8fHhrt6q+IJI9AO4jcjpKmwUEbZw+sPrAXIJC6VEjUQ999GuPkn+U/YwFyqufGLMw==","signatures":[{"sig":"MEUCIFWLx7jQPNJPqRk3XgWkfcrLO3v9tQdIkt3RcRJ94lHpAiEAg1he5OPECUmabd/SmuNZz/2xfr7eQpCH/dasu4pVzqE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/oTICRA9TVsSAnZWagAAwK8P/3vrYI8mGqsJDq6KRkAh\nmSfpP24rq6JDELS1emIERkk/dfeCIugokIbWY8ALm4LlRQPrm5bM073I2bgL\n5Ank/3XmvPbBglK097sanXfLSt82XCsnEjcxHZWD0/cQh3+ui5jQzrALYkrj\n6i0TJeh2RTxJsU7uFaN1/PQAxAtN2hOxjbMnVl8noOj7JMX0zOdWhrHKb2Ll\nhvW0Hgq7whxla5rr5v8BQIgaKLThF2ag1UUB9HLkpKCgDAnPDxhg5v/ElZLd\naH+pSTcrjrWFrOByyszZCqKx2y0Ev9jVKdzsmdpchzlI5NQs88GcObcQHFXY\nEK9bNm3IasNgsCoMGvGRJB6nKCYav0LFvH2lXK6wbVKgp30uTYMIA02IVLk1\n+YJpLGGPXNZ/Vo/UXmapxrkj1HlScTDB6QD6Kyv8kJJ3yDHhsmwFaJZfUkFA\nEA+2NFP4KIH7AySN5JIY6sU6HsnXlujzaiYWCuVMxVUV3YTajDhjcZMbqlcE\nLJj/BlDjSy3BN3JrCz5XtgAEpDU6WRTZtoRKXGI53oXPaMhT3rEEdcY0ZWYL\nNwchpAjxdXv44pjh/JV0wBxQA/T8Xnputi2svYku6JB31WttSeNXSrXIbWcB\ndzjQitNtQwXvuEiKdesIeUXQKHOore6UoFAWpXxUoIpCnZEQ/6lfycR4pRDJ\nBh0m\r\n=OTGQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-c1f0c3c-1627292757238_1627292871827_0.7147998336665873","host":"s3://npm-registry-packages"}},"1.1.2-canary-0a67cb5-1627292906558":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-0a67cb5-1627292906558","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-0a67cb5-1627292906558","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"af7d6f9f733afc66d4e3768584b2cc7f0dfc5142","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-0a67cb5-1627292906558.tgz","fileCount":7,"integrity":"sha512-OuhfIGhy4m7V8T2hlRxXwEL8BMTMZPFcnmCHGs+/gpW0bngvkn+q/rGcFsFqq9vKjVyVGPJkDOlBvTV4caFMug==","signatures":[{"sig":"MEQCIFAgBAwG1vshH+JeWoUTbOZy1XxW2vjS7s97qm9D5MmmAiAdEEKU/eJjTqhVKYbbeteqgzRMDWz5iWwq7J9mUGNYMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/oWICRA9TVsSAnZWagAAOksP+QHOvGeEGepQ5puqSYpE\ni0vQ0nMpk5uK820CMAAcvSvIhmBKiduPg9B1IpOWMYb7JDBBfZC5qLm0zK4V\nuwYR30KQz8pNS+IeFbwxOdSMdhBQ/4EMgFbbTCMp9WZT9DmzOYcFlPUsrJJI\nxx9D4O7uQkYikZ5Ikv1dc/9JDMY7P1s5wj1U12iER1jsWZa5Bo25oSaZYq4o\nM7tgjrqRvwKcw+g4Vc3uitqpOJEuF72UjBWi7c2HL9aguJpb5VTG1nNidSjG\nX2KQmo2cYT3RnijcU++9lfpuxnC7WOrTDMbqeMMvmDcilv+/bWQ1j4I2JvzL\nDyz1reDWQSxCqf6JkPJfMDYfgRdfLK4itSpm5L5cm+ufYKE4h1NuykW9uRlL\n5a75axEAnSxLzhzefL0KGoRIemN3mUEQ6qoake/uLAlJfEvkf9B4D1UgkzNc\nIpESoAzF1EnfYgTbs383NCddMwDj2bXAbRmTaoPdbfQkEoVEIMY4a3aEQZeN\nbg8nahJ0Jo4KEAgjsW+61lrrDF80QqbjrkO79Upm/CNFtSCaM444bnx2JWyW\nQV0sbtCngVC00txokNfh3ptYcGwBKT5Mw4GeRvCyO3uH83aggrJxkTIkZgb0\nGUG2f1nF/fvxmAMD/yFApeJzmnpltis4P9KV/fs3cnZPXSpEEy5bBW3To0Pt\nPA0A\r\n=hIjU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-0a67cb5-1627292906558_1627293064772_0.804190956520394","host":"s3://npm-registry-packages"}},"1.1.2-canary-0a67cb5-1627292933717":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-0a67cb5-1627292933717","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-0a67cb5-1627292933717","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9649fdb3404a1915af524867473a403b775e1dbc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-0a67cb5-1627292933717.tgz","fileCount":7,"integrity":"sha512-J8ON7zeouMWQThD5K1Hm/Dw8XlqiLrBRKb4UfwqVXw6dC9OU8irbNT1S7vTZhjAh8sGloPDfXzK9cyvQqlhPRw==","signatures":[{"sig":"MEYCIQC9M8ByuxPhL/n7P4z7ZAYiXmjbUetlpJvQ0V9zThGSZQIhAJ6srfAaeFhRRCpuiXv7bT5R8es4qM/7d6BuGsKxtrb6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/oWWCRA9TVsSAnZWagAAhKYP/1th6zibVt46bjRxbjoM\nAi/cg9LkpjqXpsZH3Ldz7gr/zEJXmKIkx1b1Rs/+hF07cq8THKiaFXTo4RZe\nmMUtNdhUUlC+1OKkpWlWDLQ0OiketYvymTIZUOcHYN/+25MinkFAgpUfGRBA\n2w8V7ZwunCmZFZ1tsexaSu8unSvN68FJjRO4RAMwwGO1eQggTgbz/ztgNH7h\n/9iXAr5ZimsDzm9xKwE7pjVpl0xb4MZWqIJWKu4YZDyzcQA2/lbcB84G2hVJ\nOShGUsquu70yqo+aoxBuRr/JeoGQe6RlZuEbEfRz9/8Q2zyisajHnPXxG7Ty\n2wGEhAEEBkw8J7IgN8I/8rWbNKtbtd+SQkjXPppb24BfsA5xtjT5NazL2BKc\n8iPV/1wFHm26UEvzgd6zxXods4qDuTb4LoniATiNoJ4t7LnMN1D42BO11hR5\neE29H/jsdFy2oDMy5fKj/SfkCFPzxpa4mYxNYclFdQIqg9xJyJOOmU32HR7y\npAVztEy9Z4+3yZWdxHd379vKQfI8XnVkXJcx5J/MMp77srym/90VRI6kRKPL\ni777h7t1gcxABjz3rBTgXVmOX9S62rggsPgOaMQU82tHTSJuyFiRgZBvwp+9\nzi9FtQPkVQ3+Zsg50n8/dMbuAzHmB9s5fOtNx4eV+QQBjxH8g8kA/f8RgH3N\nhWBk\r\n=HR1T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-0a67cb5-1627292933717_1627293078038_0.41380761638366637","host":"s3://npm-registry-packages"}},"1.1.2-canary-f029377-1627293412099":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f029377-1627293412099","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f029377-1627293412099","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3c79dc30fcc5cee89bf4b185798a8ea6d7b03c96","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f029377-1627293412099.tgz","fileCount":7,"integrity":"sha512-GIvjlwLpkOHjqT8XqzzK1PuM0yQSeRYHL/TwQSAv7IrVQr7sgLtxXzkLS99F7ZWjLuzK3TMjvwu2ntvDtBhtgA==","signatures":[{"sig":"MEUCIQC9iRy60yzQztienWwKzHjJH9+DPWLAl9YrG87KHRVWnQIgMANuIE2Q2xO2EchcqXMzAzVEgiARDdlrFE3ZV5d/u+U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/oc3CRA9TVsSAnZWagAAhG0P/0OwtseymVmtXBQ7G1cs\nzaZM5loUb4U1lifQsX96dlULZ2SDhe9GP1hczPjSvvGqIlWxygruLLEifr5Y\nNUoLDJaImMjbLGsX3joPk24cItUqYFOzlgUAI5/ABGgUiF213uq+cBdXfJBv\nCBgtIlJ3TuFQsUm7n9NZi/m0h5cbuzlweFeZw5ooB1hVmyYa/9vE8jpqTKos\n56duXoLjKK59yBqjUJEp86MtriRGRWNYeDfk0QbDK0I+gZTPctRSbZ2NWu/B\nZSD8Mplu1h8bOOHkSN2FUzR9wJg4QAOTrSnwR0kYX3YtFhre6XuqTVNfh4nU\nLFSn/aSKwqnlPQQw1XUtkcCfTvTcrDMpv5GXDlx6SRBMJIrsOVqKzZHxlweE\nIMWLtxJup5qzfYGeQaEngMEMovby/KwptEum1/7j3pgdwc196GOdNbUJydec\nt/BcT7nYYj549N0GZ+CoOwzEEXgb1HBRFAn0zVwUV9QWPZCBWDS3MSdFRcJX\nC5x2W8I1Kn6LfBYSTjHbNcp3h2A2w/Pkr9qL6Ky8tiKq5ywBPN9ZKvpgM8ds\nx/l4gqsWQxJ/1vyQPuLWuzd8zT/ltWviqWC6VU8icMCkvXK+vrG2OahZfsQf\ny10fBzMb03YLekWBsLXNF154falnfMZnTUnkSZHsrMYk4/WQR38n2BDKHgrG\nmAce\r\n=Y/n4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f029377-1627293412099_1627293495388_0.19530988377379632","host":"s3://npm-registry-packages"}},"1.1.2-canary-38417c7-1627351472085":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-38417c7-1627351472085","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-38417c7-1627351472085","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"be65a0c58413736f18a10286f894f27956123c5d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-38417c7-1627351472085.tgz","fileCount":7,"integrity":"sha512-GK1/Pk9XB74T8zKffwKRIQTt7miviaKWdGtmsvEBEVXwrpsHIN7mNynPltAmNZt/ZjHWQUZH16VulUxQZl/v3w==","signatures":[{"sig":"MEYCIQD9ArEYkLJDnlEJvRJTDiyEZ/ThTi3sYBq560qTvxIJMwIhALvdN89Fz79LIdSye/2LNPWmqS9uBqD6JWhwL6tE0WGW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/2njCRA9TVsSAnZWagAAXw8QAKCildSZvgwqm6nLTD+k\nUm700LfaThwJuceUqjx6/4Glt0TWEftAz+GPtjEzMTNvSVnBAlJTXkWxkK6d\noB1eqQTq6zIR94U07VVqnqouS3o5kY57OTolwHk6zXc/psScNB8FQONPb0gW\nCeXEEhJ+cB0aRrE97sOnIzyWB7/DTO+SPmzFVt+2+ux2Gno6sGOngN0S28/5\ny2N9ul87yp8Mh8KY5PMvBOxaWcbt2xoQ53MXyjm1eioPW1u+5AHLAGDqXyYl\nPsD/lsah6rAKJPj1FcnXOXtvZ/Anh9qfyIe5HPQUaR17D09v64i4lJQc39yt\nS04T3I5G6+2fHk57V6l7xDSqpDwufrIoMWKCoHdTcvG2u0nHcK64vFltrWQA\navOyXcaQVraJVPP1+QcXFux1L9suXL9FpD7s6v6LCv1qZLvjGAfLZeHfPMaW\nubE+oaqfjtQdjoq2gDPFaxvp0KtB3HURks2mW+X/CvLauiJJNDj7U4shDagi\ns3aOf+m07nyz5jfnlbA3+mjnSTsxPHZND6+Oa79GJA6gjPRTAnDaM9H++gFd\nIjb6DSc7gOWWAfMOD/7IQpVyU++Zbo8MCDyACSSQgPih6Rf5xJwhVObSHGeR\nYLVYP7s2P4MSrAdbP8xruq2msPOqhazCt4u2yEI8C4MRxKw1ifqtA+273Xx6\nlxte\r\n=PVgs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-38417c7-1627351472085_1627351523464_0.4314791212818321","host":"s3://npm-registry-packages"}},"1.1.2-canary-38417c7-1627351491643":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-38417c7-1627351491643","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-38417c7-1627351491643","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0c3cc9120d002c89f9bda461a31782a3548eff3a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-38417c7-1627351491643.tgz","fileCount":7,"integrity":"sha512-+mD3jRKp7qG9ZHmUs7aHD31cKsWG7uoU6XrCQJSpvzL69hIXT+2oBrOYPtlSpLGUCQuljyVfpi/vseYlWdAvYA==","signatures":[{"sig":"MEQCIFp2z9vdUT/g4wB+aMn7D6YrZYtPQvx+EDJFwaAug5i5AiB1yBP+zldWQgyNk1uWk2HiD/qYJ3GjnVSD83sHPUD0wg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/2nxCRA9TVsSAnZWagAAbF4QAIdqUxxYMZN9E16K+yzN\nht8JpCooS61RYsWcvvKO3wsOY1ZLs2WZj++AYowzZbVFTek5q6m6rCbrAtdB\n6SlDbKGea2rT7soVKjplU11/fTRdYPwZT1ikjinbUDn0nQKVfKO69onnWvxD\n97221tFWHEHdZJexiMynRu4bLmBbMwRCQBFL/CzXZovx6PXKE7T0hurbGXH5\nfq8LFVCVCuxcvtOQX5dL+jqklbrRAOclrPg349LwgcYidBcdgc6kp9sPO1Yo\nIF5SG+JQomKcub3X4AFN2U61nwrdJAa4LOKejoPwMs0BZ4xcNzNbruvFfEMN\nC/Dnm+l5uCciLhBT7UYLWa/wx064HENOIvVf8M75s61u16SAj0VQvkHj5lMk\nexHNC0fS5s1UdpMls9st+DNlKtrRlzbbrjxrAlPwEVp3shwTgg5EIVPd+8LP\nYtH0caT4R4id3YoasFM758mHq1TMkg9p8P9Y5OeZZo3JmkaZ1T/hP69ZsiTZ\nJg6RBb489tPyevMUjoeIe8eq9HdXTj6UnsQ45OOxCNG9HEhK9jIzhATFAhoo\n5z0suoCehbOmgHBvEx1CsMqesWR6P7HX6YYplRBCCOvqGydDER5X5AlFbdw9\nO/S3Ddbcq50iEB3lMwF9DYsWZnYhqmyuUHp+7EYoVSNfBFbp1aRUOfg8iZJj\nTSuh\r\n=o+Ie\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-38417c7-1627351491643_1627351537792_0.291542574149114","host":"s3://npm-registry-packages"}},"1.1.2-canary-38417c7-1627351485106":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-38417c7-1627351485106","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-38417c7-1627351485106","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d6b07d9ab5bbf2f947be994a50a5fb20df707fcf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-38417c7-1627351485106.tgz","fileCount":7,"integrity":"sha512-AVQc72LjNfLN3IJJWxmZ8MSUGFRALdO09EK63YAs2gJrTVteZxpih4/SK57n0YS+IH1POSon1qtbMjU0eYvxWw==","signatures":[{"sig":"MEQCIBHvl3wsbOVEMZXxpUE4+0xamaPSKAvwmoZrK/Y4DlyOAiAjPHMvsbCGfWgKf96vuk4yzkTGeXjKwS1PL0UzJ51bqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/2n9CRA9TVsSAnZWagAAFWgP/iGS2p9mlVQXYFwIf8hF\nX3zYgO0Tum0TLv0daqgll3GLBc/8sNa8XAq3gjJ6kalkK5yTykAYBBN3H5ao\nJKYmjmOAE3GivLwuZr7OYyPNpJ5Le+630pxc5tZkWj7AnXqcig99nYeJyFWi\nBhcSHpo3n/AfteBgypC9fOR1igrFGlHnRsogHTwQ9ZAVHgQhiGKLjY9/haZe\nUDGtE90XtYuiDBcdfboznLt3YBEAXto6Dt7YrmrvhlYGNHQVB+UzxKGNP551\nlgTiITVEUhOBBps6DpH7EJiYVEROdUwpiYqPW2KUFd46paq+jKmxPixmlV4G\nR1ir6EZ0hpk2pophjuSz1tBKq9a6ubvQumMqhlO8V7bC29NSWCl4iutLhG9a\nDtVaFn1z+vHB7HE7mi98tyAxHDgXVEHChbrsnLy+EvJ6UnLf1OCWqhdj8cQs\nTLzOdOavASiaETKY93Pk9LwtF2tImYz4BwstmniDXCSEhjBkJnuf8he/amw5\ndbAjFx+agJhYn2cDq/66lDAHKzrCtWlQl6eqfb4pqurtmsp8OPyT/4JDn1+n\nR54JHdFqEPGmIHXvAhK6eIJUT8Ul10J8VduDhC2GK54srihwd70NuyOd9n6u\nj3WYIIhf5/TZ0z0UQkLmF/oNQCeBSZmQjpOOM9uv8wQSw3q5yRoWuWDwiphv\n+eTt\r\n=/VZt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-38417c7-1627351485106_1627351548844_0.21785749391085885","host":"s3://npm-registry-packages"}},"1.1.2-canary-38417c7-1627351481689":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-38417c7-1627351481689","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-38417c7-1627351481689","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5a931e59f26307bdfd38fdf9718a83066b6c67d7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-38417c7-1627351481689.tgz","fileCount":7,"integrity":"sha512-qz+a7zHI4kv7a32v6UM0+oFr6m4UIXioSl2VdOYVcN221z1EahFxAziRrlm9Vdgc31ZAoTtDlYOEL2U7oMy21g==","signatures":[{"sig":"MEYCIQD/MafI1ctLO4FdfJwz0Z29/IBIbL0E32xBglScqq+oFQIhAL7y+TLi969en8M4tgKA4+bNviqFmoChauXEFTTpx93Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/2oJCRA9TVsSAnZWagAAyWsP+we4ytDuj1NkDVJZuNdR\nGVx1OaTIUgz+hMct+RMTESmB4dgAIgGiRFshkwCXGdmAGpgVoESIK9NER9yj\nolO2FF8/LeXmPcy4u/rX3Nwc6qC3DHqRIY5FkaeQUgSY73ZmehJnPDbpPiPJ\nhP4l1f8EYd8zHqJYVZeIZweBzwkoSC7amS7Tz3sX4+JMFOLWLP5VKhhwr6g0\nR0EpB0s+rAdIKycjW033xughTK9ZdASEy/sSQc50X+PXVeMYQpj+r2mwZH9J\nKIAuCPSY8QvhFNESTKa8KArIaz77jRAt9GnfZVMZKUQklQ7do3aqy4dRFGYt\nBYcjYyFo/EEY/6YA1n+GYBmqzoFdIwYAuon38f84ItXMfaItoH3uLW+TDo65\nr8+SC1v54c35KdzMcVXwtYDScms8tc+ZRv+BhwKAlotpP+nYoDNlXndD+kFU\nGhsSaASjLzZ8CL+GnDMG9zl9/j0E0egUDoKW9tyrbJLLjwbM89+hhUBcZssh\nkEknjfGzMdKasi0i3dNSxWSmOOrXVjLj15uOTGDqgjmHKUlA/+RLbYvEdpjD\nt7Tsjz3eH8+23jcmHzpILU4Ex981Of6yWZ5ej4wIhQN9Hvk/L1zJUllWMdVv\n0p4WnP93mhGj8Grc7NmCR9yB+/6s2A3NRs7Spy7epFxiqpMqnPEkDVTYVjfT\nsc1W\r\n=bz56\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-38417c7-1627351481689_1627351561613_0.814294635975725","host":"s3://npm-registry-packages"}},"1.1.2-canary-479d536-1627371652366":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-479d536-1627371652366","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-479d536-1627371652366","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"120cc7326fc88f025a37aebbd514139a91b2a2a3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-479d536-1627371652366.tgz","fileCount":7,"integrity":"sha512-mCUMhR6Of5V9sKQmHJfCqn3feOTOp2x9R8kj21mPozyvYpNflcNKrTSkpPMUZvY9gtbB8iu5MVcsHcO+CWgDhA==","signatures":[{"sig":"MEUCIQC0zAX6YV8AC3vFbMmetwOlu5EP5jKfXFf3rZvRmy2x+AIgUf+bPODxisafmx8e5XBXLgeVfAfSyuIb07q3svPctTw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/7i/CRA9TVsSAnZWagAAKggP/0MeICwiI0UEXBT2Qt78\n7JxrRCjRUYCK2aCKz40AKXY+AhkUK8z6IiZyzUGu9Yxoy0cJkBM+M5jvNsVd\nFkUkoiirwoF22X8Vc4LgaPmvKP0cBOy3bufMs/skhgsV6N0SGhjL7//ozYcl\nu4dxLPgV1ztpbDhaeAhKz/r+ivjkbAioW9TYIYI1vhJipuQrY7rx3OIDxylz\n/k+twgaHdOo8rEqsAk2tLbJlIn1bn4eGE92j6oqU97WmCnGlRPkK78ZfaLod\nct79OC8oXLbVJyZHZFsoK53l3khfWTl3o7KgbtQe9Aj1e8jdttW9j0uz+xss\nrNJF9tPdR+xVF0wWRYiNhHoq+0fQDESTzMAZVB7H2gXQUAzV4/Fafjp5qWAV\n8pvhJCi3BqoP+s/OtTJ8XV1gRkFmG9/Mue6IsKk9g89HH3If8ozTcA7dTUKx\nCO+yfIZs12wihTOQfPrm0xETR/PuuYypOPYiyw793mx883DEtihrD69q+qaF\nAq3pQLBQi0kL9azSzrS2bKDW8b/B+YAKYKGlZYbJMLwW6nAS1spenaJ95exa\nkvvtqs81jTuKOV+10hlLJ0N8qxkFrSjjcUAYbtLi9BePnzxNQ+pJiMEcUolx\nEpvTED2lO+GOENw0R1AhFs15a/CnpRTOc3PxiybzcSRMhGRXxgtRJyqmNar+\nleSZ\r\n=+Uok\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-479d536-1627371652366_1627371711532_0.6559520748470442","host":"s3://npm-registry-packages"}},"1.1.2-canary-479d536-1627371646727":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-479d536-1627371646727","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-479d536-1627371646727","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3cfbf0a81e2376d4b260e024611586bb40846e06","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-479d536-1627371646727.tgz","fileCount":7,"integrity":"sha512-X7+W4wGmzrHhFiKEzWKYTAcY5vWO+9DUicy/o32NAbc0947kgwQFmXI8l9L7OfNILkd33jnpGO/2b5QISGkmXg==","signatures":[{"sig":"MEUCIG+8jEO6/VhnfbrS6pJgJqBfU/GOTZ83IGLG7+Z5NJacAiEAgVXvK2PJ6ySuCEvz2WPGoeKmEs34OdMdATfwGv9mlCI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/7jyCRA9TVsSAnZWagAAVKwQAIYYIYhgq9NM5JINocsu\njiPOHza82kHnsvaHT1c3KKhE5dLm3dPsRVDF0fxX9o9OorUxlM5E2KCUXri2\nW3F0U2ZKz/hFDLnmflnzjJdlATiRzfAeC/hPKwRftnTcWi2VYgp1dfwvv+q1\nlJWIR4ApOYw51VLhGCBmfP8gwMs6LcOf1nbTw97p9yV3PJi/OdN0dbN4TEIW\nqSLIQE5MBW60dmQZKW/cneCkaq8qdqjGd005AIvY9c0baxXWtQ8ni2y4lhIB\nJ9pnranSKDpPSY2HPItyefAiocT4pj4pXi+/mA1eIZAHwwJudg7zPApHNsm8\nIREsLhomdP1BxCe7LrBgTgwUBh6NlKqG8XFlZrZ1omT/R8VIOHVy9ByRukQR\nNMz1AvGGi6ywQEHSWHolfd1bf0O3tKocSCua7zOFOvEMKsj7I0kdzrC0tRc6\nPAKA487Ox9d2bHRs0O6XdLgvmWkQaIqqVLVtG/5ckmivgPL26j1I85VvOT40\nBqN+PzuMqP4LOkUQAY2i2xfnBrroUpH8o8TWMA8erJUWVfZMh6c9YB6PSHNy\nA51gU22+/O3dZ11KQokkuLITSNjqaAtofEG+gJL/igXNLLaJELqOxUyORKi7\nOPidxX6OHC8fx8Xg2JdR8K/nlK3zeUmiB+o52E25q/923mfnWYy+wq7nuXqQ\nJwL6\r\n=/TFv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-479d536-1627371646727_1627371762614_0.28200134515355324","host":"s3://npm-registry-packages"}},"1.1.2-canary-b91c9b3-1627377025897":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-b91c9b3-1627377025897","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-b91c9b3-1627377025897","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5f2f4fb692dd04c2d1eb0c09afd9c03ca1c6a03a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-b91c9b3-1627377025897.tgz","fileCount":7,"integrity":"sha512-dfAq7QT7OmU0Vkzt6hQzLsBfmCyrMbnuvTmsfVxONGzv7ia75j4be1S7N71P1yb5d7Km92+RJishDskocomR3A==","signatures":[{"sig":"MEYCIQDwteJCTjhAftXe/OOm4bZt7k/4VpjdjtnMEfpVpWcnmQIhANvY8EBy6VQkry/L7quk8LZobAT0mJhEDkGtA6FRGp8O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/828CRA9TVsSAnZWagAAS30P/0iKL16+A1TNymWNG8be\n6OHWJuZcqdJaa18rBjJ5BZyJAWLfhuCxzHX0RIWsS+S4RXt5+sXQL9LMal/5\n6/GMK3YJU3ml3oGlwkbmWciq/NalbyPK5+nnQmdvxZTlrieaV11pjMc+NG/x\nyTJxj5RJxS7G24y0H4Y9SLEof86B6vpM6+Bgu0gOfkzRW8H1+nJ8f/hlrQnt\nKbY/Oxn1BvWaCQfE5Iv21MhG2lk0uJJg4A/jilVWuYsEo6dSXfDTUKz+y/58\nT2eKjiQUMgEmrhDAmlJgiO/yxVAZS7/wC3YETS5wgyCAvdQDMXzs+vH4Iw6E\n1NbCIetpgxcLSCv3ojroQeyhJKrvrzZa78dxbDVD+A8HFfI1MrYzHWtCT05k\nMtEY+hNE6jFWFtJ6U4ln4ttfo6X5wxtmUhLb+7PvD9GvBxnZTefqT5KwonpX\nk57b5lbJvcmqrwW0FmUKXEYhH5cdu9nU3Xgm95hYLJbIm4BvSEn8DkWX2avR\nWSTpkP+591abQrQIb4ZNUx5cwrh0PG2UMDj9PSK/U6jZBPbE7VBlhnOgCJat\n/rxVTRMpNkjO/tQpdeU63V/AJefdbvHKnimTqJ5g5W7cIfA8z236q+BA/2AU\ngJLDomsAw/zHlA7uRi8uBww1ACTnMKUGCUBetNUYtN27ydw5SVIt0l/NwMIw\nDn/B\r\n=EP/9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-b91c9b3-1627377025897_1627377084087_0.5329462927220603","host":"s3://npm-registry-packages"}},"1.1.2-canary-0bafb30-1627378561656":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-0bafb30-1627378561656","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-0bafb30-1627378561656","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8a1a4a1cf4db665ced49c7b2602f0e5047a5080e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-0bafb30-1627378561656.tgz","fileCount":7,"integrity":"sha512-dGf2xHJTG9Dq40aosa1vkNSA9KTSYYAOPXDxvZcMWSnrZFbuKPT3oYUw0UCLsSdLBx7q02KvKmvw3OXig8DKlA==","signatures":[{"sig":"MEUCIC5RSZloVQKX8EPBmFZQ2rxUAiVazbvpC0FVAnCa3rL5AiEAystYmkMSUy294OMfrD3YckQ2W/wiCICL01Dts2O5/iY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/9OwCRA9TVsSAnZWagAAYGYP/A8Hqv8572Djn787nHpO\nBdNbyk9VdiUB1PwapPsNFazsWJwlIT3YpmXCQhlkU65k6GxhwHTqn7HR2jLB\nV3FgtK+dl+zYjPauDAghFOmrf+VokVF9pmoHz2Z8YqM0ThirFdJTyswwThIv\neYsU31IJ56VtKJtS1KyQJ5+wv6bSX2yI2CSyKoXXOKpdv7nhX5NWnI8bTXeL\nBADtl6Ilm3rniXkaluYVRgrDJiQxnUBbs9dKMLL9bc9JKc1BCcJz5JIZx637\nP87Ik0O8waYRv2fP48Ehiz6Cf+jGTGErd/SypbLUU8xwPZafjebtK1xuwd7Y\nG+PFX7jixmJVsTRETAGGolFQ159voQTN7Hh4qvA5gRKWzy6M8xFeEORuByqV\n/AoWah8JAR/XsxgCk29HZafvf2Um2iNsYZ470rZnfTtm7q6kd76E0YqViRnd\nc/0Vwe9esm4bx+pwpnpgX9h2PxrRpA27/oE/CxdPC3mK78fiZsDKkzei40cQ\nxyML9qv49VPUl4hEwuE5zgAFIzcfpj/GWUiRYqmn80l5TZDEKcO4cetEHmYJ\ncFa04NnYFwMG+gIsmU/1uj8ktYBuVgDw2QWUk1obfbGIJBgbVxFWKaG4TNUk\nNZ7xbmurBk2Z6Ks1SCx4OwSfXgkbNY+AwzpO/dKEqJJK60zDPR8CXZDMuaqC\npTZQ\r\n=7h9l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-0bafb30-1627378561656_1627378608452_0.3081100882195489","host":"s3://npm-registry-packages"}},"1.1.2-canary-8d8264a-1627524265271":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8d8264a-1627524265271","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8d8264a-1627524265271","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"847c8f78a8accdf8f1906d42b9d899ab1de6c100","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8d8264a-1627524265271.tgz","fileCount":7,"integrity":"sha512-Of3rdQawqVbVeCSSV8DuTCSaLyzM6Ax5XTW586E5c1eYfQTYKABQ1bT68NFOSEamlu87mgL9Tbais5MtkF064w==","signatures":[{"sig":"MEYCIQC1MGIIUPa2M2vS1wzwjLGl9+3EmPZ538LsgrUohLfW6gIhAPf7ah6QR1ytlNVWIGSfwMB/gWaBP3PVpJ/0QwtybEE/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAgzaCRA9TVsSAnZWagAAM64P/jTDbLzcSZu2UyyCB7rK\nnHyg4FT++IR1izSzc1eH8oj+/2e2Ti13B7WniM6yy+SSPNWoq9Yx5jmY6Ef8\nIVlIjKylsxpbETuQrDyRVLU+KCfN3iKHfozQz8+zStlPVdVBA51A/LyVFvu8\nw2HVezAqID2gwTqGrWThq3LLgwYurEwwlaZcpFUiOcqvbwpBK1lUvyRQu+/k\nu8hV+gZVe/ZuUUliPguXn72T5u5cW/rnhyiFA+AwF1LMrxOn7GmL6+Omssgo\nJxQBdVeMQzZVm44+hBqtCsQkqZtcHGplWTNEwd9qm/s7Am1wUd1FG/yZQg/7\ntAiA1S4hFcKxQ7Ej6619JsyD5xEQ4PeYYsMN18ykRk56b1OyD9EC2TDgf/uy\nEDV9drb56K2z6xf2ezzROPYmpmSAx7Oz2kAJ7HIGymIy/YxRX6PlId9eJZ2j\ndIUD2UX/JbbnvVMQqNPfpvdPlMzWp2Zypf8sKT3cHMAXM+gUoHNlbdA/4POE\nld8+oYmGXdyK4Bay/ONuwmkReCqAQqbnBONucLuMA8e552eZvexzOOW7Td54\nkJcQQ3qM3UKnZllI7Xx41kcyIh65JNd7flDlFUP4pzIv3VZsIGpCGVPLiyo8\nnV49hqIbeORPGcXg+uwbJqc9fGoCcKiiRTzQjXtoKH5n6x9hehW8QdPDwNJy\nFOF5\r\n=6pCp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8d8264a-1627524265271_1627524314481_0.6444051171527636","host":"s3://npm-registry-packages"}},"1.1.2-canary-8d8264a-1627524280333":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8d8264a-1627524280333","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8d8264a-1627524280333","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c93a09d4fa40a5797399ff2e66705b8c0a607895","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8d8264a-1627524280333.tgz","fileCount":7,"integrity":"sha512-LDMBmQhuQJP8dP5UitB/efaJORcfI7JUiib5iJD6EAFdoxaJISMaLkW3iDS76hcXcKR0q2nkogiYR++5vIuw1g==","signatures":[{"sig":"MEUCIQDMEfC/bSUEBbV/+xzgF3xL1HDiL0PqRmmbYQTkS8aqzAIgNvH4U4IH9a/P8NeauGaFM/4EQSRi2FhBsS4/vsKwQ8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAgziCRA9TVsSAnZWagAA990QAJGuFa8S3O+fIynqi1Bl\nxogv41Wjeu4LG9dY1JtR5KoQqKmjp8//stIrui5H+4WnNY7/7P0VIf/iedXq\n5QjVU4RTkCISOiUyXWYmrgHXSLnzXjhjwALgrnFvaY4J98vTFO648Xw1Pcyz\nn+MD6tJB1flsLkwncZ4JCtsgvHz/ie27ZVvWAlrBMeALT+Kp54oaamZ+mMqS\nZNmqp/aXl32emkhQ9Pv1yl6I/5Re74adDPtZNx579S0n/LUo7RPo0xJHvWTS\nZc+R5zWbwFyykZa677V4LZ7BtjFEwjZSOdbQ/eJonPXr3xoFc0UobSDHcw5T\ni42J1HN7dx29O9TgA5rCwo6CfpwOwL5xQf5uLRYqgDmGS+5VHWTT5T5qTrvg\nOjmFLDq0JS4lUQRb7AqE3ZrcI4Ngb2dVtwuwqr9nAqa+xsGxgFA0SK7Ca4h0\ndeA/iz4fzVoYJ77szO24vrMOD3ngSilalaG0lUcJrpU5Tj5alxmD5ccmsc3d\ncIXDEvP/JmeqCB9/7VAoYiIhuwuz5IclUvFCygXFbgARcbsjghKxXXmfg3G8\nOGL/n0tHvu11FIpk5agb8uUDhgXkWZ+aJoPidHiJH+lqpolHtd9T0GXpDBNF\nw0Tr66csyESLgaEXcLoz4xOq7XboRC1e9Uf1YyRuZTsxR/krPHeR/WuxKiE8\nixSn\r\n=/xde\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8d8264a-1627524280333_1627524322780_0.21995742453810774","host":"s3://npm-registry-packages"}},"1.1.2-canary-8d8264a-1627524281882":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-8d8264a-1627524281882","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-8d8264a-1627524281882","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8742ea2e210de9ac85b60fef355f005c55288080","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-8d8264a-1627524281882.tgz","fileCount":7,"integrity":"sha512-HNYFvnfkpjKoN5k3w1+0cwtFresuqPeii1hYMkgmRTWMExkBEudLVG5s4F0btzWGizO/i/pPNr+041XgO6tkYA==","signatures":[{"sig":"MEUCIFPhViN/yEYjoV3SuFOdT5WYENU9mR/88LJJuhO6yI10AiEAoGLR4cVYJCeRj43G5vI+nJpJCSE6AloZ5sz3Bncyp9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAgzvCRA9TVsSAnZWagAASvkP/01KUuRrLgPg3QU8kLV6\nEl7fOCIBoc/+5fXMVnFGBMguKXS6CkqbEHjcDTNM86h0+Gn5wStzWDqrSh8/\n4O5Y8f+dy7/UreFjMfI7vK60BIhIcieLWjQvcXSDh+cDbZV/hdKYloiCZp/g\n2bYvoSSiHm1FZyn4M+p9jYkK800THF9FE9BjrnYE9CFkPYRR0Gcu3+7JCgtt\nJFb/kEZucu5PRXP3j5a8TeE+d1yuE7tDBPFUMTOjzGWDBtiJgC8H7kIx+vEn\nFTi/cDte3JsOSE4OihyzvZVJupg+wBLi0QzGMadF51teMnIZXLNDJseVDmYc\nILlzvDYbfGx4no2A5GkEiKxK4NmJBeiW5hBv8K8TAurwRjx7jMXlK6rTU805\noNEucmQ0cgM9MaWvXrDrVP1l1yDMI17op9BS4xb6T9Aiv60bBrblalusyb9E\nLxRocx0NmjPBXhqzLjstDb/l2lHRLvZ2Wk1dsGGaNmRI87XWbKQb3jFpLI74\nRRITIlmr0i7S7W2/ZOOv/+rW+7bwrTc4LcmH1oujZfKC3AKlGcH+/uVACJzC\nPtd/rtyH2dveZNoy2DfaifPYOCRnnM2X6BFTCAk0fSw+nNMzb7nwxFEE5ytx\n3C7uIq7Secuytr1yK9sTVzAGj45M04qKIMxT78Agi+q8oZjHb3vVHXhJWz2w\nqAzR\r\n=LDly\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-8d8264a-1627524281882_1627524335317_0.5619132453806781","host":"s3://npm-registry-packages"}},"1.1.2-canary-afa0236-1627547976932":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-afa0236-1627547976932","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-afa0236-1627547976932","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8a15a1dd2c53af235918ba631c9fd5528478da8d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-afa0236-1627547976932.tgz","fileCount":7,"integrity":"sha512-3XBrt8jNlr43qgwvGbrgSlkyPzxDLhuagfcAbWZ4/C8HVH6JfNDndyJuc7//4SmyDDFgaIEuMjwHWs647U+lMQ==","signatures":[{"sig":"MEUCIEGzUTeYB6PLGM71L4zw2qT9gvth+V6XcAxvJOnqCEWHAiEAgHbCM5eVap57z/x9ese/n77fUDe/Y4kJnUxwDYQgswQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAmmFCRA9TVsSAnZWagAAs5QP/AnEH4Q7N37DGeP8p9Jd\nZBQAA216JyNFOv6e8T4ZU6Gn4UhlRPv4ZbyNvSBnIHSQUAi+GYMj8/24Dk1D\nHToAhF706j7K+rwrpghxdjJESsyiBzc0CiZU7rKHIReN0EoLNJ6iI0W76WZa\nGjxaBKcJypaP3beW7iIIAVvf/rTXBPmSnRjY2yG+MjTxJxQ9wNeHSQetOhzV\nxgTzOhqLUXSGqf683q7IakOkdsuDaF8xB+hXJPL5q3elCcF607m1BOmgPmi/\nkhSXf3tLpanXrJ/pjLJYa+M+u1MgdnjV7QPY5phYtDNC8sSOF2vSo7ap6Lvu\nsjWhILS+pYTPtdY+Ch9baAi45KSlJU28dxoleq4eq8GNRtkByYDr93Vr44F6\nYT7xO6hWfVFx1pmtLjfxCz4TxzlfiU1GZQ1RhbV1kErsU2ApFF58ONIdeQFt\nEJfW6owCrgGvhPgIq7gqzHxPpv+Gd4+YUgnAN1qiQoVQjhaKVqp2JogNCzeG\nMwczAs+q/Xjf7miuVxaMBXqB38m9520PMXELNPOEBqEzM+kKxgSjRVr/HvY1\ns7HiUriozFRD6L0Arwy/Rc2woTOkRPZKwFF57B1YCh+rMFll6mmMwGu3jCsj\nqJpgRn7nsZ+34Xl3wi5UhDJmhS0ygCkfwU1sO33Kxi2PzQsn/04JJ+s12wtq\nSFVy\r\n=uzfn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-afa0236-1627547976932_1627548037608_0.5811968424980052","host":"s3://npm-registry-packages"}},"1.1.2-canary-2f8e72e-1627548238034":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-2f8e72e-1627548238034","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-2f8e72e-1627548238034","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f31d0766df16345f7468b56fc2f534ce9275da37","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-2f8e72e-1627548238034.tgz","fileCount":7,"integrity":"sha512-pDUxQK5xF2kKHgYoL/hQFiKx41USQ7+xBL2bYgo/of2gu8/Ux8GxNvONU8IkFnuvRuQ7pG57W6PzdOgr64cM+g==","signatures":[{"sig":"MEYCIQD0VLAM0w79jOz3nkNEU1DUxbq4fI+o4QkqPrjLYBbKQAIhAKyFCn022+imOkrpQBw4qn2NBMiIN8m639e0xrWZ7vUi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAmp9CRA9TVsSAnZWagAAdq0P/1KowP848vcnP0NZbqSa\nDWR5gowaXLuXG6QfqHJdzwDgUrWGy58z/9eDddTFfXna5Yz/+OV/fwdVFUsP\nVfiI30ZvOrswIIlWZBi70o5rk+HQVsvq3OPzhLRVtg6ms7wQzgBdits/EFra\nppg1e/CYVT96S5JMbCVC+Sx/a7zEs4+1QEuwXfbrUxjmGYhXpz86iRPbnzkj\nbG4jtVbWbO8sxurrMk/SWZ5YjOEWUBj4SNgxNY2WSGu8+qyxmg8J4LnRLtG+\nT3FBKbZ0PvTfqXsvKgGZMHI5VRR7Me0Lz/Ia1mW6CARyzw743s4SiQnRAwlv\nCsq6sEsx/avGTY79hMvz78+ziQStEnybQFEx1nlugJGWbmB8gFn6geKD7phv\nifbIBeCV7J0Y91UuTbV2RSAAxPpUX5M9d7RUu8TXW8lbrWTg0b/LBxkqL6Cp\nKvXdXhsP9UvOFAi/9Pkhr2EN+cSG+6dnkVUxmJd7dGnUhlZK7rfoALmtr0lX\nUpgJkQzrVAFb+ZGlhIVzcPTAZmHn++5SeYG+VDpecrWAP25CLNkTrmtned/c\nSS5ecNJYhTmfZTScQ6wK9HYD4Y0v6jbpUkKXSk7KJ8/5lBVMGKh9jE7pEC7c\nQnJzFs1o90oVIzgE9YlNf99KMqGc4XuoUiglaq3VomJPJUNPmPYw3zBS12Wu\nhETN\r\n=HadM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-2f8e72e-1627548238034_1627548285529_0.25437264631057577","host":"s3://npm-registry-packages"}},"1.1.2-canary-2f8e72e-1627548243510":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-2f8e72e-1627548243510","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-2f8e72e-1627548243510","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"90d97c10153ccb4fcd938857d2848b786259d8fd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-2f8e72e-1627548243510.tgz","fileCount":7,"integrity":"sha512-yzwFs5k5EZbnG9KwupxNWYlJdF211K/Nfnujvnmrz4jpuJ0ditevvVg/m6Niy7HP2ANwm6hBHKNAb3fjLiCQhQ==","signatures":[{"sig":"MEUCIQCkpZyrumW84aWSVJyBZNVOnEd8KpQCeixt2XNYndRHsAIgFePnqOdp/m82NnLghDZrQ6EUS45TDQH6wx/oacX+oX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAmqTCRA9TVsSAnZWagAAC7cP/2Mnd7ruD8MYHlGsG4dj\nexJ+j19vkcVCE8ykDVGr2cgHZcMJCBms5JvvkR63qnYEjcAgo4Lzb9voZCmO\n/uGxix+jq08XrU5vcWQoHTJ23lme/RUkf/PlHLfwTD0fAL14u3wyGHKUFWfa\nCsCWcuvHhU8vayAnraVuqkV0Sb4hdIdMQA/OnlXCiPWRbpjr5ShJsjFRyRNe\nNvmDyN48CJZ4ZyfzzvvxDjniNp6N+0Dnwjs5InC7SCiV7c6+MtPyr3Q/1WHo\na2dSpKj61aIiziUu61apfwTSZuialNfXejj2uf4j23gTaZYnQxdbQ4p/n16E\nja5Cq2gHr6lDjnr1yJJFelzKyly+FfTUzsOcQkccjMeN7aFlQUjt+54ZSNgm\nAk1zFRdjFmHoftIY1YgEJ620K1BYLLyAu9FaZP1OiXKmfkv2wmmtr3MEM8fg\nXFkaxHxq5myQvRqi1qvNtC/BWPrA86DnZAsxZttaMTs4dZRuKtQybdag2VND\nCZcXrlm7IU6FvLnF73ZgMeo9cwLD8QfGAmnoFQDw+tRnNgzGeNUeumt5de3H\n+fKkf8rybZy+RnfJtz/P6sdbFAK/Jkpf4PPKFUgbVm4Gfqoj0493fK+u0IFK\n4+8xiqET+xATBAqq/7Ol63kLvuK7c3Nw8vVUJVJ8h9QIcCMhbrHIuHr6LXyp\np3kp\r\n=ka86\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-2f8e72e-1627548243510_1627548307286_0.991728825650656","host":"s3://npm-registry-packages"}},"1.1.2-canary-dd08812-1627548509771":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dd08812-1627548509771","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dd08812-1627548509771","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c1c3ad3f96ba547139a2df8bf062abe7de780d23","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dd08812-1627548509771.tgz","fileCount":7,"integrity":"sha512-GCMoZBrZihbzpjW9oLaNfRe2QuOhTBEIqPK1n3CBMKAdemOd9zR1wcQJR2E03Mkk+uafWNv0R2VEo6Xcu5IYOg==","signatures":[{"sig":"MEUCIQCJHWSR7mWb1Sg74R1tanusc/+TeBLLSUQeqy5u8LPpYAIgc5G69fXQrqAL4Cux9k6WFiYFG9Qrs09ic1biw4hubQc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAmuhCRA9TVsSAnZWagAAZaAP/3J34jRapTH7sZHOVJgh\nCthUbnFo8YANKZhToeTkVgwqXoGvK/I5azNpns0vZoWFLQSjUvmeo1eNXiEG\nWbAGQbfZZVMRkeDlOTMzBNpZQd3Bl6jEWde7wnynJq1NdpFWCANLGR34MjZe\nydZDdychrt3/iPsmHTiWFy9A6D0Ve4l9qeG7sF8/fmlef8HZ+OQQUzb/6ZYF\nWvBT1cqhXawV2jpJ9unjN4GBdJ0SlnN51Vn5O5zQ2BLIynrifwAC1y7ziLm+\nRTv0QIr6vraImxozGKyuJvKQaUWKZ32AnOOYZkMqgTANcL6wx7qXaPbDycRF\ncLo2vBgU+Y3dPvBWwZ0xCzwGY3Q4DQ378Y2sC+XNbywVDaysnqrXcCuaa1wR\nVmF+H/vT6uS9StSvnmOFuK3WSjvw9UXhisSQakxKdXnXmE9iR54LgmoSw9sj\nR70zarVh2XrfrJtXYoBhl0HQxaFh6aiffic9SRjDNKthyKGBzl76sLLaQ+tF\nK/V6esYzHnD/rJ3zpCJTHU1zWVSGf1YW72CTZmRW4RNdqX9+L3W9IheBegHw\niFGu07c1bZAZ60u7IM0drkZb/IHkGnulS8x8wxeoHf6StpfS339PGJVqGvIj\nRd/+Ou6wlmiw9tb1+sUHdQNNbmxM2wV5wkZrAM/cLJlxaeJwokH3dsrcXAME\nOJ31\r\n=OZz6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dd08812-1627548509771_1627548577696_0.9426362413177345","host":"s3://npm-registry-packages"}},"1.1.2-canary-dd08812-1627548503043":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-dd08812-1627548503043","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-dd08812-1627548503043","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"454336613a9841236d487e5e948280732f8c3932","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-dd08812-1627548503043.tgz","fileCount":7,"integrity":"sha512-i0wLjLHMklNfQsyEwabr4PQBMxIuB41JQgSGUzCLqKSBBxTgwQxvZfFLXTwC1w4cg4Ewz/C1nUpM7QqByhfMKQ==","signatures":[{"sig":"MEUCIQDjrA0yo0oB9Bf/PL9ASGfEPiEfXgGkbW7ddRQxb2HuTgIgDnbcb4P4W+JuKjuALU3UoR19fzyPL4YeafLPiUEmqyY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAmvDCRA9TVsSAnZWagAA8OAP/1pl/NqFf1OurFMc1aTX\njkfhUSHNt0uhleCTNm2MXSwHBuUWLl4RfDjCQldkKEJd3JS9izCjCagZ3cS7\nY+QNYbBpWC1F+EWZMfW6aoCqOv7mxNIvMgInti4FxJAv4D3DiEWBdLhsV3fy\nX0trrkUmQUTQVn7eYxcX6DstIfnQJKHjGqe4S3DmrXsH5OCtNPA0WJ4TAFeb\n7hK3Rt5ImNsnKtdEArU1N0eA5e0wDH+aytzBz7OTb+EZyHdArEiwThl/rFuR\nS60TuFbYoY959Ky3s/7pBFQiGNjJOL0olbj3Ir7TdH1jAZd+Y0Cw4yftcr07\nWPkJZOOe95igFNyYTkBiNGMG5wSSHvbC9jDtaqP+k0Au28oBLpnIqYqGa/tc\naklVa9lfQPSKqU21LboEQUKLtUSPnwESgrbvZfzBXTEhOefvZyAMgQum+nlJ\nfzQwt1Ze9KKB4VEo+DQo49c5sMqcV6Ie5WG2+9IxcVpfY4C6vVcFdkiyQ1Io\nw/XO/hYDMl3M33Soj0DpmJ5HJEM6EusQrREUS26KWLCl6h+bmh5qJElhCwmZ\nVfpbSwA3KasxvnE4Qbdq2KuG7Hto00iEJl/c4RBMwQs7ZCOsjNtj9Jw4e9jM\ncXnzyYX3HHI/Gh3QRAqV0YzjNP6rz9SJPAeSi/EZerk25+b9S3PteRzxMnf2\nALyx\r\n=ISIW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-dd08812-1627548503043_1627548611705_0.22386782167293573","host":"s3://npm-registry-packages"}},"1.1.2-canary-2f1ca76-1627548752291":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-2f1ca76-1627548752291","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-2f1ca76-1627548752291","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5c509d5d42f864b27661e16b34c05c4cf1bf275d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-2f1ca76-1627548752291.tgz","fileCount":7,"integrity":"sha512-50F+q0w5CGUtYZJP+lW/a0vBC78xCyuaJUzHthqGfhAX/ojMX+wXzwkzlZF69rYyAJ2TZj7Veo3YkYaiUuOnrA==","signatures":[{"sig":"MEQCIAcWoWFw4KiEM0oaFaHja9fl74azqRY5bqrp8IZ/flNCAiA7X/dEsdiQKVYilmLNzW5X7tkSkK3Is1mC0LTEPwXlvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAmx9CRA9TVsSAnZWagAAPDIP/3JuvskOjYpMNSTFCD9d\nA033hul8r3eU2rfdywOdlk4+02VYvvrnjGq8jWbAGNg4QsWDRR+BWApWbVKg\ntynnRVCX4BDs2pgkGwGk8zzwfr2SMzRROTFWRTfW8Qixh+Cw1dcxh1ivNGFk\nVlcVxZ0m9tYFVSvHJHLevEB7iILaUFg3SiCE6ytG0+wIFXQahezUSIgTK550\n1aRNVT0ZHMEKfKzT3ZrPWAvmO86gCi4xcwMjAyFdxVTo+6upb2aQpQMSarON\nxfpsIofswoNuL1rCsjxrwONb8Ik9rgaU6Mk7BpnbFgYHBA779LC8x8sNEjiR\nG0t9koAld2B/gM8fLxhQaNtMdiPErvC3FFdYcb1/PdXnYRn+rjPpHnKAOqrZ\n755x4xUzKwnCA0GM9A2KtiCxt3KqP9RQZrdqpN05oYHPpzqsEb8IVZZLuzOV\nB7Oyon2OsuU66ZrbGJLpLBkAMBG2ehP4AW4UomRBqYmLrmgZaZYEDK9uX5kd\ndOWKWLJL4txEN/YrBS1JaDwJaIFmhxkRujnjtWZR1OoiuZGWU3YuNLE0WDHb\nJmgfZkokf+UOhwPS54ItFMETZXBGxm0SVoUu4wbzTvTqcsYmFrhs8CfWWoCT\ndnrWp0joL9xqKntpyHlCHztAtJO4gmYsziL8Nc1JlkjaG/gk9u0ORufx+1Ni\nYw2e\r\n=oYc7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-2f1ca76-1627548752291_1627548797142_0.9043001609068215","host":"s3://npm-registry-packages"}},"1.1.2-canary-4c7308e-1627610647971":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-4c7308e-1627610647971","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-4c7308e-1627610647971","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ee0068c0686b356661c2319760a9020ee3e28db8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-4c7308e-1627610647971.tgz","fileCount":7,"integrity":"sha512-pWRXocVrffk8y2fPDjW0XrU/RThqHCPzAqzoRkZg/GNExBk8pp141HJNfo6/lHdVMU+GI3Vt8DPtXmXahOtBUw==","signatures":[{"sig":"MEQCIDg05VRcVvZX5kSIqLwe+OOJ4snpCNU9mIXTpC5qaHfwAiBqJoT3imtojDM/ZSOypNDN25J3Ts3VKuhWGkLKZLlaAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhA15ICRA9TVsSAnZWagAAaEEP/1iZaTnNNOq33kzhmmau\nhOlz/3wPAIZ5lEnZwMr7uZ49WrdwKDt5HqcziMCBxmpGSnMwQwFxbP6/PG3s\n+f4m00bwcjRw5yGtu+/WFqSt4KRAs2roQurZ+/mCiiQ3PJ52dsBx5Ju9AqRy\ntd9RWnvSkb/tR33zZtQoljHfWT64Egig9bmeIX8eOz/7r+vCq314D74PbRUX\nOeFAWK+y92hX9UXxBaw1jJ3jjIjSzrSptGzQH4FvemwGxuju7AUGCvmYHuNP\n7hQ5kz9LirSQWeqQ5ExPZahEvoa42wHeSnYmebOzZ1lKYdxrisqhcjuKvi5D\ndhXHb/dMCRCRGnKPPcNrkTKnVZhfpOipMOsXTlM/E7vdjMtW55bnHBajhCA4\nZx32reiNgLFE50NujoiL5ugcy5NncHcTEvgOEFcOhlAoeOe/9/2QG40WonYu\nyJ4UcGuxvRmMK3rMn+U2m8iywvJzmvFIlBezSst4jbagczbYT3WYKJkAON/h\n9ymHalA7sMYuY0P7JUak1+wA14jkbcMhG/NoFSJpVxLY2LqaN08TAhZKUjG9\n3GRQqPwpbInrG0k3barN/+ZO4ohRta8Ke4N088akzSUfQuIts10DEz5kOoRG\nrvDIXuyCmnS1xf8KDo7A2LwVSU/rwwAXMGReASuFFN+vwKqSg+pq2Tv/cffg\nqrSk\r\n=m8DI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-4c7308e-1627610647971_1627610696532_0.949846863525224","host":"s3://npm-registry-packages"}},"1.1.2-canary-98cfb48-1627630504823":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-98cfb48-1627630504823","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-98cfb48-1627630504823","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"17d2a07ade1035afce8e8972207a5101a15e3d5b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-98cfb48-1627630504823.tgz","fileCount":7,"integrity":"sha512-asEFy/F269WMOGbR9fURftap+ivCd9RVB05hpVCJm6KBoOJ66UD/+AqKA3qIy9vpOMW5zinwKJGUoCCruvlzkQ==","signatures":[{"sig":"MEUCIHlY9wTJsrNlvHPtz3OYpo4WRwrNCP4t006FOcdha1NoAiEAg4KB5cegdKSjRevHc+mZbb8RZtm6oERF+8OSipLH/x4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhA6vWCRA9TVsSAnZWagAAb3wP/2adT+4c7rpCUoqKp4bP\nB0ZTyWbtIaD8U99njpnDQdARWRBvDGxKkLvG/s7ISnJ2WZRmHrcuFwtpyxvo\nQmH2eOKJ2Vm7InSwHJ9wAh50pW6IySk6Ix0x2wh0IVaIml8yDDq92BLsg4ko\nvYz4UIKUWaXWXlkhdTlyFNzOcClyvrVoQvHhN2OBHcJ2CqlUHX44SKV81M3j\n+HjgMudb4C6UAlchhiFnS37/ATO3i0roMRPIL7Lej4pfSr+cga7BfLfrtb9l\nGI3MD6HuM4pp0psd3QqpbZl3TlmL+9kwxMMrGFBoZYViv/rEVcu8Hoew1A5v\nlnjIdA05UQ52kdDqBmU/UIKbP8Fm1/0+JcOh29BNT1DEIs9fVPJectNNBGrJ\nA8WPKUvwKJhYezfD/45tEBMChq7UEo8sVIIE4Gd5zue6GXerE+YEGiAZFk6E\nFJt5qWniboC3A92AyfJfDbO1Neqt7yW7TywiV9/VkCeV5AZJZAOgsiQbYIJS\ncrxPHlv7+JyUoKiHk2Cn5R2TcZBjDIM0BV/jJnTbUN4co99rMdlcw+6iwiCL\n4c0ETjUL8sTi6oKYRZG901cOuik3RUPTcItA7DA3v2iXY2k7g4nTvnSmOy7A\nWBm/eoiHN9/AX55wtCZwFd02JGghe/qTMON10QWuznxRXzFsG2imvy0zeDoE\n5Yup\r\n=lmlU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-98cfb48-1627630504823_1627630550514_0.47506750067959413","host":"s3://npm-registry-packages"}},"1.1.2-canary-a6ae333-1627630765179":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-a6ae333-1627630765179","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-a6ae333-1627630765179","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a4cd4dcbecd5a74cc90d8a4c8e5f4d764412b95c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-a6ae333-1627630765179.tgz","fileCount":7,"integrity":"sha512-46BkqQu7kNNJM79A3VO20lg2035srjD0JU+MV4a682lWRAv75CU3SN/AYLwoQJ3cQOixCSHCVktYFIjJ3P474Q==","signatures":[{"sig":"MEYCIQD0iQlKSSSGNKALH6cO7mxciIipa5jBaZeVhBNt0DUs9gIhAPtylBca/IxM7F3NGx/4mdDPuoiwqMyDCdPhnF3RJNc0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhA6zfCRA9TVsSAnZWagAAc/kP/RYR27iau6FtQGXGuIeI\ny4p6OtrmNiKAQtigJ6SDW+HvIwuADb0A2UQ3WEHl/gnp0hj/P318p6C/L21k\nRxqhxpqSEqbXMNXbqs084LdpdhCP3EbDI/rI+ra8AsAXBt/4wZZ3SFtasEui\nLXQmcUpKo8dbbwjTfEZOc6Q35N3OzWM/70qZzX4iFVtPJWVAWQ+uy6yxNFXu\nhiR4LjQiMn+KxY1LmNJ3T+1VDPlgB80Mwj0LbI03nf2qQicD/e3+zN6Q/n1m\nqz9Hdu2PRkU0yTaiolLc/lbxjtq8S4mmHy2IHkBO3qflynd+AcuFAhF6k5rS\n0ow/iQ74BvzvFDBCTL+LEXeN/yPZOfcONWFUiu8tpH0RP78XMoPIb4I1Alet\nR55shmFxbb41sS/WugrisZS9Ykn0doWPDKdJmtos21WOsndsd3vNZjYkzpHL\nI1gCgSjpJxjXoCIIsimyRHk9wkbJK6uUL2KBvujjV8BpNrpLaqVhGcvNOTnh\nt8iX6Z8SPC2Lmrx7M3bdbrDOJ31TemPTsqNUvObMr8++ZCTY8h5YyKxxQ2GM\nIrwaE5wAZiPkJs3NR4oVHuELhKpGQ2wCNvQyoqWDMl6du661N5Zee8sHj7z2\nAGd4UswJGJZLzjef7958VfpEd+D1UVQYtYNeW/TYmvQAejg6+f4v1BgoZ2no\n6tdV\r\n=Zy/0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-a6ae333-1627630765179_1627630815646_0.21986178467486162","host":"s3://npm-registry-packages"}},"1.1.2-canary-7056406-1627631677038":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-7056406-1627631677038","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-7056406-1627631677038","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0dfb7ca5449fee2146c3c03e2be6a48c2a1d5806","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-7056406-1627631677038.tgz","fileCount":7,"integrity":"sha512-kweS7hThY1GNk0uPvnE+IcgGZRmypVY2qLPv8SRSIUecmDH3LKPfcKuZm1WiOUpKq2ffsQ5jrCyldGYo2iUlXA==","signatures":[{"sig":"MEYCIQCUQZdcWGYnSePUMc0hCpbgKEVBH/ueoZPIYVLnRdKSrgIhAK+QFGffNSK3Tw7gCvSkFo9idI5gvFAUGSaJUeQFGr1Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhA7BzCRA9TVsSAnZWagAA3IMP/1lBwHzEJR7hvBt1IFB5\nzVAH4BXGj/uFCPS5KW/9cS0fqsKozdTn3UvcdtF2wj73FTzPElsWqg6bBhO0\nUQIJiROhO3I3GIv0FkMGRRkn4e7xIWqDYboxRyxzo2JPkE6CNENj7aR/pVjb\nPbvZsVjvHBon/QMMbamYpYGxkb6YxufJq1gxOT8jlStg4bOcegR+2BK33ipZ\nMXv+wVRaHLZUUvkPDPZTRLf9XtvJcro7mteLt75VKAO+kayQa6YsQmL+C7gB\noOIlRhXG83caVTiAN5d7APVpzokKlwZpn63WAHqUATL+WW2TdvI1RfE67Z26\noDN6eopVbMvfmM7hqALoG/USTNiHsRAWQCuZ1exT1qdaXbmIdIy5ublG7At2\nSpeVLhvMY2FErC+xiMmUNkGWmI4Z3PKZ0uw1gF9g8A3W5+mIRHPTS8lEmLSO\nzQK3n6Tt590yDF/hg3h4vuSkFr48ZCIlOdzcraHF6rvgmDjDuWHLvDyBVfhH\nB3VYj9hhHkWSkl5WkFPZfQ6JnwOT/9yysTxS412UkaOiM7/IbBrzSCKRtZ+q\nP2U8GN2tGp3b2RLvEABYZA/OQmz2+iwlTsbPgiymz1wTc345BzYUawdUWSbC\npr6tVlDNaqpU1U/YLRYnIdlxzgvyPd7NXiQdiYz501Zm/bEqzu45lWrmhrcx\nprhO\r\n=Kgc5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-7056406-1627631677038_1627631731180_0.9178803130772042","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1627869873384":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1627869873384","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1627869873384","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a86b1d555db9d8014da46ae2d577480a0ac2ff48","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1627869873384.tgz","fileCount":7,"integrity":"sha512-bAzy99lbXKcQAgsOYJ2RtLxENncdDKwiZrvQMuOgBDwiHHMDaFA60Eudi+Bhhyle6drY8Ri9CYR75bJkOwgVug==","signatures":[{"sig":"MEUCIGyIZyuYFk0RHYlfcFgh5ewhEsWJdtBpoWuezH+RAv6wAiEAhkR5JURYUajvwFsv/fqgFXlLY+C8sKFK97ifmAE0kIo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhB1L+CRA9TVsSAnZWagAAYv8P/24dqCwuZwlMsZ9MfN+w\n+C6zjQjwq9rgUQL+Joc7QnP6UEdOn0C3RbvxxHVA25/6zjJkWMJwwyrndV17\nq6mOxsPGinOqS5MbhsfpWo320tfSZj6cP0Hw6OvIinVwxyoQK16hWvVpmbQ8\nTqbMehi13OX+o78aEh0jUdFmV3HarACyG9qGYKoDquViN/Cu6ELH3LgiZnlC\n2U9fXChNxFvpatvSQTFRJsvekNzgyDRXi4zPHR1YVbV81aoTLNqfE2C/MDIj\ny5Sal6v1ff7nXHb2EukgC9JTqiXwwUKY0GjhEPJa6pgl4yrWCeCXtla9pP8l\nSEcZTstGWmztoWjlzwPc6W+e/RHwkJlkelkrziVVTP0E/pww+qk0nyQ/eB2D\nHzXiYMYMMofYzA6GVcxqsIdIizeldVh1t8//WKlHy5Ciw1w//mbJtogT0LGi\noM7ueK/5kHWfeq3joqNwz9wCtxCAfvfH3XZ/4dYXHyBFLAXjtOY4b/zp41uf\noFu3eEUN88y4/TKRFVfdjJ96h0VKXECd1IoNTSUmD5XP2fyfuE8Xs65Em5Ka\nLovd37Y4KWFvk9zLoUpFrP3TSOzb+XAvO6Z0/EHhWaSoyPKeJThhykPW0feY\nkt9/pLNaJjzsG/MwSKHLScr3PtNBvtw7ynllS8dHv1w87tJNepOt8BCNGIoN\nLtVN\r\n=RqUT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^20.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1627869873384_1627869950641_0.030330425113537007","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1627869875985":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1627869875985","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1627869875985","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"12713aa2ee61cd3d298bf0c07be55e76092f87f5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1627869875985.tgz","fileCount":7,"integrity":"sha512-GDVNmBEkv4VUeVxgQ3ISaQVLLUjhwH3y3QggCDRHokdl4NqRWtGeCCYWMXD2enyKTSw5LIKOHmlJzLslVFfBbQ==","signatures":[{"sig":"MEYCIQC0OlQw/qOiC+w0gK21XBJO4SgZkYJMeqFJBTgMTM787AIhAMYcQIQQodGZ/rQqtfBU2uBYiSJViLRgi3qUnOeaPbjg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhB1MFCRA9TVsSAnZWagAADn8P/AgMHiWg7sQwWe3ZmtxA\nhTu2SLlXbtOpGAJNTrA+0MbOTE2ZQOcGNPuGom3JkIKh+YAJz/gDXGSh/+O3\nyK2isB/X0uOwsVD5VzuJ87fHNXTTXet1a9LyS2/6Qh/QDfSJMelry0/LmdkF\nNlHI9CwkN3xYrS5QL8yyj82D0d6+rKnC0wvNFwHbgRK8pa/RMi+0nF7MfaeR\nOPXAunOjW74owYlTX8OMT9UXlSzIlHOLHYO23Issaay2bX9HyYeaBU4xHZxc\n3v3XxZGgJcHgwn8slC2fli5QZ73Z6lparAeSGc8mk9ieJH7PZWcBvrL9rXDl\nmADPm5zLYEVNflRICFkd/g7IBTRThLuauIf9SboTI5BeqUFwNR1fTng5oz/t\nGsLTmJNGqcKfPMXSQnwtrUuzVdtNA/8VmUZzxmi6ngNzgLmbV57eM1oe5EUf\nL2VxA2KI/CT3qa+yGxkgJHqtx5krwUcTdej6WFQgH9UQC/IUz7sIYaEPIMOy\noHoX9fIxZ24DV6kwP3lcvN4PjVcYz3UV4aI/2WDWfdSqhIoFNz7XuyoD35G5\nriCH6EkEQWbNUE4rOqkVU9xOFiarpcBjf7yIhaunx4w+OMfVEPgrdt1AYxD+\nRU7TNO2zD5/Kz4N4VWrSCrTz4Kmwcypxc0CkLAbUsMun46+fKTY7fsNIC8Xa\nrvNA\r\n=yPZj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^20.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1627869875985_1627869957395_0.6446488784916193","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1627869907840":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1627869907840","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1627869907840","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c7754b631e0fbd2ea33b7abc25ac78dfec2225d1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1627869907840.tgz","fileCount":7,"integrity":"sha512-ww+jt0Xlkghi/9glPKU+NAszMV4aUtaaCGXj9mGAfQxCWG0xXcR+my90S1jB1z88R+8J7cMHSpWgvMn2eUPDhA==","signatures":[{"sig":"MEQCIAo49/SeD8HYYUTdUXKnTN/yuN/Wm0SWLqWnMsequixpAiAl1YDObBu2zjWmuMHB5M94kWoqO7s2kwDBegeyUX+ipw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhB1MXCRA9TVsSAnZWagAARakP/2Ky2B4HyBb0wXuXwWwx\nAjbRDYzYAnVPBG5fMPCnfrYcOlBPT0mXrJxT6kWgkSiIkzLg4i4+NaXd/uqs\nipA5u4RjHi4wZCl7USMZyoIz9+J6fkIVYFfX+W6qoJnpnASWceNyr1HMl/wu\nAOvHDdaK70rQvDrP8iwYWTQ3Ud5C5mpyZCXk+3q7cgs8wBej5kcmW93hcla2\nvlVjMjxQguKoFzNyjuLXmhb155kaZAoPxmX1eWxuGwn/ExKm8uhw9b1MpIID\ndhC9YpsmJPt3FxayDta0utYxE0iPEaPnInhmVbXMh0996+H8jkgN58enoBDd\n97OFF1qDbMZfoqXW7QlO84FX+x+DnT9GMzuRpRTw2LTxC9QuNg8Xs9ZL3Fnp\nUOars5l7Z19ArHnH1FaN5OnckneB02mKxm1oEqast9kfieA3G06MEdqgK8Sj\npqsNI/7AfQ69px/ZK9Fx5PifvAq1RUbTS10YWkcQDwsuO7PMM0FS5DOoSec4\nZ09jVtf9WeeXgWo3NJID1DfW74lIqV+RzzXqdh8kx3Yum9KGvY3AcntmwIqq\nCOO3er4MssZj9Nm/gKU2c3GboOMo76roge8YQZFp4BQ6ONwZEKqJipodzc8k\nL5hpZMtj15GVnSr26GGTI3Y2hnpl+473VOqvtQAZXEjQKtsVdACswte1PNKp\ndP6b\r\n=jSCd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1627869907840_1627869975104_0.18442013906621435","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1627869898943":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1627869898943","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1627869898943","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"349b0af38c4c2c84aa502134cd05e2ede26828ec","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1627869898943.tgz","fileCount":7,"integrity":"sha512-dz4YK0+pElAWYnBAfZI3WFq8xK99DJy7y/7+V9ubGkvjcuyzJtUVAzvDcjhTWK1ZbBU6j8YrFetlyM6XZ4dVZA==","signatures":[{"sig":"MEUCIQD9e7Jz3DY4GhJdkzlaDTrmphNvHxZQcy8gfUn+IWCXmQIgVq50u59ecC8tzyYV1JrjMCC1T5tbaxpSAolw+Ay8Kko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhB1MkCRA9TVsSAnZWagAANtwP/1pChGviHJ9FYPP3exaA\nRjI82JhBeehxA6sJ4u3qG9fmpvHJUw3793mPVbM6Sr8NEsHyKMZgrPfH+aAU\nLp8kD948Wm38HUU12PUjsQXxOxeMV4q2D328DeyqRjNPHwrMfwcRCa9LwNbt\nN6VjKXqDcQ8GmKmvOQ4MtbvMJgk6iDTriYcnjUclfE611fbrlv2cnsP+kQw8\nX3wQWiDMP79tA3p/PgeTIfLEi1Tas7hpp2g70EYIAWwPV1lGjSH8drLeIGfN\nrwGN3rdj5uI28p8CWUELVQ4MJCPxnImNolgB/AHYpiBnHSpKNhGvz8NcuyZc\nWRY+ERHNm21WicmbZAh39l8pTzIckMdl9cDDY4yadHDHUGB/2JcMlhBaX1ca\ndh+rfpd58Z9wKZ9vQta1zE5ovNnaLnBQmgX8sDysxwnSCXasOmQkjzDloqvA\nqNBDcZl8EVcjmQ6IDa/OGABH25OFcCozix6QVbFgyyYghcgYt2R9nKNissAw\n/SzlFWeQ+ZupUJPgffFWJm/d212GAIPaNmPmXmjgfIB2IyriK8CJpGQ9Vzid\nQ9sIyae6HBMXb3z/NmSklfP8prXEdFggZ6+jSmGHAvaqSV4qQkg9NdtKbcvs\nHlt+0ZzpEyjYKNlAG0KK7OFg4bWJhG4IM0TxdT0VL2RKlNTIGb1+0nJIPLt4\noU8l\r\n=wDE+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.13","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1627869898943_1627869988534_0.8151429511373085","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1628218606047":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1628218606047","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1628218606047","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c25243e6edc378fd4193417edbf2623b2063077b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1628218606047.tgz","fileCount":7,"integrity":"sha512-iECRkRoBfRnfgsTIkezPl32cRaDUOU+dBgUv2n4Z4DWN//IzIatzQWk79UINDL56yFUvff0zAir2XO+caq/tcw==","signatures":[{"sig":"MEQCIHyyu5xAmB5bkdA+4MJv8b4WTJuDiikb8PnBv6wKOgMDAiAD2Ym+WgNpZ9GsJMPcUNMp7r/zescREgxCr+c6ZGictg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDKUcCRA9TVsSAnZWagAAIuMP/3pehALDSgL89bftFH/l\nYFwVjnb0Y57QfWOV3assq60qKknH3FfeW8VoNekgnW8GNi0QEhkoZVcJXJ9H\npR5QuDOe1vrconrDFAdseq/hOCg+bOp7PuYA/KyXP8JcZ/rW5e6u4qb36cL3\n7okaQPAfHGzu72K/pulp95LevfqpHv6Kx5JJYIzh8icQ/BRWw/w0q9w6S/KP\nzvK6qU0IxxcbxtDgJ2JScGwpUA0h9XF9s2mJ8pFqecVcYzElg5vn9VRwmWzK\nK7kdqb3fdzypvxeLhycvNtlqBammGooXEsxgMsl2DmDm7hOinRhopcps+YMS\nAwiHcxLYOFVEADEsilZbWPJrFuqqg3vQsc0VjCg4obeR4I+RV5SbxgnmM2g2\n0nvh14heH3DNEqpv5ko2N7uVF3UuW7S9m4cLSa3I2zRGdrPdbyK8W+VAoBAc\n88XQmJH7Y+wnXTEL4gYppj0an3Gkds0CbopnYAzfQBaD796A//5lpbAvsByl\nMdeFuzdLKwNxj7s5n1E+o26VoX9SBCq1Yc6yu4/m8xDU/FHZS1DrKs0f5Glm\nRLT7vavjSRnh19MC5SZGHzNe9bakBayEDi+IsqGAi80q5bmqeNE5rt2fqlHf\nyQ+88b12XRK8eu8zrCIzx8AGdb8VMtUZu60j+UTZ8zJWsyaTmdtza8vRvdnW\nD9Jr\r\n=pHZV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.4","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1628218606047_1628218652438_0.3985555209191094","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1628474647383":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1628474647383","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1628474647383","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"24d1d5e5691292efa099e7396012aaed6275817e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1628474647383.tgz","fileCount":7,"integrity":"sha512-iv9Is5s5WvnLfTr3l6PgiuMJ2b6jICrbf5eC9O/po05p4X9nv7Z8pi4mJqfn46JO4VXeuvPdIxzZtwh/5b436A==","signatures":[{"sig":"MEUCIHnFfR6r35tPoAB5j8qHSC1GRXi7uF9MhWanN/Wu+RA6AiEA3L4Y5CIQ/yTenLeAjhB16KewytSBTfBL2oq0jzKdyRM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEI1OCRA9TVsSAnZWagAAcPwP/2HK7sDG654d2Ameve5n\n/k8gMCmnVPh7c2TrcUhiiNT/CP4GbL2/I+mdQ3w3P11EfnJ/BSLmY/5igkGU\nEBDdc488wocgOL7Dvv+Mh5m2/OQUNGimBB+rlJ8K/YB7+ESG4IaTXBs/hgUz\nxvgdc152KylFAniJ1GyorLXzoE2Etvvoar9wke5wbhMz40wyk4c5ghtjWjam\n3GBX68rjVJwzOtN2SBWud2BxUQ82MIbuq6kFbm03KjgdzqH8crFrwiux8qk1\nUHy7DfIVOUXPyos/DfbYlQPN03NSwTruQvYE2DZwXaeOM7vDUWfnqPSLaRuL\nxZz8tWPn6mdqJQ3mUYSLUurPlYD37wOtJ9JZolMWqWQGOFSqW8lW0gqC9+GA\nhZQyIaBBA0b2OU4o/nBPX13oYS6QYDxQUz8ZpvexHEECs4AFgMaszJNJ27Uy\nw/Fgp5OwQ90JAbrBEyEbhqkvWzAfGEZbWicHInvZ441S2gvxVMAUJk6PdrlL\nZ3nxm3wEcStt/zdVwF7UwG2FHx+tho4uNqQanWUy2mxVjckzEDQ2NAdkAi4I\n5+zWCx0LZ16NBVJmuez2fqVDU7TyfJtNh1MVWhtg4R1VwGUOaeKgRd9zeOhR\ncrgbfQ8c5rdkWrMJHXxp7T6lRx+RbNAlF823CAR0+OkysQgMPC0kKdEqM5Pz\nVZNv\r\n=p+/y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.4","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1628474647383_1628474702324_0.7956512261875925","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1628647538416":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1628647538416","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1628647538416","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b1a665b6f20962c69ebe22b650d6596c2dddaae5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1628647538416.tgz","fileCount":7,"integrity":"sha512-oNiCUeeB6p4PAjhgY22IgF5Ip3r0xGvR6X6VuqvAvA5hl5rDiJIt+c/tAum5/rj4Y+qr1TyOOk6IiK8+RDf+NQ==","signatures":[{"sig":"MEUCICeZ2+jyQrETbHSrxaCOj7sk8SKCFdeC8f5v7umgvR6mAiEA5JfMbOSPhOS3bCaKz6DSdeb2skmG5pZgU0UUBH1GFl4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEzCgCRA9TVsSAnZWagAAWS8P/0rZ+N7Ofa56SEnZLnzK\nTHwRL8iIm7a3t4nMhRuVSl1wwMvtL6WYU3QQHdWjfUtKZY4ZNGmOe3chsc7G\n/7iXN6o4FMUGiuj0IhxcIbDs+fi3EfVbgZTSN+SVAMK0Kw9OKC1gdRKCbMf+\n7UPWjKCq+Rso4pudy/eL5szf/enh+MzIgGcKgGhg1qr+zLjmzS/T5G982lmm\ngSv/FUYcXHuRLbGQQFLL5CSvLOV68ETJpN29ZWFIIZD0WOclJ4DnsBuFHbGm\nnc/ah5jD1/cU/j40Y6J+NKsILDniksLb6QcTJQXs44J3k0vRDHVx4uwz8tl8\ns5IeI4oJ3UOLPwTw8sz7LAi+Lye9mHw+KVLoKe7keWFKvppeiU/YjSS4/gtr\nr23WK7QiC8bbaISyOCE978D0Dm/COeqg0rmwOk5x/P5h4O9EEaqZ5GtVsGv3\nDyl7EVDGBaxdolQ7OlMwt0s4DSuh94Q36MTvrfAPmQ+GlXU9/NboDw4AKQwt\nIAdIGNZsFZJVKD7I41huD27HbtN7YGOBacatQ9SEexX3bcBocC6qS36lLMEK\n9u/AT7bAgMW1zJmu+p8wiOxNWQrEXhN63BY3DiQsCN2bIeESrJx0PrkN1jtR\ntdpMXv6jaGvQeZeRZB+UL9YaYDfjgagb8NKxWbZYtqD++vLCnMyLfAzDJUFO\naEaQ\r\n=1xhZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.4","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1628647538416_1628647584312_0.9370854949685719","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1628647542731":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1628647542731","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1628647542731","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3d0d5045e45382994878fe916019c08f3ea45354","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1628647542731.tgz","fileCount":7,"integrity":"sha512-6JjfhvBX36OxUXGHQf78MynvUnw/vfXIYlLhcDIZy4Pm4/6EVNouCdJfnjUSgB1vIQjC9me26pUtPvEQnTrXzQ==","signatures":[{"sig":"MEUCIQDvxdG4+PlKzJ2ppqYiA3cNSHcsJbXzHap2GeRuxZPjCwIgFcU8IZA1Hxwzp92vcwrJq/DngeUPLCwqgrwXDJaLU4k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEzCnCRA9TVsSAnZWagAA8bIP/RLgRHxVNxTHAsuLgzcL\ni4IY/dsfzQGplFGMgatUTwWL6O3sVtctJIU0S8dcNOKjInKvJvXlbcWhWxZt\nOxeGmXMyedVh55p7Z5Z9PbI2BRC+2gXTs3JA6jx5XztU79aFJrtCcH+aeVEL\nrJ+00kwj88X9mcTP0abgGEoE7AjPNlCc8U4+RZZuroKPx6vrJEMkHsG5mV5w\n4VpZiQZxxobpNlzJK982sKihvcFNZuBPGQQ+npnujb0AZNSamNNw55lynTfi\n6qMaNudS5kYxrsZiZmzhODlcVt7etX9GEoMIph107WkGtZYCdTQk1t70Qmb0\n5A+ethORBLpz3fVc0zgnbQhMkMFF92h5C9xwBNpybEFCNV3ovpb64f59fcxf\nZL68xbcdUefxJyoWrDGrfj+TTmC1l/SeRyKe+H1obeaUGHN3ZD9AOCBRshji\nqYa96eQlBzoBttzK/U3pWTlE6uc6zrMMwu3OCjF8OjH7LN5eyf5ME2Atq8pR\nsRm4J7xsOEq/VH/f5R5VzStTIn8D1vwHro7rBapzJpUxxrXUD26xH3mnYjwW\ntXxvvqacqG+73gs+HXBdiC3gkaUx6STgtyoc34GHs4DwwKZi4w2Gaw091CtG\ng3a7MH0VvRLLE6okngnIA7hyUPnVG3D6hN/rw8jOYcl7zss3BLCPZSiAOerX\n0suI\r\n=+vGW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.4","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1628647542731_1628647591474_0.3746885415753054","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1628733892054":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1628733892054","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1628733892054","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a111ca6a1035c7fbbca25420f975858a8f97f3d8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1628733892054.tgz","fileCount":7,"integrity":"sha512-etUtr5kouP/FxVHaPiwRzNMMSxuIRQwp43t2Veyjf0vCyiEwYbFBNjV+DeLgqAb9J6GsdAmzAJVtjsC4oCvF4Q==","signatures":[{"sig":"MEQCICM1FOK2ws/bvfR51o4TV5bj6R78wDW4TuCf6LV/UeQUAiBUlwY5hZPul3FX2Aaa+bCz5MVNioN92weQszohS0q0gw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFIH6CRA9TVsSAnZWagAAIdUQAItiQwVkUa3i3ma2yOAq\nSGwPQ7slNUOCAzdJy/7XjSIjK8xm+DYFpVlHzuvM+qroMdYxCdYlHIMfWcU1\nhd8SY9+fB4KhxdnCHLDeAWhz2vXbi1YIchm7UoYBSKKZSfIy4SmdD+Q3RmpW\nDO7xM6R7qYELcGdbeYqTpfzy1/P7UWP82XKf/lRrms/E9uAOzAKxoL7jxnE4\nrdDpi8jI3QI3FFwO7lJvypE5LH7eLmxAV30+I/7JiGmmCxgLOO0FAxI/FiXx\n3B2kmx3pJTnadW+Z9otUV9zIzAfozZeMd0A2DKNPt7ciznsXFGeYzRT9RDEM\nbm0jVBG2M+s/WMobq5r4uspQePVf2trVUw9BCgOOYcrQbI9eTGny3mHFhZ1R\n4W1wXuX4F2wrgOUBcCdR25a1M3ydPgIy0rpQPWHcjha/PVxh1dS1zY+nXlTK\nmDUcUJcuYEREijd6bywYM2a1p0QXja9/Ga6vnV3EeUT/sC5ks/mZ9R9b/dwR\nIp/3c6ZIFBGrBcVhrNZZ5bIwWYFvqbb6tVvL0TfOIN2NdfIE2ytwIcpBih+w\nmf90eNzPhLcSgvG22TB7JsTC18SLZuOpIM7d+Gp64ORraywJH3oB/08+1xR4\nAE+03CGO1Y0Eqhhne/tb370k5Lsyi5tkZwUR1uybLDz8nSF7E1LcNUDT0k/m\nOyq7\r\n=UcVq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.4","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1628733892054_1628733946027_0.1800474943937691","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1629425033289":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1629425033289","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1629425033289","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"39e8cea705d805382659ba80c8379255bbce05c5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1629425033289.tgz","fileCount":7,"integrity":"sha512-MobUrdbVsy9wz8uKJWwnOdZi3ckres4hi0j873bbaF/5pTvg10d+3JbloDK8bu0cyHI9hO0/5m/VsE1WxQxszA==","signatures":[{"sig":"MEYCIQD8XOfGzoUeM9t1rLvCn18lSZAFcD4tFIfJCbo0lLDM+gIhAM7vjqZT/57vtE+JDhMt18FI3etQBU9S30Yr6qpIWOuL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHw29CRA9TVsSAnZWagAAxTAP/1o2fKJT/ktLTcv8vS0A\nlnmph8PG76HA7AArqlfJTr8ty1d9IrVQOYZfXyA20Ohu/BeNRdQz1dTJMSqO\nO4LydQtQz5l8vqxGtRM9hRsNRjd2+c0DsDguPom25v3DfD4FEysJS0ZfGTpk\nkPe3yaovT3d0wajd24uMQqtIRjcS6Crrz3WbUfIgu9/GBmVWpnq/Os1HNHRC\nSxYyMX1vPr9VSC1L6DwQL/kCvIENbVYIgvWTli+7AQRjcNss/7Kjg6zEr+tq\nKZV42/ONVZ23cXVwCz/b0s6IDW8DxU3fLr//kgJ3iUSqxcS4oihUfYo6lwHx\nSjQ1ZSgVv/BhV0p/ITtVtcG8x8okptCPPiQaEPiVuoUa/vtcmVJ5gKBRSlKf\n/7FivAW2gB31INZfR/HxIOPq9mHt1QdsPCcQAJ3mW+XASIqypkCnHkWrTVgy\niq77tcXL0fjXqLzC5PZNEtiMqr6qYS6kYp68brve4EBB7OnCmAmdVi1ksSHX\nk/jjPThWXpTLcHywrJe8kuChGrR9hwcdIJMGP3YWAqUF73D4Gu72qS+9ZHer\nVzpJFgndL4bzk8h3G1ZevcXrc0lLB7jqy0WC6mXXDqFvqOf5cy/EoI3APdAn\nVKrT7Bx4yO5wgxuLmitc0iOvt1ZGlUOtTHo9chSFmwMuh3Qs0fAkNsFgztUD\n9y1m\r\n=jMZF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.5","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1629425033289_1629425085146_0.19294857208019356","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1629425031235":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1629425031235","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1629425031235","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3fa28214d3738446e197a136f4519600f2ce7860","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1629425031235.tgz","fileCount":7,"integrity":"sha512-Xt4cWTjzQPS5hBMGuNnVGdecq16oLJ5Zqdadcv4/GHsk1cWXxCBi/g6H5ThPozutCVX4CbV7KKxfyVkchIYRVA==","signatures":[{"sig":"MEUCIEZDl66AEt/E/NUaAqSJSDj0k4uwWPlsXFPUv+cr08gxAiEA43V7EVsG09J0xUU0kowGLkNKv5fI/DjmKLhA6zxWsuE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHw3JCRA9TVsSAnZWagAAZeIP/iF8jwC0T5oCwsfb0Ajx\nvxTtK5Tn1D5boSSvagbihrNrU/aUi/9u4KBmrQbDvgoOoOTQEQgiK1OtykMz\n1Jxqiio987gtqikyIWEY1ebAzLbjZcadWwad9ZaIibGNH6NvaN9rw6AvZN8T\n+OagxUM/kUJjP4blG2Dl8KMzhM96Cl634L933nywGp6ec3Vvr5SpDWbxS0Mj\nxE+GxvuXbl4seBYzn58sIn5O2GGUAmv16luy0kulpXWCzSlHFkviysxfSJSV\nfanecwN+5/8fefa3K2FQm8CDEMa+ts0Ix8bDlGjiBEusIr7HJvdOpC/1v4dg\n2o8B5h6BEEOA9vNRhS3lFwB1kjyEIJX8sQA12ynE6ahDSPtAlvXKlfaLyOGM\n+iNeF/T4HNTv8pWLEkrRxGByTwlbYsyiSgTnZOJPpdOe88K7UTZJc4Du3SOt\n0bRbjczdTyQ7F7GmCptlGBG1NOp5QXFVSw3V0DSJYesssXFlv9KlIePKph8a\nibrEKAbBrbs0zFFi8ecS+wZeNm7peOykSARrTjz7wYik6q61U56UyEJU4BNY\nuiQUuuUPYrb1W+EzJoSazf/3958hHg9qm2CvDV2nqY9Tdik+aSjVCoByuetP\nqi1/u17GGXKfueGFK7d09OgBwfZK/qT1+wA7M6GIlau+6nDuiCM46RzvOzke\nma2W\r\n=Qm9v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.5","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1629425031235_1629425097661_0.479009471677341","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1629770681959":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1629770681959","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1629770681959","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0ed7001db423ff5a5783f8ded5d626b1cfe27971","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1629770681959.tgz","fileCount":7,"integrity":"sha512-Cp9oTcslAc6DJZPNfj68Z5atcwaGQQ3mxagqBHmJIrYjjWlKG+vnsBbl+u+39aAVj2b8Uq0IFe0gjFe1e23leA==","signatures":[{"sig":"MEUCIHRKx117wOKPFviMbb07PGET2tqU0Lt6BVVjfWbOiRG7AiEA9cJCCUwRpSPLdGe5TpQyJ30Lcu9VPS9P8qmg+S9qatQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJFPnCRA9TVsSAnZWagAAew0P/1/cIjtzCPWn0n3Taa2+\nDdT3j3AZdTQm+xyjZNP2ZGWvbGbEO4IV8uHwRmtzGR/rm7SJOe6daY7oWRUL\nXkBK8eXYm4NHMCuNaUgQU0c4iOEuYOGe9gDDMR0pDlbQk9VDRLCeQ8LDqGgy\nNzP1w9ZRs0JC63z1QHwL1wOwQhkUWvpbQIuRnNlCxODEmvu52UXSYh6aNQNR\nrxnUrQDQfpwtWiDUdiYy4ekkMxukL1+p1MJcgvZDNk6eSRZeA6JVW89sguPl\nsHW33XRI+V920eAvkurWNw6Z8Ib67v4EdRhFJDzCHDTXKp7RDnMduZctriur\nwZworwJk0nDZa828W4G+oc5tqKkLE2WV38mm2Y3QWG1IOcNNZIbE5GwfMX5i\nxAaqxWOec4SmM+H5TQzaEbmYz/PKRucS0Ys9ENC5G4cX+YijkCoOte0cQkyV\nx/c4k0EMbXrpc2W9FrkK/VYR9fX+FrVVqjfguwUoqG/yOA+NTl/dT1NNvQN9\ng+3+bthM4fgmymf8np9nwjMjbUIxg8/HJW7Hp2tdonr+beqG6vkGOb15Ltjy\ncX1hXVjPTIJDInw+kyhIYeoAWUPurNsg/J2eAKBzz7S22ZYZ4+4o9qJUsUuD\nNHSfMrqVau47D9L2+ilcPEeqmN/yh3nDUR0pomqEIlNE2tRN7jNoEAT6VPES\n73ow\r\n=IF3f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.5","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1629770681959_1629770727306_0.15039559401433622","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1629770685355":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1629770685355","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1629770685355","maintainers":[{"name":"guillaumewuip","email":"clochard.guillaume@gmail.com"},{"name":"brajalu","email":"benoit.rajalu@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"cateland","email":"acateland@talend.com"},{"name":"pagury","email":"pagury@live.com"},{"name":"md4","email":"contact@martin-dequatremare.fr"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"miaxos","email":"an.griffon@gmail.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},{"name":"tgenissel","email":"thomas.genissel@iadvize.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3a1b744a2e07339b13a550d6591ce9d0107d072b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1629770685355.tgz","fileCount":7,"integrity":"sha512-Jg3HgyjEiVYOZT/ubZWiA6jxjAoXxel/a18W69B0sIIQGvq1F54p8t4/V9USOHOX4vLgSK2X4dVv3LY49MkUAw==","signatures":[{"sig":"MEUCIQDtVbqIf4sRwQCv0/nr+DAllGWbh6g6/3DL6kTnOPGVtQIgGi7Mk0gyDncT8lj8YNdaH4pmaJCBjmeWJ00xnpXGo9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJFP6CRA9TVsSAnZWagAAUgYP/37LpxbYP5QBunn5ba+P\n8fYZcg+6z6jr4Qb9lPnCroAX82rbISR9ytcKyYdNy8tyqQZiBpxCrFZ8aUWk\nVNlrjdc6oM2weWZb2i79P/uWfpFmaScU/RYuou+ZS1a83J7z0xpFvhAxt34C\nzg5aq/3E95/Nlq3ebz3CdDZr/Z0wa1REUFRe+LhE0GXgmbdvflRdZExfhLTP\n88EZoCZxj8mvSj1hYKS/czgzpQfh6guKSysAyoxXxUc1tqKXTYd4rMi8IgLU\nbvC5qAwMGx+ElUramf5oH+rvMMSuRTGgUA8aBWLSXJ0/yeFGz+5nyravcq9B\nBcN5+10JxrBZoiRZFahSYBBwokI85I5u7gATnM4cv58GNIxx2pTTuI1/exbH\n4ISVI4X1OUyepifSBIICkCm2OJn4L2rtUfMY3oG5BRaDKaXa+jJXrht05Z21\nSeFg0IpfSEbUTBoJLR6wBe85gBnibjmCOv97q/CfuWVZPeqz5L57/trvbu76\nEREAnlqhxew4i5mW1ewChslPxk7QL2s8nC8G7cokpvNMxx79dXIk2jUDB0x/\nWPbXGw7dnO2uV2MpKAbSndTjT//b+0PwAMBxx1thNyCozJIqhqc0Ni0vx5mP\nifrA383voixGAUvnhuVLxp+N8fNQx49fGDMWLKBGcwyv9I1tgHTgorYE3Nu9\nGByg\r\n=GpaU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.5","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1629770685355_1629770746632_0.6171627281760503","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1630289079100":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1630289079100","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1630289079100","maintainers":[{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9e094f619a4536c6d99d10910fe93d1766bb0c2e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1630289079100.tgz","fileCount":7,"integrity":"sha512-b8AOv4kaObJFjCX/qMXcSWk4UORaPFlmJggexgtqRL8C3exGAGxs0+XTsZCU9rDFEGgso0pN8RgTxWN3iM4iew==","signatures":[{"sig":"MEUCIQDNltBt6+OaXOvWKLt7mOaCH8j2hNWJ0kE6V8hW8fxB4AIgb8iFCxAbE315vEzebz+eQy01CJcx+eqqSER6JPRDma4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLDzkCRA9TVsSAnZWagAANJgP/1RHPuFkg8MIhpRY+XY9\nUGn5vY+OQurAIEfZ90npVfk8p+DJ01EMY0M4eI2cJbpLxKEmw6tthYas0FV5\nCVNyd/xNF+KnC1r8Cb20ZWip5a6jJwUh3VdH3c+PzWYq+W3FZb6c2EKuVgiB\nBPCfasQW08uwkIZ99oCSpE2v5U0ouVy7QcWWMNrgce00LVBbjTgZmXCuo7FI\nc6JG5H6xVvKgO1EuWrj6cSwOz/PF8EZFI47XarIZhN9M1uX+qTmrETo/w1IH\nLmJUXqfkKtZDj/0qTgOzuIqillKskMAKTIv0Uifw4IiXkHm55i5iy6yGZJ6c\n2HK4nHW9Dh3LQ15OEGhPUiBnECAgPOMI9aOkak0cuyr4/6UBdcrcwExHcIwB\nEnF3ibkgFfKn2jetXHIjhYV5L5Bjr0KSTwjsi1oGubThDwGGYPeEvfc9XfP4\n176FjQHIOVuMX+QZy9JpPXNPCZxk4dfEgNnzqiJk5E6BwPr1QyIxkQuJZmPb\nPmJ0xuEpNqus2P9B1KawG+TS+ItOLbn2TMeF9mCR0Uy9jhkqJOoSyJQR+avd\nxdrsio0tIkz2EvgqnjH8xWFDu/39LjqxwIbrQT5lZo1+zsegsKGL5vV0q1Gn\nXXe5YVOqLo6Ul5krFQJiJivajWzZaQ5ifToemSYHBdyA+OA/+Zs3LqEwuveK\nSffF\r\n=u346\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.5","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1630289079100_1630289124726_0.5611227472134814","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1630289079081":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1630289079081","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1630289079081","maintainers":[{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3d8889f112dc23555191ee014495bf8fff922663","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1630289079081.tgz","fileCount":7,"integrity":"sha512-4CzNLn/H1PNZVbkEW6L9SBv8TsdE4+IV+Hn0d/RwXnxv0yhu1lOmlq2+N+olSDdVtzyiV9tS+kRyGSw3eZgN9w==","signatures":[{"sig":"MEQCIBS4JRtgNHfbc0Cx79NGEk99Ua284WVW5uJDy6urW0sqAiBFJ+HY4cR3T4DQrjWccwsVIcupcR6+3CUwJnnHwDhWrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLDztCRA9TVsSAnZWagAA+rMP/1VXnXyiIRxJJui1rwht\ndB9lkcWVBkJBY8KvcTZGuZU4BdOz5TstAtIEw1O5zR+66e+DJi8AiMG+uQVh\nNEJsVJGu8S2amtaP+O6gNH4+9NgXOYDBcAKYkDrFbgyDZWS19Ox9DYtyyO9q\nerT09C5mvihzGF++GvhvzqAEmqm+UkJWEblwQVfj+gDHaS8lO19W+vlut9a/\nBqT9VcYP50JmKYfzbUkC5JqVCmin1hKUBqjC5lTZHzL+rnlseJPUQbwu29wU\njyFTf4z/FhHnjtIt9S4YqwMo5riTKMBdAEfJ/QMEGO2bIh3/RjrFM7ql1f6g\njIpiqM3RsFI6jzPp4A55zHsMRYIbHffPkO29enySzdXbrGZB15+YrgJdlQVN\nrQVuS+o742ozS187RvyWHrGP98O/jSKbxsFZnEorZUaqLIZtp505KM6U1tHb\niql760a/443u9BRkP/Bmkin9mAUu/byNx2rmQXpiPl3MdilW6ouS/rIKy784\nkWFvANqle01gaSgh9ApfADiVxrMrOXrb8AEK3o/xdiNtqAopaTSrU8noEBm/\n6Q7Ggexuf8488bidRNkdX5tovJXxA/0ewTFzVaxDMnqWI+bdhmFY9cRoG0Ul\n6c2VymouCX2P+0aufgvexvCl2C1aMTdhifIdc/B66UTCiaDqwKKHng1AkMhg\n3QYD\r\n=orXR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.14","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.5","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1630289079081_1630289133772_0.03552193337405973","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1631498730731":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1631498730731","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1631498730731","maintainers":[{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5e9d9ac2255366b0d1b7c10cc53e63854e13e366","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1631498730731.tgz","fileCount":7,"integrity":"sha512-8MzdNowe/xVLsecwOpBMThSF2QExb69s7AtPDEx+86gSGhku5D1ZQd97yWAVo5+JM0H51TElNc+B/CjaL9AlHQ==","signatures":[{"sig":"MEUCIQDetNkQhmJEzPx6zmA930Fw23nveUPXd4OyBNfsWH9UegIgXgGg/Ph4eei+gFmjzriFnqw1v6uHA3ksY68CUifleec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPrIdCRA9TVsSAnZWagAAXjIQAIMEaB7eLW2AHsLGbwex\no+so4n1rYBQAOHC6ri7FDfN/XqGHe3Nc7XJuS/yNkFFr3d+wSddkEMv3hVWu\nNiKLYXHpJenw09Vir+kSOZXKPtiiSgd7HNZ1H8ZP12X5cNNmwaTI/AXlajph\nTjbeN0QYVI171bnjkUkkPEOxslZf7r8DtJRylepzVXfXQqQyozr+JhKnyr6m\nThx7Ou6R6NZsqaPypBhV4qT7IHJISrxTZwYumdtevNCLpB1WCnBDLVM8YNQs\nyxaeYDJPP1TC0fL4pu0ywo8J93I1jBOIgl1uXzBXCwmWp9+gr306K/IcE7jT\nIYMkkbU7FKqLOpAN9Ep/1nqyNJHSQDPUG77LPa784GxrpdB9W0wEgQ09zXhW\n4I79ic7u6A2IjxAtMYbgfpLPzxtj7ri8rl7tdEGTN0u3QiOoMI9kSEvgXq+3\nQlsDsVQtTIC4RXTaMYtmioIqumSKyK7aFv64IYHsNfZNwL6TQVRZicGYwMzp\ncTGxrW6ZxyVZ7X+XYNoJAXQCfdgFMecu/4SugRT1Z9xTjrD0zTetXc6DW6m6\nQifnMS5xAJgOPgS8WLyufaI85OEzT0NcWYBpB8186bS6FRGPTARtCNXR0Yt1\nzersf2E6uryS9/JrXFuF4ToUG6IHQNMPdXjeXV1E+9BM0TaunUjbkUWimGss\nzXwP\r\n=aJsj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.3","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1631498730731_1631498781701_0.09685844963446288","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1631498792628":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1631498792628","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1631498792628","maintainers":[{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e41cf6233937a340cfef7106420d9a906b888efc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1631498792628.tgz","fileCount":7,"integrity":"sha512-YCC5Sy5biTzDaYhR3/xMZZkH67/ipABbyTe6fPnwsuVR/vYA1oRxrD7tmzLOAq5+6F5TBL62iCt36Rx/eFWyUw==","signatures":[{"sig":"MEYCIQDKlb4hUFhDF4l7nbcQWClDBzoC5F8x2FWbaTUkwKwv9gIhAKFUlXyz5Jq+DX+6pDFpjcrHcvhG1a2SAE7ocufueIZb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPrJjCRA9TVsSAnZWagAAhIsP/04B9QEiP6vPFR60AL5d\nP1ayj+4deKRah1S/jDyCLGQCvbaFLxZ+NaMI0y547W8L4EI8n+lZxHJabd+Y\nrwBNkMG/QUWveKnAWSOA70iqEOPEWMR8lQcV/sUZ+WVhWwtc4rNE+c1wJc40\nhjojr2gOIwYYOvoexBqI8elbZYAUkOQqSeoN0QuuWoit7AXuu4aoRXGiu71m\nDsxvzjtlzXpxL3BjUz2vlI0L1vKaOerEUbfLOeoD2egbrMPhgYt8+4XC3Roe\nVFJdcDI882cUJuRC/Ow6aHV/lOV6QkDC2n12e/xYeBOJDmm2REDB2BG8VukX\nm/mQCnQ03QeetiXHFo8Nz0OvXgxh0SYyxeRUrGxoLVADp1mw7Fei3glJWp6P\nYoI8dyQ8xLhTbSgt22v1BcF0d1HNqGxatGX/jZjcnzqrJsgfj8kLXPaq4ec/\nQpA+zPP0qjbWA6RAhF4Yuu4Pmz0Ujye9WEvTQ49ygNpMURbypeYmmrZmzvE5\nM89zaeL8KKOJ/rgPM57n1udse+i0goeYTDeeXzaqCqCS2KdLcTorvyBFlkyG\n5pWogeXJDeHdpvAHvfb40/mqOqCQr56FO7nm+52i2oVL6nHp2AHTXL/mhnKD\nzK7mLcOepR74m2814Bbfs+PjMb6mhWxnZ9JMhnZM7cp46g+1c9pDfMPyaJvt\nF+L9\r\n=xFPd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.3","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1631498792628_1631498850938_0.839479846158101","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1632103570590":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1632103570590","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1632103570590","maintainers":[{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a0390094160ac7a24a4ec79e8d863c04cc1920fe","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1632103570590.tgz","fileCount":7,"integrity":"sha512-rdK31IkzL0XNLWgsiXKuLP5Lx4nmzDMT8n+8kjJxoVv4zvpwyTkktRghfQIZp3kKisyqBngnDTlEKKMKO1r6CQ==","signatures":[{"sig":"MEYCIQDR0NBbtEoX3zjtuhtg3/cMlu0uPPTXEf7CDgkbqQ9w2AIhALSLHWJMW3SK4FgdaS8ZHZf6I2vyTYOU+3m0nvIm4LIJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.4","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1632103570590_1632103628578_0.640307608301488","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1632103574145":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1632103574145","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1632103574145","maintainers":[{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"721e0d1de3c8342d14840fb623b36c48562f8dde","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1632103574145.tgz","fileCount":7,"integrity":"sha512-B0iquD9GHAEHTrry7W9GkrHrks35xlJkzXN9zkddYvc/BCw7d2mUwtxdM0gW48Kw56JbZTDk/fb5S582XVPitA==","signatures":[{"sig":"MEUCID67W3e7ftuUsHVkhy95xwaGLwbTBcrw9y5B40mW6Bk8AiEAy73/Grxwc2xJr0An3yoQwdaw2aFG/EyHQ86btGVtXKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.4","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1632103574145_1632103638130_0.9359303346953918","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1632362727891":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1632362727891","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1632362727891","maintainers":[{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a679602afd61dfc9b76f3a374e537f9e76d29c65","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1632362727891.tgz","fileCount":7,"integrity":"sha512-VARsYeekt2ui8IlzzgZZVO/8r30GgFlGHyKNBFDztrMoiG/4FDBaRZzWnSz39B0p+1KoKILIAg2V77Fz6Maprw==","signatures":[{"sig":"MEUCIHD0WEhaQh2fs008J4ilxz5Xbw93Q8TdM8zu9IloUHjKAiEA31ZvT5SPNFt/kJLQE+8eXuv0l7Ji/QlDGMvFfWahHio=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1632362727891_1632362786335_0.3952592571811664","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1633313489338":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1633313489338","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1633313489338","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6527407e2b4af756776f3b8825359a7f34959b06","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1633313489338.tgz","fileCount":7,"integrity":"sha512-CfTEcFRedOplJh04jZKv2YLnF5x2uql9uq2LRfPk7N5zwmIbnk9ExnIOHTdDipOzy+DvTqk2Me89+ALFGfVwOg==","signatures":[{"sig":"MEUCIC9AeQXfKaT5XPrAwkXYDcoQXT1Onlb1O52tp1i1UBcrAiEAj51PcJcsRSufkmv3cSuoU3OuEMaFT//o2HI9WyS/ofg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.5","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1633313489338_1633313546227_0.0556018350408094","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1633313489902":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1633313489902","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1633313489902","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e70033dcbe4d9c1e97cbf29224667d5e2398a3b6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1633313489902.tgz","fileCount":7,"integrity":"sha512-zcy4FDdNlSH1LZbxQy3vMzx6rLmCCXXI8YzmXtG7Xcr4cuSu1JSVFMV0sca5YktoLKYejuGj7Gfus0QPx3XOBw==","signatures":[{"sig":"MEYCIQDDPnZCpXDu98H3RYWE3LJyT4mX0j0zYLabnAnbwrCiwAIhAIHOBY4nL3VcA4CF/BM0b3SqffQERlyz9Qaiv0mS895y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.5","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1633313489902_1633313554431_0.39638144734","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1633313522188":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1633313522188","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1633313522188","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"98460ff8290712227923c63929544b23c6400f66","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1633313522188.tgz","fileCount":7,"integrity":"sha512-yBe8iyKoojidl52NRmY8ToTvj5O82K2G6KgimACmohfkySrOBK71CWRukiO+in1I0BnuJ4QpgwPCNmfv0zx0Pw==","signatures":[{"sig":"MEQCIGhY2ggfRSAdjLHmDEaAmfUxueDeLVc9skv+G5cuUbtHAiBbynDmOC+bCI9FBkLGWtJ3fA7nE0d6J9ktbY3I9HQd1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1633313522188_1633313583972_0.3546971446588798","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1633313549218":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1633313549218","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1633313549218","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"db0c62da9d29b4319c60d023dcb241bb611db09e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1633313549218.tgz","fileCount":7,"integrity":"sha512-99n++H0+RTqGnaAGq2lCYmIf7sAVaFt1RW3afpTR9rKdTkA/hf1TpRdtQz5MF3eik+/lGo4XtoZzoocoDOksJg==","signatures":[{"sig":"MEUCIQDZQGV0jixCTtfRv5irLux/uI9V61elXFRP8X8HVsVxKgIgD7r4riEpdkxbLC8GkZzaDcT1KH7GekQm4Z0WtZMvfYk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1633313549218_1633313601563_0.49640611446100924","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1633313550714":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1633313550714","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1633313550714","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4338a0a403c7dfc81680f96e1a83c806af233bcf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1633313550714.tgz","fileCount":7,"integrity":"sha512-mPVcnah7yGELJzoTTqmreM2w47cn5XQVK0ijQ4h7FHqLobOzi4wB5i9rl8gbo7Ojuc1PZdAuSz/dhyuzVAGZKA==","signatures":[{"sig":"MEQCIFzsEEy5FXmkYRtf9BeBBjLxWOAA+X3gHxU/Ub8H8yksAiB0Fusf5L7pJM7bIB7X2zBw19m6C17yfJcwSDOODZWDhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1633313550714_1633313609327_0.8569766037743993","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1633918115097":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1633918115097","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1633918115097","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6b5ff0776fbc46313760af980e9d888ea259a11a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1633918115097.tgz","fileCount":7,"integrity":"sha512-Z5mJHWBTEJk0+L6q1PqgT3Xh9LZCHqDNvDS0mKUjy/H0Js/ybrYQ+fdGcS6LUoDfViN4sVg7g4o47LtTYjE6FQ==","signatures":[{"sig":"MEUCIA9HyxXrY0rQU+6cDOoga9PLbSoLiWrpdIOFyHFq/pUbAiEApValHWJO+uFfN8fvEcJfq6GwTJxRXC1y5twtigMRoEA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.0.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1633918115097_1633918164593_0.4597647539646561","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1633918113970":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1633918113970","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1633918113970","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b5144190cd844f4abc9cbfa730fd74dd0a84b49b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1633918113970.tgz","fileCount":7,"integrity":"sha512-nelavUwJiKrW8H0I+lAb2BRtL8Glx5Nx+A0saQ01eiia3KXhO8CVDeoStH2VVIOM6/lM922OiJ/uJeb1PDJAcA==","signatures":[{"sig":"MEUCICLqrKGZMcFhrglh887ywZODqTqU2ruro+PFLtHXHSILAiEApFTKlVBVoSI8E0vTvj9PXkRPLFhJHMsgYuT5od6Rn2s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.0.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1633918113970_1633918171119_0.8705413142576872","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1634266721163":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1634266721163","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1634266721163","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1336d85dbaee1b6d58a71a883a458641544ddd57","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1634266721163.tgz","fileCount":7,"integrity":"sha512-gXbg7WtXYnRmp2TY0lKsr430VoTAA+EGVkcRsWzLSI30/E468oB/55SSQI4JQhvMCu1D7Qgfcp+QZ5pD94fhKA==","signatures":[{"sig":"MEYCIQChA7ktsiyuwkiEUidmc8wiLeS8L3BsFv93qGJI+QAMPAIhAIR78KK/bElAwhWIu2aKpvIYKjtayz2i32/Hb0/R/Hui","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.0.1","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1634266721163_1634266769714_0.2821962216787621","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1634522684441":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1634522684441","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1634522684441","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5e210df0d35bee980e179245a3a23aa4d8ebb6b3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1634522684441.tgz","fileCount":7,"integrity":"sha512-9yHIZlUPCZKwibn1THhmdiIRyueD/h6+kmJ9mqgsXksgsNp9twJnfDC0q/qq+1oM4gBa5BXEzixtQFtjmPXUwQ==","signatures":[{"sig":"MEUCIQCAYi9zubfd2ND3xs1uQWECBvvJSUKPWInT01GmxHuaiAIgLPN1q6l+ge42i33l4sIoPDZ+G5bQL0W/lKyObzOSmJw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.6","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1634522684441_1634522737254_0.8191945080181806","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1634522684450":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1634522684450","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1634522684450","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5358df6ef1a602cf6732380ced5b283b499d987c","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1634522684450.tgz","fileCount":7,"integrity":"sha512-cnOX+hTB+SSxrg1cQofuJeBds2A5sx9Ab7vKajhe2wYsyiOrdIPc/c7iN9sBEWeu54wVbqPHTlge/Os7ulns9g==","signatures":[{"sig":"MEUCIQDpMZYyfLX8XjVZkfpCtQfkMRqAWuDGfX2WbKPmb9KY6QIgYUTrwQdVCiXbCm1f3twRzzYEeXr+1XDP1KM+Ag0DebI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.6","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1634522684450_1634522749345_0.8820279354219236","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1634695531157":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1634695531157","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1634695531157","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0889755053f6cb8dadde147a0369ff60a4f070e2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1634695531157.tgz","fileCount":7,"integrity":"sha512-l8hs+aZL9Oagkr/D9WuU+iL2uM9+8G6BKsY/8ce7ufG2oz4igdfyhml7Qa/r3M8d6OAvaYWHYTPO7ctUrGSJWg==","signatures":[{"sig":"MEQCIFBYLQxPf3nubJs+rNhlAcsls1Y47kInrHja3vnY2FpLAiA4tc/Qf+u8btYvKwgH68Ksfq5T1Cgz6EPeLWD4N4VEiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1634695531157_1634695585582_0.9552743258700431","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1634695533097":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1634695533097","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1634695533097","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6442797bc9309f4366816b8b574ce176ab2ef1c2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1634695533097.tgz","fileCount":7,"integrity":"sha512-YnJXifJ4HELOd0McX60I1uT9c/Z1XyPIyRqblsXjFR7EIA2xdpAZ0XKb9ucHXFsh7t/0G3JxEVXGntgI3K/MIg==","signatures":[{"sig":"MEYCIQCVhcH14/qRPcO/U2T99hR2zfKeEihQOLfjBrYA7h5/XwIhAM2E6PsnfHU5+r/43PERYnlSLKwDHf2JXtnM15VpudHB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1634695533097_1634695593281_0.02025071275840995","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1635127716251":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1635127716251","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1635127716251","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"654d0c3b65ecb0da55a7f10cbf68fff266188253","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1635127716251.tgz","fileCount":7,"integrity":"sha512-9sGk/4sqBKv35IfHFJiQwATeZtpNBcSPMPbaWzx2Las4Tq2gMRXeSQE96w1vdr1LhqFLVR+lNEGOE8GLN0LBNA==","signatures":[{"sig":"MEUCIQD70jCGJdSmy2bh/8PILFeK8BD3475whgoFkBjDuYjSqAIgfBYosYAfPlBQ0c60HTZxpv/ZJOCfh3ANVROMvSkTktQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.1.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1635127716251_1635127765469_0.14651282758778428","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1635127720322":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1635127720322","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1635127720322","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7ce165a066b02d9120f1a73be179a509b8720782","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1635127720322.tgz","fileCount":7,"integrity":"sha512-WFBWBXlY82N2+D8qeQxr5tymKnbcSPPC3f6aMXFrV8sHXoIhrVpKYxIrEWfSTOi2rt0fla5kvJefaLEIjlcVgA==","signatures":[{"sig":"MEQCID+t8fqV6PAcJ8S7AdVWnUBsbRQ1s4NTrh+MgqWAvprsAiBETMZaGt3zdD91rEpufZN8U14Sm6Fna8Pd17uHCw4tMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.1.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1635127720322_1635127781709_0.05247326432783472","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1635127783059":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1635127783059","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1635127783059","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"71a881dd4c0f077da7952b21f2fb06b7a51bacef","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1635127783059.tgz","fileCount":7,"integrity":"sha512-DFWxDko2ayEUJLHqxXhy0Um+iHEGWWel5jAULVh5IgSQyMBRWTXXtfwVf5jUx8jCy0Z2ij/L+IP1vHxtLBoDzw==","signatures":[{"sig":"MEYCIQDcaAP47SEZKzPSOwQE5BvsbWy5ny9rrzkiQx+eP/oIHQIhANQB2nSbormFE50pcfwimWREV9P1q+naKZ+z+/l07Yoj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.7","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1635127783059_1635127835226_0.6577774575079396","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1635127781356":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1635127781356","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1635127781356","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"24b6b33ee357ea03a7d0b031a9743e63a8a1c4a6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1635127781356.tgz","fileCount":7,"integrity":"sha512-VuTG8j6XZ6UgX5iMXU2LFe/DeTsqwdnQzoYLvLQn9ztvckeuUYxt1tZ6Dk5TwY36VyenFuymcM0GEqm7gay2hQ==","signatures":[{"sig":"MEUCIQD9ILepGfg6qItsTwNCrIC8Ma9bqAyX+U/ecvm92kYduAIgBof5/ofZzXVW+SrRtRGUsXqOwafeI0Vsr4fl/Hdddt8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.7","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1635127781356_1635127846711_0.041703789197109487","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1635213919249":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1635213919249","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1635213919249","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b9cc4a126d2776dd78ce3901310f615f38ea039b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1635213919249.tgz","fileCount":7,"integrity":"sha512-VWR56442gjv7w2PEiSwEMbp1rlKzNzbQl5xvL/IgylxZddo2Vdin3r8X60NJBBHcxEq+EaCwXS3PK3q7fngXwA==","signatures":[{"sig":"MEUCIF8fPkarrgiCeo5ojArQ1xZZvmQZ69s4knzQ5Qy+SSbpAiEAz1E6HNeJPFcns+NDFZDE5OOykPXwxTM5MLQdhIAhvHo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1635213919249_1635213977788_0.5900332302521953","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1635818725149":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1635818725149","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1635818725149","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"29ff8ed49b112d5fb77969629ac9fe29bfd3c8a0","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1635818725149.tgz","fileCount":7,"integrity":"sha512-daZTb/fZC6po/M3/z9lIV5GTvhPdzT+zEvX347ix73UrMxs/llmTpPDrF5Bx11HGNhdHId++i02IWmbAvTDCFA==","signatures":[{"sig":"MEQCIHbBMQ/S2Om9I2Hi8mgNfbtHnhBA5s8sQBFj0YunxtcAAiAkIAeREYA54CFs8bHdN/tKnNYtU3hEk5FaEoieCbGkuw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1635818725149_1635818784503_0.31366119879505105","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1636337272893":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1636337272893","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1636337272893","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"511f8466c0d9ba05ee0128e3beafe0464ffd6c6d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1636337272893.tgz","fileCount":7,"integrity":"sha512-VKfzMeppMsm82NBI5UqZ9rYKa0T9xq28Gltu249KVXn5KgliiZCUqXEyBM+0BAR8caFfq749tMVvWoznITD3ig==","signatures":[{"sig":"MEYCIQD/VIp95BYwyEdpvEw7l6M4aUjvkBl68/8c097Sby5BBQIhANcO/q88QrxrbuPPAPVi1E3IO/Q+x9fdW6cwiOhsdylC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.8","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1636337272893_1636337327127_0.3711579672148644","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1636337338557":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1636337338557","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1636337338557","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"298561e9adaec3e9c11e510707b05f515050c5f2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1636337338557.tgz","fileCount":7,"integrity":"sha512-9Peuqp/fS7Fbuhzi0sU9459zY7A+Vylu8TxnIefCsC2ken/SAAIA7PtjPurqvoobc0Y/CIpmFoFatc+KpYLhCQ==","signatures":[{"sig":"MEYCIQDhelaQzNikglHcKXMkt0Dl5/8HuA8MeikqdG+us6fSJwIhANbFxdJfuc461HFywcG91+nM+q8mBH3Ey5rFQMXzDqBX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.2.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1636337338557_1636337393641_0.6413381504629974","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1636941921488":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1636941921488","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1636941921488","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fcc7c5f4f97423403820ee620bb27694cfdf1bd8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1636941921488.tgz","fileCount":7,"integrity":"sha512-rDAdNBoFjqcKUbkFU4eC66E3Jai1HTeG3BTuy3YUhDGaQzt3AJ2vA5l78fKlH+NhtRMMVaps55CVUEtKrZJRPA==","signatures":[{"sig":"MEUCIQDrrUDN+esTd9zt/KEO+oeljpnbdCGIZ9LXSHiyqRAoYAIgMfod4+FrUs4LhaOCCAJWO7w2tqRFJv69KYp3qujEdos=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1636941921488_1636941976506_0.19231485797994674","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1636941929957":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1636941929957","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1636941929957","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f06df438cf30d606f5bf5691bead073a6fd748e4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1636941929957.tgz","fileCount":7,"integrity":"sha512-PvU5yQPTPXnJRBggbKNi0gWjQnVtinajixUjXlqa7CN4VO/vLc8xWuZNtkZWmqLsjh1106CB9qL/3RewHE0n5Q==","signatures":[{"sig":"MEUCIGdZJYsN7sZU/LtsFRfmaJ6Iwkm7IzPWf8n1rZjKEFd1AiEApqYIHMxucm2+XB3/sHrXEmv4Jn/J8whaQxxUJNiY7Ww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.9","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1636941929957_1636941988820_0.7311906027741819","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1636941947089":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1636941947089","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1636941947089","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f4dd2504f69640aa2e88a7e521e2efcf0feb2013","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1636941947089.tgz","fileCount":7,"integrity":"sha512-gqQO0YJGKY0d+f5VhmkqKpZT9zj+BTjoxK3yVE4etALEHZ6IBq56UxueyZvWEEfVAhkrRikCLLM8kCBLM9yauw==","signatures":[{"sig":"MEUCIBhQFuupjCqaM6hf4B4HTndNx50Qz5Lhurw5AwNySYLEAiEA1mgiTdTCbpkBi/9ASRRr8+E5q8kgaWPSLo2fYPbv0F0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.9","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1636941947089_1636942006774_0.7836227203196815","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1637546963235":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1637546963235","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1637546963235","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"daa9e0384172d068a9e183b9662d7fd77df337bd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1637546963235.tgz","fileCount":7,"integrity":"sha512-FBn+AawzKiRRCTLclE4KP35pk1oZEog6J7yUNOB+D+W4D2W/LJzUnxFc+7GpoK4cz3RYKMJ5JeZwu/fkBojKkQ==","signatures":[{"sig":"MEUCIQDCiTFyplLcMbmRbr1QonhsDLk5dAq5lzLiO8UEAABBJwIgGOG2rw1T0gGClMCOgHPbwRSauQ/sMfRDq4XOnuNFdRk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmvwMCRA9TVsSAnZWagAA8WIP/13T4Sw18i5n/MQ2fV7I\n9vtINS6MmAaLKUtYyYiV/BXkouo++5kmGHR+os5ElIuDWWpQKWIEkkWf8P2V\nWa0jAVQ+kxSdrHJyQYunazR75sIQezJptwXwwydGyHKFDFSPykU4LOqNMqzL\nithpe67u3Z5MCF7g5SgWzbpGCg52twbAXVUanzMj6O8pLCicUz4fY5g1SC4F\nje2oTdEWO1S5L/pTA/wyOxBUPPvT9zRxkGPSDBNblufuGaaeLfjAM/aNnRn0\nbFgcFETgxGa0opnpWbLgbJ6oIa34QNeLTnTzzuT/uELbTA8TZzURAFj/3FbM\nOYUo+ik4z0AjAW24R1WHTtIOrbb0JxtH6Vl5FlExJEgzNitxz3WGGknwus7f\ngu1sJd77IArFIyPBgt/5LvQgxobbJQG/1pdI3IoRZ8a+2lQ/oS2MaDZCALoo\nD3rf/RVuhbNZBclLtwCXnCPBjtZHOxbcFJ52uke6LPi/y6NtJEidPARnHbsW\ntvC7YWrdbLiH7tz+mQTdkqRpw9dJbGItHmHZeqv7OyIPr/yRBPIkl5oLBeQ0\n7A7ObrAvnM16HInw1wGhVsj3FDvVxFR9HxU1yWjR3qeqsFLwBGu3m4xT+Nhj\nGmuLU36AZrHGbOjcz7mx0TkUIsHH7mwS/P4ZS/LmMARHvs8i9CcSGxLBOfxU\nP6S3\r\n=pghe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.3.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1637546963235_1637547020548_0.36868711152608724","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1637633189802":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1637633189802","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1637633189802","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0307d8b84ee6442f10d49834405a9af22c71cd92","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1637633189802.tgz","fileCount":7,"integrity":"sha512-aWgZwSej9RjC1Za47TGNSo1xEia8YYHsLeHmW9gHcA2LWaxliVje1TjPP7MY1s3Did4QvV9k1pLmwtone5gxhw==","signatures":[{"sig":"MEYCIQCDUskJcAvTwQCh3O+kA++0A4tM5Ls0iH/q8A3IbmF9CwIhANBrOVU628+pl37J/KP6OoZEl28GH9BYKBsjYKRcvwcq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnEzXCRA9TVsSAnZWagAAuOcP/3E94uk5x96c97L4TW5C\noG7SPtbhj8/oxGDLa/giTfcCAkeOC7U0Zg6ubXRp0HMxMku5xu1mPCeSJFOM\nRXwBI7+w3bkwnA1FgRvCpB8/jWyDUu29jEBlP0Bo0Cog+eN6oaNVjaPjKKB9\nvrF/d8mT9dOX9xggFnaf2hKnKuTacrSyxOfM7BHeUIR41zaVtcAU010cV/fO\nEO3WSnIPm5N9NibHDRLpwOc1IqZllb1jo9jsYXtv5PIXp9SG9X4jB365L8lG\n15+ppGhfxrodTPrgApFAAm0ZHArf+DfyQKyUWXHCHMyp25zWs+pI/JpVkXy+\ndF3ZGZWMSgqQm6y7xi2VfJhVYapLhJnWd8NMXo0x3CT1Dl0ix3/fxKHjTFYK\nLsQVTOAS9pLZrAwYhytuRpkaJYf9/iyTSHVZBacbF4VBuLfidVSxkVtRilQG\nCwkluJM+sSvwmv5Oz45LuXJQe0BA2NDSJo8WXQiNL8/O9+4DzyTtFMPbEX1W\n4Ca0MQZOwMMYORMya88fJif2OV0rVnXOYR1UwZlyeCas1EOPLbR8q6TzuTSP\nmLHeRVG6XFaFDMzH5l2KwM+PPqYr4bxXxGYW5ij6deVWHXlDtIzF5r1daROw\n4adbMgiR7gE7TfOVbFo+ndWspwQo8dVnqN8dUzK6t2zSALNiBbsZpashj4np\nbc1y\r\n=cHip\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1637633189802_1637633238821_0.8548289461348317","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1637633190895":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1637633190895","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1637633190895","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e17e8b28bea7c3ce6f5a757b4d75a053ea71bfd9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1637633190895.tgz","fileCount":7,"integrity":"sha512-0Zr12NhHJ2C7fW+3Ed+mLDV29wOntReNINQGley+5G3C8hg1YSXx856yc60m2sDPEMoUiUDFwXGWryTg5LU60A==","signatures":[{"sig":"MEQCIHT3BdqZ+A8bDahceqifNA2w0fiRTQSrGGviq1sKAibEAiAOSooUqt1QqdsYlQM8FJLcsoIcijLUs0IMCJNLLJZjqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnEzdCRA9TVsSAnZWagAARKIP+wVA4BcJdQvR57IyNF6h\nkU/QzpHoygCg993u1t3qUSuDXqUYm/BvToTJw4bJ6XV5dOChwSWOrH0y7EYE\ngDTVeMlX3/Vr6CXCab+e/QGhmDK4eMK0joYuyqUJ2WXbUxihoVTQz6X6kTqB\niACqMT/GHykpSwgWeoF2InPv8EeAxhLnYvimSOl80gGXfOaPADc0PLQgI1ON\nbG8Y/dlCF7NKbJmePp3NEvjMXNg+Qp5ID9Dwxb6K400D76AH1O4H38Jc1Uer\n0Gap735/iXJ8pBSm/3mFzg6Aqx6vt3hLjbhYLsw3gQjUa0p9wqLNw/YT7EVA\n2W+Sn2zZZGvvrl9FN9O2hgZCeIdRfAQqsnuXPNZQsV+scuUQsh5+9WwW/eGl\nhaidWgeBxrbHUyiicI2TtKkBwiWpb2bN5a/uhG7Zbs824haZn8nIy4l1ztEm\nSLpqtgDNf2pVuob35mBa5foAeF8soNH3HSnokJWBkW2qjNAUwmlfAFOsR9/c\nLPKjLp4WeJ1+uujSG9WXmoxj3cMUNS7iUOzjTE1tLtucbuMBKX9y1yA0roXR\nlXA5WBA+x/usQpi71yPCI1viYKXcVzZyFG/qWpm0cjd16c8fOnMXvdt+S+21\n+ZCiXdRrVX1xyOyo6HuQduTyAy5yWKp3ZMGV8YcLMZmZb6iLGcteAjN1O5hK\nqjkQ\r\n=Lcwc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1637633190895_1637633244981_0.8557875986525185","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1637805878026":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1637805878026","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1637805878026","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2c4a5984dcb1decc682404eddb6ab91923d5109e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1637805878026.tgz","fileCount":7,"integrity":"sha512-GzNdVoJ7X/ogBBi+FgpfnQ8AhGJzavYFJgF7oA09RTSd2DojWfghL///rLdzx2AN9Xk+yOBNmitmiBDT2OHnJQ==","signatures":[{"sig":"MEYCIQDnrFFb854o2XolMlN7JPnqyve9N3V75+ODx6e2HX1NUAIhAO8SzgmsBofK7zZDinf5qLIT4dmGB7DZm1w130fS/imU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnu9rCRA9TVsSAnZWagAAriUP/0k5/OaKlxjKt6ILjq0o\n7K8fiqfd+6MRw3mFW5VOqauAAHA/OxIeXZlg0T0uCzx6ruTowpw9K/E3O8lF\n+Tm00WN1wDDLcFi2yJRfs4VgEeR0RoQVEJAOk8tVounjEOIJcmJGwE2s69UG\ns0ZHs+3Ah7v3b4ofAZHn7iXPwggdszvr4SuSlhAHYWz+OUxTpo6rwKj2jjBj\n6zKyeTTb8+yqNVLUVDIReQP4eMpB4iZLAgYeakwxncf4hyidWAqtr3smUPs+\nBuOuTxQamIXliwPeQTDLELi38pIzZstoTuBDGuS/hcDhwz+Bn023DnmgRKcK\n4DdiGJHC7cjzN2uDPVaFwdpB2xdpMsPzUOvJYDSFSPyKqzYyOBa5+0hY8H+T\nxyCu1WfEqysFp6Kw/mJAMFL6zbFrwb2C1uzcSJLdsQWmZDY5UuLZjbScF1TP\nR6ZYPhv2LbWHOUOvOprelxqD9dVt/WjtFA4AV9cAuIFnQ9PjXAcsFT2VgW+E\nTeH0YXuiJXz3hkhT71HHd8CRKrUCnI9OCYPY42E5ddmYtU4LPXnhM0ZSN+59\nBqIEN4XLPgDzbyFfp1W3f9mSqB5yRkcWyz2GE6Ofuvbm66uil5bf5bLu7QLE\njzaA7iuI+0Cp3GJ4hmIjd78kxotYW7YywDjXkGhcHv7AyIsWA3i0hBW/D9yH\nLCrx\r\n=eQzI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.10","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1637805878026_1637805931626_0.42857033074745954","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1637805882963":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1637805882963","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1637805882963","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1ad5557c0c2e76a860b75273a0ee038be8352b88","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1637805882963.tgz","fileCount":7,"integrity":"sha512-Osw/Q4Gw1u38PclFueE7CyHcqesd1PbFxkJWS6F/yZ92siFanItZ6iCrsNOzop/8wXTBfOkSV00N9ThTePxohQ==","signatures":[{"sig":"MEUCIBKTBk1D49BzRAjv8F+V7nTm/vOViS6LJJirdWyCNqytAiEA1fI6ZLun0XM5qWzDEtL946/nAsavOTuWLpby20gPNac=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnu91CRA9TVsSAnZWagAA6ZsP/1I9MiM+6g1NlnFaHaVk\nxw/im/6ydM6t0cZZmsNQyKuLRHnot+lyRXdGMzY4Glw6Oyqe3K8pxMWNCgmp\nUZICQTlnks+e0+dz6UL+Yi3Xpw40pizaecbEZRWN/YvX2g1+Joc27WUlquK0\n1X/4afSad+8zdrXQuNviPeXKAtgqifFeI5qodvtDRnysZgAi4rNHYgeQbXbN\n8qdElmUkJ+B5r/yZjEJX2gsBfYhISh3wAbQQSVIVCiAEZvJLvA++VyiDkNRe\nPsXDRRJBXyejEqWLZi21WzB/d5UZC4cj6KG3EGQCUD1MyFFPB9WxuR+q7asr\nDrmOTFx0kIDUBw66ISr2VWA7wJMSwqmdQf6++pd1XdS5fptXoc4V7q6jhXPC\nrCC3tQJ/GfklJL4hTdwqT3kQTjzajWKce8IVpwJpw/gd+N9nuguAvSOXd93j\nNmspzeoAeyMZKu3nsJqvK9/DpFithkoEs+zeHpbb/NNMu5Nk5TtLHt2VGHSg\nY0zj9i6FWuVc4Ha++lyVDrv1/QX9bcwIfqBT0aiPB46mS0iWdzOvLeqjT8md\ndwAkRka7XQF/JEer+YZ1s+geooNGI/0yQiEwjdo94UWwpi5JCisGUVGK7/NE\nqarnQqvdZmVji+Z03LkoS4MD1+EMqervAL3t6Mr9ImDz9S1drQxyG+tLEhkw\nza/C\r\n=zXMY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.10","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1637805882963_1637805941263_0.19362534858546332","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1638324424727":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1638324424727","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1638324424727","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"878380ab3609fa28c170d9e212386272914074de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1638324424727.tgz","fileCount":7,"integrity":"sha512-9HE9h2jn9qic1S5MRCFH0AiZ81+GKE+X32F8KaIta5SevGmv58MrEKO51jWx5s9LdWjmmqLUhFexK6jiP96IFg==","signatures":[{"sig":"MEYCIQCdYUMcp35RO4VcJDR+5DkT9J3zd1JVfpu5I6XnLdhD7gIhAL0XFSn6g5q3LmooVe7OmZaiCyGDTlKanQFIbxPKmTQI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhptkDCRA9TVsSAnZWagAAXjUP/1K0kOYV9rpdJMCnaFPN\nE9XPeUjfACIvZBm7vFgnyzfCqfxjdLCM3EwnoMNLh31hqN02C6yLa8a2C3xC\nGQ8RyBIEeYW6PE9yR/njU4YS4jVY7wQFq2iqBOlUMwWUay8La3moVKqQsNHp\nnSV7G8wv6VZed7iioxmZ4MCbI0C7XOPlr6KFB60fDf+lirpRBidjDBSMkZce\nZ8e6m4xXKlAB+3ymQwTJJTjntMtQIOq6k3Tcyi5hOQnch36fBncYnGNAdowZ\nMEri/r4MXwvc+p3DVEtZYY7PZRQDmGyW1wzs6iPYD6aAt1zR6fCE3T7sZBot\nBAUdifLcIz2mBzh2NqvKajxHAZ0R1Oe8nKt8LOrwW6dzV8d4EWvgggpcGdvn\n1J8MsMSqYdtuuTY8Uc8oxGt8AtTQbMzrdMYaWnGkPk4bK+sLcOWVcJLSEiTM\nnSBKkWTnkCivixFBI+X4GtQB+h7dCqMxaW0CMiZUT2TXOSSsxnBQWD+TLD1P\naUDej9MZ6r/Pfe2swOrERGEvMsa5lOyKmOrFnUN9PyiTaHoQo7IlxNDrENPA\nSs2FgMEbMr76TzBt8Ug5bRrkUjho9vfuexEt3xt42uWX46JnDZ+OtT8HEnRM\nwuY99QwPYuSSvfI62/Al65obussm59UQEouIWh/OekdqjLhltyffTzSKhXiD\nHxgX\r\n=vWyQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1638324424727_1638324483335_0.8732316388555867","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1638756488093":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1638756488093","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1638756488093","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"084cd196bf5100f28b154cfabad137501f927d24","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1638756488093.tgz","fileCount":7,"integrity":"sha512-Ur298rstXqrHvIMyjzfGqVkIWDnP+aOTCUlY2R+pd8/T/F0SETzPBKy0x33Mqygz63UpT2+PVQGgX3DD3apKWg==","signatures":[{"sig":"MEYCIQCjfoFbmUXRMwyP5Gvt6O6Zdl4Ubcq3hhN2lTENBxum7wIhAP66OQBQTHfnWUx6WyJu9SKKzC5sk5M5sYLarccfXE0j","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrXC7CRA9TVsSAnZWagAA+I0P/Rdl8LUWCtPVFnqtsYj5\nmI4TSijA9nrU2/cZiqmTa0TZbaao8hamB00y2jqS02B1ebaieddm2kCC6irm\nMkRIb54d7ToAR1CmiNogYyy0wkmvKbIqwiM1a9yTWFeO8A4imBV54srMV0Se\nnoxQA9JP6ZHiiS0xZelkrsQlgK/WsJNDIl8VrKcm+vR6P6TWSVsJwuQpPMrL\nebYJAFf+WfWTJLeQS/jmhcwGlVmqlZYclthINyFKvLEVkUxrw8vZ/Pnk1eRl\nspba1Zf522GMF8QQ6Tq97WqlydiJUsMxX7d5AQVvcKwcJLBIn6xvy+oZk+2n\ndBExkepigpkWhaHJAUsaG3DOden4wylkIMXdevfTgjkTTIxzIicl9cJYhKeo\n6mfsww9idLS8z6XRvFs+zcIvvv0+Mx3Lpwg/8ff92UReqRUfnHvTKTTT+kzu\n+vupk9DoOORtt/G52MFmjchDHPxSxZocvi3tMGEYIm1BLjtG8bEbu6M9jElg\nKpHIFQAQfOAa5W1kp6q4CV8TfaTvh0KiaWb7c+VoViTf62oAa56MFjoyqohz\nYrtxKsQgaKGceZqtdD8hjVBIKdPsnQ5+7SWgVgwX1mB3SX+I2mw80QWSHWYI\nOOCYq/8ontM0F4PMcONq609f05iCJ7Cpl4csyRKATmiVtavqmrV4SZMMnHFE\nNHiv\r\n=DI2E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.4.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1638756488093_1638756539225_0.2720087235085811","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1638842826265":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1638842826265","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1638842826265","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6c2bfc6d8954ba1950476adf2078822684ac4e62","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1638842826265.tgz","fileCount":7,"integrity":"sha512-6B5mkgXFPD9sf/0zooh51vRIhuK/U0v3BUAJjmsMgWBSXmTMrOjsVsWVNpnJixh+eFFSuot1jhwbhi6jIEGHCg==","signatures":[{"sig":"MEUCIQDOhN3hUw2p2iWJMsh+JM2JEeuUulq5rfcPyfwQ56P/cAIgSbJTERlzJJjZX/PXui1K8t0KIZ0Xp9qkvwDuSwK+j0E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrsH9CRA9TVsSAnZWagAAqysQAJNYCZjVjr8EUDzIg1TN\neXqSRnT+SV1Hfy8LQXusSjqcIbDpr8cR6C7JF1+1Q5rsLEUCirz5FC98Kklf\npIx8s6W4Y3FjFkAXUuBC9XZ/829KxTHMkvEskvH1yIpWBaeo0c7r4qdrcaIt\nEkYU+9r16+Ygb+tVXcWUdZIj4mY5Eh3PK7yoSARdstAEHH97fevLw19vtotm\ndNfcAhke9vRxulAi2Yc7m5Eq9YKvIW/MkUWwK55BerWmK624Dqg/JTnAC5MO\nCgG699loj7xbO2+PuvVbkPur30pgvnKEYg+V9Iw42fDqUDfvIYF3gINu4dZi\nXZkr2pSrOhvHJpPOUM4qcL3iyz6iWLPnfnAz4rA5f4pgnvIZcLCWB6cQYO0o\nrqC86if2IntmmGKrrGji6th6tWLC7A+PTLNb/SEl2HLPTr2f4X3R2mx/EWMi\nNN9NXFsZczg1bXX3I3Ydrg7izdttdGXYnMPBPDoyH/V7C3KFM0fYmxQ/Pg2x\nZnAJUfAYvnQ7vouZOX4XvDJUe2KunLaqOY9BX4307pCtEBZ74WI/slnctlxx\ndloqLutpCoaLMwmpxGsm9OYw9ocb6UbAoj0piftDxa7UBkOanyM1qsj8fZQx\nyAiR+sz5nT10OCuWAnwINfZsm0G1Ohf6evxqUJEcOgqqk7qNgaiqAXB8VyhD\nnSCS\r\n=ukT7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.4.1","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1638842826265_1638842877664_0.4548399634802165","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1639102053584":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1639102053584","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1639102053584","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"88436f8e55ab0964869bd9bfb12ac572a3c3367f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1639102053584.tgz","fileCount":7,"integrity":"sha512-kvZHyo6txW87aHICoGUxcg06b2fsJJ/B3TlRKMIncEedR/WvO1PT5F6FMCXAMbQ0HnGpJ47aOlaBNhH2+AULZA==","signatures":[{"sig":"MEUCIF3dlTNaUV7AdKGFtimSYiboFElSMIuDFeJwgcZMKwdwAiEAx0ul0ZtmjbUxNV3aJo7FEKEwICwwqjPF/dyaBMoDxNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsracCRA9TVsSAnZWagAAa44P/3EU6zGiLu+/n2nwsqCH\nR4wLyIO+2DTtgn6+QQJOJp3NqkxPBjvhl2CTLW75YMalyi9yvAGDXbkMSbbf\nrq0aU/MHpOdRq9JWQ/KMQX7OSc6V0jdiKrUwNQrB8OQwDLSJk3x2ul4kD2FY\nUbGo88ZmUVqF9F7O3UOHxLTPklkagP25RJE2Umr482BxQpnJkZ0kusnUHar/\nRz3aiFLLu8RVpbWAnrW5nnGnUsQNtCjf1m8I3uotjoMDCYq8qx0Y42gShmsF\nbkKc5CDxB/5GCN6ZZ1xoxKamTSfGmkvxAGRLEEbCbWYU8ZkDHZjwY337Txb7\n8yd+pX+SAdJML1Zn3XEBnX4swu8dxdlE3PlyY3/sspBl16ZojE7rxBwJb6KS\npOPfxcEuzkhmhTK2dE+s7ZPaQfA+aTe6o+03NrHvP8s5rkrFu3BtztGTdWCG\nlvn4AR5N/0FVJd0thsSntQ6ABILnvjBZD+tDNQwPzsNL6StjkC0azQvWqsfX\nu45HMio+7wSAOfq+zpFCKuj0kOJaFKHvlwoHydSijDi259vb81FQKSuPU0hr\nnN7v9RYME/Zo6h9tGgchYzW51a3uneDGt37L97muf7wnuEjeLPKhSUK7p41X\ni6QSR9uC3pBFJ/81M9/f3KD9jU+4k7rLjiOKEW/Z+L8aqDy4DeHQdqudzzQ+\nX3nL\r\n=s5zC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1639102053584_1639102108068_0.02985644885284855","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1639361247857":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1639361247857","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1639361247857","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"7f4cd2eeffcccc5dffc3653fe0fe6f0ec7a8d466","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1639361247857.tgz","fileCount":7,"integrity":"sha512-6/jQS+oS1M3fSZcbNRtFsTQQBwt69Ti6SgI19YJq25pWUtv3AZ9rJwdVp/ZM0+sPqpF13cIwK1JVU46sqnKz8w==","signatures":[{"sig":"MEUCIAN6+F9ZKXwpMhn3WxIqNLqQaQN9H1RjOfUt0rgrG03CAiEAl/W8s3iGeqXwr2oRJ12ey/euGK80M/rMA9i/GA2GLDY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtqsVCRA9TVsSAnZWagAAJLUP/jKOq8ue+8O0sLjPxGwb\nasA3DJx4WBIvvxyGcsVmE/SHnnK99/5G4agDVgmvDneWKnJwxP0bnaHPjETe\n8BC8y5djhaY22KlGg00qSH7IX40tj1nDXhBYZGpi1blv75ceLbj2KEvti04R\nW1YubpxDiGcVgNG5Z8AD2tQ2VsW6WUQ9NueViYYV3jrXc87h/8s+2v2HZVf4\nvI4YJFuPCmdFJEG9hAJRxwxvvVdhxXV0D8HH2SwXWWUKp2/umL9BoGfufm4M\nuriMQROBiUsFOfj1RRqsDAGr4q7WeSE3Lv+napRGQMckrzliuValx7AAMy+f\nmZLlSapABh1umHpEQzQJTAu8h9QpsATVBZQjyVEz3pyc5NqIWPPPJz3O0KTJ\nRaV2s8zoA+oiwTNKfixkK44eLyK3hY/gkTQVlnElicHPMSx97ajsJn/+6IPS\nL15V9HSINr/VVOclQV94UIbYLXkZZZpwJ2C4Oha1nU/9qxhaLlpwKDwWuNRq\nDIdhwQRkG8tvd9hXVm7S65mpWKasOA2kizljinLavYL/gvTXbZq6YXup2pi+\n0y3KkWmMyRM3KE0xZ+RNza9wO1QVT4XK3Mv+zdN+CMcEfujQNXCOO0HJhnnJ\ny34RZm1hj6y58grHq1rplkbTFSab0Qjln5Dm+U+n5vpDH1YBGtidu5KvmuYA\nKWO1\r\n=Z5eW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1639361247857_1639361300905_0.5283355805218821","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1639966022934":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1639966022934","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1639966022934","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a30a4e2ae3b882020d58b8f4ce9a461f50d7bf8a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1639966022934.tgz","fileCount":7,"integrity":"sha512-DaQ+laoF6GJEnd1sTxuU97b5g6N/sWg8y4pIq///xfW/DRbRg8B7cUIOrQJneTfFJiYqgQq3ijW3RPTshdl7xg==","signatures":[{"sig":"MEUCIQCUa/YiHNp7jtTY3IYYdwf7EKOli6WCHqrOU01y/96ZmgIgVQZDoWxS07y1dZPpeQUEKovQHtkQjBbNsxCO4HAdTRY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhv+V8CRA9TVsSAnZWagAAAmwQAIUlsUDdmekS8c7hSouL\n8nxHrzyfxMJiIS3eUpeF9mEXoeL3rFQ79i24S17KT7fSV3wm+qYwqdGdv/Yc\ny/+Y3iuXs9+KeXSGmdUxPHrq8jC6JMw8+/dmlKJ+0UWCMY+MJygyn+ZjME1H\nO54M8N5CUa5DapRb1YbGfhhCZLB51+n+IWldGtVwDTtbNEuA2SBF4/0Ay7zc\njSO52zEMdMzkofN8uZm8AvuEe8Vu/OMTVSbz9flzbNeeaMab6ecgA36fzk8D\nTPUiFA1z9JOrlkBBv/7fF33oRX+zv192YL9VH3em5yjFbn4EpoT/PNRL+FG9\ne19wBiZWxpx/tFbc1xT5rZzJ3DglSP5JXPa9bec3x340NBvNsVP/L09h3N1W\nZwPzXL1wvlgI3ewIdeWER3hQdqofw9Aog/AELJyAAnKPulLcbiZBpkwfV0+k\nhBvjuWHAbUWmKU4FWAz6n63FW/z/ui8V/HSXegQMKsw2fK68MQERuHvFnHOa\n13lNWDtADPlRtslf7W/jidtpz7+eq4vICtKCAo1WOAZ/4USRHEmq7GSYi/vb\nattOsVZpZKFQgxHuZuJxTf1D9FHOmD6vWTTUJzz6JyR1Rqp3nA806s0hW+4h\n6mA7nDTlXn0tfQSD4t5jSrbFHyWoXU6DTcFGSzK3Rq9ReaPsJR4/nyihXgXZ\nZzym\r\n=qrJK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.5.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1639966022934_1639966076456_0.31357416895865886","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1639966025178":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1639966025178","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1639966025178","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0687cc0df6eaab710bd81b1337531da1d0815dc1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1639966025178.tgz","fileCount":7,"integrity":"sha512-Svj8ehck+ANPyfKL58UXR1zG7dCbk/FPXoEwDa5ZP6c3VG8gDS/p/oAGCn6CRezSgdE3NPddMioKyemnOrMLmA==","signatures":[{"sig":"MEYCIQCxBUgj9IkGcANsuiBtjfdDXPW4Heh5z7qXgn+QC7J2RgIhAPe6xJ3dZ840mYCftQXiGdUp7ay9c5So2rZAqCmNnSJa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhv+WHCRA9TVsSAnZWagAAq0IP+wdcJnoVfAKFY36lQFoB\nky1p+N6+oLLqVLF7XHh/SkffFIJHDeZBv0pW3FfO6vHH4Q78pTz2vPIWiHsH\nuENhDKlnM70GkwO4zmshnErPewQ6NN4wuSpZdohNTiH06EZR+ZyaeZK9fLNm\ny6FRlT5pxaG1vI/+c+2h8lKoLnd4an8bPnRA6XgE9gMZTS3F2PFlHLAgMlw3\nBHS8NkrttmW6EOkOzmXCHryw3qqHYVAxIZCRWxcNl36lihHiR0gNQjtrvo86\nT6KTanmjYrPLxuV20mVhltdESUKrMjpCQIfDjkUcA/reuJx5V0a3DmY56M2N\n7zgB+QORxjaREBIy8IeyETvj+UEbT6qV1GuLO1XqlzPgK0PVloeq281nJleM\nJQws9hAq34o48JWFlKQKqka69BbF67TpK97ktOk68P4+Mujotf36jQIO0Eik\nnNrjuTHg1Lh4ZvfD2sE6QIbGaBU+UmoXfj1Fm6ElnIQI/Dpkh1Qhrbykd3bO\nHXcM2rHg7Ktej50kFsd1N5Ub033rCav2dYf4rNnm2v2zNw7wtZPjjbNKUdg4\n46PSZnDqmO5vrijp/fcgTQixqjbeRbkeakUWuM36GpzuEFkoaJOm9rpE5qIZ\n+O5rOtNKC/OoA9rqOeejqPcuzMFkX5YeaYF8BtBGG18q9NVBSKKs1xi7Fuyf\nBsW6\r\n=2Lko\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.5.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1639966025178_1639966086901_0.0955733386090778","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1640570903481":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1640570903481","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1640570903481","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"44e104911087a6f444d2def66065e4be608831a5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1640570903481.tgz","fileCount":7,"integrity":"sha512-9M+MD4zrTslAJpnyQnKYZWIBhLk1+B1NTeepApCJGB1WlNaLNqIIalK7ajG68Ogc2VjiA/b2rgnlGNdXlCUe+w==","signatures":[{"sig":"MEUCIQCNrTXg5oOCioun23eh8GZAI/9K727BMOEAHrvf8GlS6AIgF0/V5tcOYnhFemNrMBCBjjiVK9iY1gyu47lFv/x0qBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhySBVCRA9TVsSAnZWagAAKV8P/RfUP4VQcimncHJRAoCA\nScgRusmuzZt1EZImPoDXO1zJrsaFMGCFM3wqLNlFpkvSGwCk/XLqYMx2r8xP\naAQrigLwYSYwwSzw/LZVEbzuvisUYFislcMiu+QgQT94rpFSNt5ilsWAs/Qp\nuryu8/sJhcLSm6Xt4ZEouTLtrL6gCpV9HdAMHdxqt9XR2NXVquTxgEzVppFp\nDV2U3r43zQ9Kb5TL/tZAH7MfrkFq7Fx732WerLsgdBb/EqGl6LmiwCcY631I\nQLC/e8vQoXU9XQaN62XI8UxHgky7dIDxLziwlo+pHkz4s83bATDrRBEjrp8q\nGgiwYM7uiR+cph6Sis6fLyq/ktGlOKtTgoIYoqufnNQnXQ6O2hrrIGSmbJab\nyNjuLjLp/hDERlafNv9hSny+5bvhYE0dvwhoA9NQrCDqisZ0Eu8EoewAcSO8\nayH9ueEoIOqIJU9fPWsPbXGnfFhymt6AgWesbRqmUuNg8GFiByve6O+4t0Mh\n2M4JPrbtJ/js5ej9gt8dlQ3PX17Uk1bPQ2Yt7LgC1zlJjwxZhghPT26y1qxP\nyVIDDVfbl0agy4vWVAhndDZYuKax7YR84gBD3pG1sVCtNA4zb5rnteOGHAXN\nehX7vsGZmiMvgdybpqyLc3qM5HMGaeUQirvVggHtfpQZ/fl+FrtVy2uqvoHG\n94hs\r\n=nHSt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1640570903481_1640570965308_0.21267458841821352","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1640571026952":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1640571026952","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1640571026952","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"14295d0d875054bcc54428816f80df22ddd84f90","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1640571026952.tgz","fileCount":7,"integrity":"sha512-t+FsBObiGIiqDrhBxTwh2nPnrIJAogDna8XPZIBDwWdYVDru0UgRjr4UfQNKqckumpytIjnW3qNyz5B4FDvKCQ==","signatures":[{"sig":"MEUCIQDuo5gybdHXwkTkylECaSWEIA9RoCwoOBGWlgOIERXO7AIgdQ8DWdWd7HeQ2WpOtc3o/RYN0uCW2PtsD4UTEtGv+2Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhySG2CRA9TVsSAnZWagAA8t8P/Rn1yJfoEmLoR1sozIAT\nf1i4tsQetSM+fNDBVTyrf80c2VIlnlGHOCaIc6AQ1/i7wjy9rSYLMPAF7DV1\n9d/jUU8Rz699iIlI4XB/w99mLcCN67HEHknysw7J+mR77l/5eCC3bfIwOgMC\nhoG/xrJbfJaA5J2LySusmBq9KduTWrCilqPeMUrQjJ3FzxN44k02mvvISzsD\ntm9PaDzN/wyUkLqrnJWIj41/QKhACLNEKpLCAcOWEIMn1cl36nxEKfZkV4Wv\nTjnhNsl7teQBrHC/rwUBmxSxbWT1FQDXOpyWTaErmUIFng5lu0Q165ACtOc9\n/XMfUVjUG8Putm1dSm73U8jeQR3USmww3I7mlfs3LHxAZfdrETNma90XuTFO\nyWOjI5QvtWN6XkrNL4WUvSijnspXGs6PkWlphAGfvuuSzrJ8Cgi8MRoY5ETn\n6n7fZiv1dw5HzvkbSzTu8bNDxOzK1bZQG2B/7PTOXfSPnohLkX9etPc/amut\nuJUHmD7/U0BpuxScJ2c53oKlk1qODK2LTO73/yA6au4X7V2cUWsGYMSikIEL\nhbOQC+KNnsGHOoNcUQbp+qOb9OWdl9C/wzVTetp+euYG7WD35SKKTIwl5Rau\n+2n17vD9MhgNAzAlxfHWXwOT1CrI+76/4DKmE4mPNjJusdKvx5g9IuwotVpP\nC4U/\r\n=m4dT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1640571026952_1640571318292_0.8150081219780358","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1641175736847":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1641175736847","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1641175736847","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"915a8fb9405ecb68116b6bc242fe1ffa3c9b6de1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1641175736847.tgz","fileCount":7,"integrity":"sha512-OH3IWW7w7/DC0fXHxFFg5gWwp/5i1w+vv07f4yBIkkd9QNT8NXecFYd1PrHptm4bTIsAg5MIf70dBY0W89+crw==","signatures":[{"sig":"MEUCIQDA/bJcCf/TaLdrkvjQUlYXH+nTO9ZT60lmvcJbxMjOXAIgJHXqnrdQWTiwHcb2T6NYzAEd3uhSme2JHLufHnbP+1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0lrrCRA9TVsSAnZWagAA2RoP/jZaIVQSA4rfHvizkM56\nf3WUYxDm6xCC54w2kLn7pKz9cZL26xn6GHLsJLzJFOZdNeiKqJXRkHhYy1a6\nPLLgzbRrRApdt1HDUTdfkLREQZsJZx6uSoINjUhuTFFFmIrCQIWespc+FNMk\nAYlxc0VMQG1twRTHAqJbOrQeKCLW3s324/eMZYsB+ZQfTkfVlWTstORNsaUi\nlcV666/V9NKi791z7RaEtibFChFuy8QbHuj7SX5gPlSNMoFNyWf4iCuWAI/P\nTUkxNd4sGPHwF57VY/w9mU0RDRMo6saIOR84sYPHwVu5Uop5tOngbaaMpVYs\nxszZRRLIo8HeDWZ+JlGKZxiXddeclbwMYYK2BY42KEwX0j4sEJlW3+W2yo48\nUkCNPvKffBu0qIDVwf3udL95TYRFT3k5czxAn0UOo3naefIEAxzSVaPVfM6N\nzT2w80x6gwWrHPd92bTxNnhhEjQdcp0B+0WEoKU56yol1xtOBGKabQDH11Ij\nlnnlN1eZvrdYShmkLqs8rLgt6w9VTmuvPnCkDgROLHsH8fskJgaTrWJUIM6T\nIdihApVZUDjpaTbak72Pqzqs5SerxnINuoJnYqt2RNMJKr6f6AusUE7V1vI0\nMvEO0MeLfAdw5LhdeN0LAFVxIob//3vkLH/mNhN7dZByfE84M2xxrTxo6C2c\nE+c3\r\n=cplq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.6.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1641175736847_1641175787815_0.9466133985814225","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1641175734717":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1641175734717","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1641175734717","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d83772bab95a13b6fb8953b18a155fe2d1e687dc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1641175734717.tgz","fileCount":7,"integrity":"sha512-GYlDSJavG/pcPW801vpW0g8/ptr966tJ8OP3NizqwZ3n9bLIysUxZtwI9Il690x/o3JOMyCzESW13+JXbiLmCA==","signatures":[{"sig":"MEQCIAD0gFlXy8TonNukxAc/CWIUo6B/MOyOq3MXgdyIfY10AiAYq0Y1HCK2dcwIJASpFAiP+dobiZHEzmKn9c/9le+3og==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0lrzCRA9TVsSAnZWagAAijMP/idksNpIFJGkoM1UGQ3R\nEEgK3g235KurrayxJzfbXQtwW1UnX4MMkNygVLt6DjPXjw1x1xvz5CPatijn\nnyoKxv8JCilFsnXKVIcPFC9Lq8f+L+yEUepfBzjIDmz1CUybSaTPGHwCv4B9\nOZ2NmO2xjHN7DM5Q6nsbcU/QYut98nzygEPNaf7Qo7+0O0y1xbbDE2k81gNa\nA9J5qS/cpBLPl0qdV20XUNZLJ5t2eYh3lj7hUwaJGogdqi94K/2ICY2j390S\nXtu28sBF6n1/NcSTpm8PUZht8sAXWnwaiU8hdFjdNNKy88VT0HR2eS6qDBqB\ntZjhYiRE8uG1a2CETxdNJv01PUgHw9I+qtb9gf9GF+AWKcotbH3iKICl5SxV\n7IS9Ls7+pQzujL8T4WL0ryLry9qpkAqk2TECTuGtzy+9bJGL3WlCI/SKhVIG\nPVk2lPMdeImP9o3Ars1k8uxLeM/KlyTBPUUt3re0LRbinRk7JDtavptz/ACJ\n6Gm6Gc5JPiDgIceaVcBMwoV1adkgqPT20r4c5raPxEnfxjYRX2gGGzqEh9p4\nuBP6OqHRr08PCyLbX5G2xMYBjqmqwWztZuxx42aR8vDgA/tnYX3Mcouc55Hf\n7Nc+YWaP4vMGKCVfxbf2bSYcftyzplo0Njt73ul9UEQ0dsswhIQmCNupCh1D\nda1c\r\n=ajWn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.6.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1641175734717_1641175795287_0.06650567821878095","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1641348468850":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1641348468850","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1641348468850","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"199b7997982ca80870cb9247c47f22ba337bb156","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1641348468850.tgz","fileCount":7,"integrity":"sha512-h0n1MTUkWPQhYw6XAy1JhLQ9nmWX8vTAbgh7tsYCHW+S9V/on3S4rF5+F+jRGcCIdLaz14VP1ovIZAALejI92A==","signatures":[{"sig":"MEYCIQDbZrk4auU4wnjMATe3z/1fKvPPbRufRalCk2nSHnJgUQIhAIF56wF9QE2AFGCYhczKkFqMMgApb/ipbYAGRAnc/XuC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1P2rCRA9TVsSAnZWagAAzDoQAIm1PMNfy83YjwDyWyWi\nQZSlsPWwRFbMbyRX9wsRJMsg+r0RnnNI06cv6qa0x+HzLQHAY2sVUoBGuJpq\nX263Z9uIQZL2sCMhxxcClTJtpkmb8tH+pFtf90I9t3PQZbnma9V5MgErtkn8\npMYMJRwLAQGOL2HRtkNrJ2gjhq0/+szd0qXfV4e+1itONAJRyTOol2ceea2O\n0sdkO7pcUtoAIzlHcrjrZ9sXnF5uCYKDKD5f3+k6twJhe0EQ+gQ2PR1a/AmN\niYHFIrP9VlokX9MxTkBfYAe3JZfPJBpCZwthUjg1vaTlZFVTyup4XkYAcD+V\n4hPyW37gd41wMW5ywVnzLDEYABYbKMfXMJiFA9Qi9BHmJl5HIBJEuBGcLD+t\nvFCxqq1+tbG4u5rgGjlLHS3q60kPEIuSp3fkZMti1xANy2H+2PD4me/9cc1N\nPDR+0yuKHhgIvO9u6YTI5G1dNxbMttMSK/s82EBXUGvkfbP3OADpOXQ8eQEM\nR7qXzlarfDtxFJz7lf1lYwb4DrtmzxH/6tYCf5XDrCNqIypseEXRrq86ycqf\nblXOjHpv/focLrUjmRDzA0Umi71EHYoUJYqoGIBxXbWux1jqS1lHN29Il3uh\nCpPsf3xcOk5soP0PfXzBgBgvGwt+E2xhCUtfM11f8syTAWn0zgi8w9/0t+s1\nK4CV\r\n=Lv1V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1641348468850_1641348523155_0.3000959815859865","host":"s3://npm-registry-packages"}},"1.1.2-canary-d67a93d-1641348472510":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-d67a93d-1641348472510","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-d67a93d-1641348472510","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"189fa32fc347e0af738241119163192c0f77be73","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-d67a93d-1641348472510.tgz","fileCount":7,"integrity":"sha512-TsHxGZEHR50mzr69V/0oZxNJ2T4ER62dBbdo7A6wPhYA/JbZcAUeSQIHL+qW4P7ySeX/BJDvxmt5DeuTaXA0Lg==","signatures":[{"sig":"MEQCIFidyE+Ueh6XZ1l82siiPVCO5IY4HwdpyDi3/xW1aMTaAiABz4hL/sYuoPn+UGoYBI0S08ZNw5Ab+I4OKdvRPAnJSA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1P21CRA9TVsSAnZWagAAyKsP/0SGG8TPstUlwmcMMsKQ\nEdKa71aOYG/e/St0zQHYvP9aQh+P0lRXoj+3ru5Y0mAkll1irlbi4V2L8X0B\nX8e262iH5QpK0Lzno7km2SMVGuDEHQx/UuJwIKAjwmMU+0wGAYaqE1lU05/2\nucpeMJZ+ebKiwmf1Sv/xba3gWrz3vPKM3Pbe34gZjEEf3E7H/WqeGeeSOr1J\n4mRahtZr43MLNzBT1OO2UWPyqQUcPjH6v04nzf4mM2UMORLiNN9/1x89DBTA\nMyygudKHuURnmBSQPeBJQShuKco3wldL460d+OsL98p+WVQEPPKTK5/iX2Y3\neGlsnsoL5Wj+wka0nXlcZqbIUFUVwSn80ONCVR661VwwRm6OxZYAPbUR2lsM\nE3a3b4bSCJGTWbdnqt1AHIjaCitHNcXEvWPoLk/Znm6C/NoAWM63bNS1gDTi\nHvwwKmzL/zGouGN6tq7AwEJhC7FQe57/JCpI8WJZ3dm+ozZdLFtf5i8J492J\nKRfnetBl0tuxEHYCyw/ruWtuYLWvrCn1ooFXbCjZay9K75n2n/xEZgdzpP0U\nZN4hUv0yQgQaI7ku4MSNdbbVhnTioqUmmbJ6EjFwt6BzndX4sHFqZKNcZzuR\n2tBnaOFcRDjfAcz0zTaFgPchimnaCc593ZZjFtWID/e0LcqM1gr0mqWV+2fi\n/QzL\r\n=v+Bl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-d67a93d-1641348472510_1641348533703_0.6969325049868553","host":"s3://npm-registry-packages"}},"1.1.2-canary-f39ec38-1641482195236":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f39ec38-1641482195236","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f39ec38-1641482195236","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"abce9636f0f2dc411c16dbe20c7f724143dc4480","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f39ec38-1641482195236.tgz","fileCount":7,"integrity":"sha512-gKLcj8kk1pa6jYDwl7fkFIF+YV/YdxWGG+quitEf0Aw2j/s3iDZrPNIrYjROjN9aqpxCuvthbpQhkSv2+hpGpw==","signatures":[{"sig":"MEUCIQDKDRM9lGvEv1On6gUfH3nNtSGYthfJS8iQg/lGrZkb2gIgMRYpvM6DHXwclQEQ58To5NIhNOkTTyUYBrF5rhj91gQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1wgRCRA9TVsSAnZWagAARK8P/RWp9FCrBzY8FFYacz3n\n8ld2rKBDZHyZXFKVAUrtcNi6Gs5R7qYjUZvOSyWVrtog4QKefBIQYi4Z36JH\n7OAAdLftYIOlA+OKBP8VQZ+48yXUDBR0+urHsnw49s0BoZdhkuoSJzMd12Q2\nCKz1uzB6GrDnFO7lT4JqZQ/fRyXEakNip/DBro/IONjFfdST77sUGrkh516O\nTEp1pJ1dusBX66MFOTblyQjhHFfHrid3ePNuhSFMjqAOZJEZftIy1mkCNR0j\nJxCFAJ2f9nzxlaD9mvaURl3FIsDDPN5hbZiVeVsSvmMEh2/olFmBvrVM7aoH\nnW0K7wj+dXxyzj/deXOnr8n/zyARDY7gmGzA0Cw+xcuZnzoECgTm9chdwf5C\nETkNFS5/bnDtoAfE6esBo5qbhUHbk+pGzEeJs8Uwil99ZeOjA/tKxRu4kSb9\nv6MRoZuq1sYBUX1raKgA1smPZIpTfkOJVyWTNQJwIcv/zu2I0GTSBcCQo+qh\nEvYk4ej0n9Y3KBXQyhadJYAK5hGvhj0kYVaU0KLXpRCOgT8VUwgTZA5acZn5\nVSsoS+QKhCZfrMElg+jCcG5LYgJ4g1MSzFP3fzQtXMVp3Cndig4jne9NaR5K\nEybrIdqugGDpKvy2mFycbGzgVVB7oQc6D0oHK5XJlNfYI51LBXeCxqJBl4fq\n6Imd\r\n=RX1A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.1","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f39ec38-1641482195236_1641482257605_0.6085924969722329","host":"s3://npm-registry-packages"}},"1.1.2-canary-f39ec38-1641482161096":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f39ec38-1641482161096","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f39ec38-1641482161096","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"30ef2f041247137fe41967cff3fa14b203048c45","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f39ec38-1641482161096.tgz","fileCount":7,"integrity":"sha512-Iu8CXSQ7mc4RFpXTdLBz+KLQ5r1skYbMHP8kOEotA2/SIzx9UM87t1lPxPi7VKZoXI+H/kz1N4KuYhGNV3NOgQ==","signatures":[{"sig":"MEQCIBooNPEFlKbvPgiHa77ES08ThfyqVy0ECA7wOPlnL/rYAiB4mDw7mVxRF5qVj/4Yy+Zf3d/xfO8WjlyXJpRp6Qg3YA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1wgpCRA9TVsSAnZWagAAWBoQAIcKq7GDj4wqTa9stKKv\nzN8+SzV75POPrrA0s0sBPgslqu74IrMIJYFbB64jRUZFH7lvmWW9zAe+5jFn\nNgU7pGYjVv+QuBBthiLfuBjtxSfzfS3QFm42EQBWY4QGcD8Q/41FHo7udBIP\nwNnnMnZLehhEF0h6cDCgweAYNvYYeo+uFJXRf2WWOd3fWO2br3Jng1aLTU4Z\n1bYMmPyPZm5IA5Z5OnEK4n8p6dPgBYscHeMPUzRR/zOXAahvBhRg88O1QDK5\nvWDy4AhhZQv+fcr/sYYZh+OmiuMj9d06naW5ttZc2fmwzs5RMZ78WhYT9UW+\n8jnPgUuQddcagKq2bwWU/LiM4BVChApmNQWNDVWHmNqxwlruzLxPKneQWsFf\nkgFbkvuTuDBhkmvAqG64R0H7XIX/MVNuZsuEPy/lGXIya045iSVCQKWEqObB\nvEVrLEgwFNBUHDXWG6KhvD30bGOiDn7iLLFMC7DOb0ULSkGL1BpfkZ4lIAZ1\nL4TIHytbjLm1ttro63A8vKYOrpB7SI58WvHk0dN3bCJkG+pYczlPMXw6cMeP\num5WeikB+btK85dbqf5cFZvqZJFuej+a9lXPKXnUNU8F/Kfmu0nrohf2wWmI\nLQVZ0OIHqDUrodfjQOu94Pmo0yt82CP/uFVQAfswJNFoYPRkM2cya8Fp5XZd\ntkm5\r\n=/w5z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f39ec38-1641482161096_1641482281144_0.9788507256478811","host":"s3://npm-registry-packages"}},"1.1.2-canary-f39ec38-1641482257761":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f39ec38-1641482257761","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f39ec38-1641482257761","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bc7e0c9a0ff5e977f045b4c249f6a8a3d00d98ad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f39ec38-1641482257761.tgz","fileCount":7,"integrity":"sha512-KFagsnz9FF3lJyB6lSrnhpr/jEIf6TP4wn55Bix0T4YkVxa5Q1cJKR6CsJF0H4sGYSlxaGKf08FO7PIIAuITXQ==","signatures":[{"sig":"MEQCID/mpDajm//kI+Ol8r7zwg2nV2vqZ34ssbOKqT9X+KbaAiBGNyo9jdCltEv3PmyVUpnrWKwg67uV3aYyrk4TYOWajg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1whGCRA9TVsSAnZWagAAjoAP/0Nc106FJT7PINypQEwY\noBCghxzBJst9+8Gj+ySGDJMYHQ/fA8qtgsAIpVBcpfxmSZI06JUuqJOGJBWX\nLBLnkN8FqnHMVfaCz5B0qBuobqmhpfd8L0ipxipsic+Tzi1vuxP2+Wfx6kz5\nP0ez1SQB1XenEchsPlwBp1/C1a8azKmJTZY7Up7DDb2W8pMtUuht8N1D+a2b\n+JgHfFtlW+GLv5VRV8fVU7uijUxLrc2IChl1dwwiqmUT/qTzU3TrK6PH5KrN\nw3QBPUKemxw6pRUjgudzkB67g8ndhf3mOdLQ0Sozk4HCDSEbx5E6F/wdBfDK\nKujGODOSMth22hsuGZZOUjBY/YkJA6wlTnfcRw4hkHqARME243+SIJVfOlh8\n0VGSDmAXo6vaCd/pRSbIPuWD7hwxWIOVKbMO0qEQ77r+F//1cpQF5YNV58rO\nTsmX+3V7+y9MkZIpgU+xYDHlhfAGn1Y3vrDF/68CJYjlc/gZ9JE29pv51XOq\nVJ9ZnzjbO7HLZInSbRXx7OpqMPsHeVw6V+zdPmtsY07e9+5iwq9pbbnFGl0X\nKzg/vkBzYU6h89avNmfLX7SdgwHZkc81tgENOL6b6Vr0Re63jgu7AIBUihMI\noy1uuhnKFJORKI5nbDNwWd90d2glZZn2x6QjWXYWdKuWRRmgiokBqyG+Dzv0\nhk8Y\r\n=RlrR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.10","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f39ec38-1641482257761_1641482309855_0.42702262402814384","host":"s3://npm-registry-packages"}},"1.1.2-canary-f39ec38-1641482261684":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-f39ec38-1641482261684","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-f39ec38-1641482261684","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8d2a18e71b66196343f24dfe13abaac577227ad4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-f39ec38-1641482261684.tgz","fileCount":7,"integrity":"sha512-nJ07uIHqP1rcF059pthxmvaJO3yUYkFDyFSviYqpcS8uwZaDej2As7+l8o5VRVZKJGACKwTE/GDd+1Mk1Yk36A==","signatures":[{"sig":"MEUCIQC/eaUy05IydgKFQBhHajTEa3UBIhHX340lJB3W7hkVoAIgX87Vo1o2Cgno88L6k6YIrbccgbJUR6NKTyep4uKGUlg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1whVCRA9TVsSAnZWagAA9JUQAJWlin+WCimQygpkh/PE\nwj7cLQhyN13KIiS483xBQfC2c9hpZcyAy3p5UZhUgDwVWOWhsXCOAuUDUpxj\npW1pPkWEo224ooMkwzmJI9jTJq4oaCJ4IP38R/G38rQBgwGH9k0zY14tWaUy\nwwmoeTVm81KvHj9bmBcdJs0OeHZ6Zax1L0aDICKmXUdgYiK3nCwNGLCouu3c\nZ3ZKsaWWz4Mtlw4l2DKKVlFHiPS0wlFKED1fopjyyeH+PQAfLRF8t3u3cuCW\njdfsYD9BvkRFwniGHtfJgvC8nVEwUHHdmKqamkzqdIlEWUYXgBMRaCZEixWU\nZDSgLSfrxtSmNVHoFWXgju8mt8V1IKprzQrFfa5C5rLTIzFhDHT6cIX/kJLu\nmPVZY1ud19RoeBcqbGbQatbOceCVvB/UYW8Gjfl/nZyfY8GnKnseUGwbjHFe\nVjBT4NOLH9Uef6NDuzNQC672psi4elbFVDfu3MrGrvt91oqdsId3o+iYfb6u\n+eHBTJenSWiXjT+tOu0QPGSmincrJH4JFGhw7/ZbIxVhNY6faHU/kyVX5uSG\n6jclMp9Xzlo+DVSfPo3MVK1dsi4wtoGwT5OK/b3u3oV7mpV4kD4QcN8Vsdur\nCnOnYbXsje9zO8PzoOJHDiasHvtSkINRcuPS/iYXImGFNVDWaspTcHWV1wK0\nt62O\r\n=rqq5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.6.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-f39ec38-1641482261684_1641482325293_0.1120160617554058","host":"s3://npm-registry-packages"}},"1.1.2-canary-10271fc-1642385231536":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10271fc-1642385231536","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10271fc-1642385231536","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"42ac1fb9951dbed16a9f186af0981ee89e89cbd1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10271fc-1642385231536.tgz","fileCount":7,"integrity":"sha512-4yK1gySvIgpX0WCUDsJdDtY+a7BT3RWeeef4+vya12LxaA1c+KunkQhCABdnyAjaTppCY5M1/2uwsjycJuKGWw==","signatures":[{"sig":"MEUCIQDlNsCScMFZ8IYjNujDvZ+QcyDZsR1yCmkiuHEXh23qHQIgLB4zTCLasFoWWOfEdG6B1ARTaU+aDDXxvOqfd44LROY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5M96CRA9TVsSAnZWagAAuesQAJ4/ubf6SggoqzyROT1U\nOLgGvZiFVqvvh3P2QqrvaDKb1KX0e4wDUaS/T0X/EU/VL5BAnzScme5WBMrr\n0vYMEeaS4nju2dw77kwQoJ3FjDyR/kjqIUvq8sj48d2QwIogu5KK2hNAjvDF\nrK3JbKvEec9LfwwlVgMGP/oAeha8YQNS8cslEy+I3yZdo0kKSRia9ww1SWeT\nAG6ZxJuebBkjnjVVVC/IZtghFQ4azh5NZKGXiMgOrPJJs3zRLb1+ThsVbqov\n++6g8T4tBTA/PbcId3o0jjbDFlPHPnEw2/q8T331Cu9CiPphxk28kap8GiEc\nyv6U6qZvzKZb7s0EEvGhEd4uSVCRrULfAvdUU3jGUd1y6KpdBY52pUC1ymNQ\nV3+JqsFYThwkahoNtyCaxuveWYBBOdI7Cjs3KLxCZI0fwkef57HbnNr8MqZa\nhriKTF3rH7LcZJ6t8CQuEoIo24OKN+FavXnoq6FIkXYJZSaRcvDekNssOAg+\nNoM+6qU/l5Y5R70T94PD62w5kmnRydamswcijvdNqvwod6yuXC86njlBQD6W\nWuGRI3nzdQ1bb82ekmpKTvxD/XfKz9QU1w8VbFpRQDWkkFQaDZZUoxbE+Rj0\ntisOfwAgQLSZ5aUsYP0jSomR/1oTrgGKNucF1TZ2cC3WQGkzdzcemNDCGuBv\nrjY1\r\n=jLhj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.7.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10271fc-1642385231536_1642385274556_0.9619542760548501","host":"s3://npm-registry-packages"}},"1.1.2-canary-10271fc-1642385231908":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10271fc-1642385231908","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10271fc-1642385231908","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5b491240f0c0f3b5180a53d555b564f4403d6649","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10271fc-1642385231908.tgz","fileCount":7,"integrity":"sha512-K6DUV844tX1Me5LjcYx2jx9SCvhbQMI5d42kmCPoWrHBPMWC5kvC3395K0F8s0It3DyVTtN+vFxW0xbGK/3mhQ==","signatures":[{"sig":"MEUCIC88TLkAEpt8SuEgXWMGVFGBF/Ub4eszmulYPAO0qlZQAiEA6q75IytnGu1sl0/GAyAhNYIv6Tkz6dYe8zacABrV530=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5M+BCRA9TVsSAnZWagAAfXsP/140259ohg4vGu6s92vn\n7tB/SyLqOZIWuamV12TqloIkiOcfEXvi/pX1bxgG7lPvlDvVCV6TiGgBQNiz\nUCFsJYSxEVacjLYhhtFbdaSzB9wbggI6MSp14aD8rs70JzMqQIACnnO13GLX\nQ6u7J5cK523mVz39yqj9JVbVHJTokGqNV6KQ5OitghUF6uu/4s0xj0Ko80QV\nlMAeTmHZjDQSEQvC13JLdTtD0iPzOF8OuYrRSzTmM2u09qlSgVOvwjQ2ZoMx\nl5mbCfXHFKcq0BuQFVzcOpe2TYZ1qiGi9nwGjB9P790GgihFhb9OdPGDMmUl\nIyUN6GF23RN2ANHjp/TrCvYrrrO3/IHLuWDoZf5C5G6fUOtLBlcHmRvcD5Fm\nrD4yQ51PV7UZnV8t/5xqk1AFSOifDiR7w1M1q36UNDN+AT2gld1CTz5/zEc3\nVBeC/mZalhbTvpIayps67DMRxrGHdaXvo63/qrPHVMAEvnKvSr/BM/e+8tq+\nvrXSx39iZe8wwsJqk2miz3rC6lMOcDWHghbvVyv4Fxi40wgg9fUv3dMRirus\nmMPkNWXcwHnwJALcTRcjz5eYgVqGaP47aZk3PoVO2CnBeKmwsvE6yKvfIpY4\nCDR5E7BfdRzkpC21Na+IZIdlQyleKQh4V2f5tuvKwEvp+7uAb6EJUDUgBETZ\nYbtY\r\n=79Jn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.7.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10271fc-1642385231908_1642385281222_0.27402518617740435","host":"s3://npm-registry-packages"}},"1.1.2-canary-10271fc-1642558005932":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10271fc-1642558005932","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10271fc-1642558005932","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5c6e30edf8362fce988bc201dd08acdda10af8ed","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10271fc-1642558005932.tgz","fileCount":7,"integrity":"sha512-Y4erojJVukKxM3bnEo7oyGDgwoBxrgYUhpfeJwxukzTtPV98vwmd9V4U/gJ3a5qXNXOez0Yk+yve74ydwEqbXw==","signatures":[{"sig":"MEQCIDeA/3fPPFE2Hun1t3f9nWXwfdSPmKnF4VmpF0FNHIOKAiB43NWlaUPk5m6MFhnKcxYYryWBYobU7u4EQQVQTH4BwQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh53JrCRA9TVsSAnZWagAAigwP/RJ2Rb0yhbJLaVAqOA3/\n+v3j4O3Lw93d/66CDUxs3XvGphojN9tCvgI6kpsyUEX79enhCG0MXCn/MGWR\nWyYWDq4W7tB5MQvCTzLq4GGwOXh4unYw2bihTmRr9JOWOhx+EActo4wlR29p\nN4Ws2oW9qRtDi7HiE9g/etqhMPDh2uqfqg/MiWRNrpUNVzAiSVA9zfDbXDVB\nTNz53NmnZj3wjpbQhyUmsho+zXxxGjf7b4LS8Ulcjm96AhbCfycBLrbPDwZq\nsJWTjPAvth7SXjrhx4RHbKzjOzvEI/laXHfx+uepR5ufn7ASs4jEY/TS1Nzf\n85X8R/719j7Ey4sT9mXqYes4u6gkEg6YNEZNBnWnydZHpA3FapcxS0YSnvlS\n1OqMW3gslj11E/AaWCil8nqSO/z+iZZoGQxde8T5UaWLYXBcnk49l/+Mee13\nNa77NINsEhDNKsiY8Ejpm33bjFOMMcOyr6VkREIUq3Ayg8cdlEO7pLiXfQLi\n6ikZV+o7I2GnNB5IiyOIQ2CNgIkvB7IVd9VMTxGUA8tgfdg6FV3J0exbT/fx\n5crGgIrTIuPuGZ8jhpFbwuepbF8cAH1O9jQt7jRdqtfGnGMFXU7cXzdYujMX\nbgaeeI5n2DTbSH+JtutY9n0OvtVxyJtP7TxQAeNntA/sfNqJV7NgcuuTyyrs\nphXz\r\n=ablq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.11","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10271fc-1642558005932_1642558058847_0.00981213005702175","host":"s3://npm-registry-packages"}},"1.1.2-canary-10271fc-1643594830521":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10271fc-1643594830521","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10271fc-1643594830521","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ab2d3a1dbcc5b55771dc3368f38920e4ec8eb259","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10271fc-1643594830521.tgz","fileCount":7,"integrity":"sha512-sUc4QEXECfIsBwN5yX6Snf26VNIjtp0uThSicZ9bwK3EeOODZYlxJUWJD3u/VLRD1KrIJYyXDkijSyDG5PYB9Q==","signatures":[{"sig":"MEYCIQDy4c4WeYtYb3KozXImKr4YynXw/lC3GJ8CMgfavkyVmwIhALJ8cRQ9CM8Kj5zXobgKRlUMnbUKJh4pmBQrIFr1AcE9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh90R/CRA9TVsSAnZWagAAj88QAKPp2RLJ7mLv8HvVQTtZ\nTqtFDPNrHJkRmh7CLNfukscguXRuCOXKQyhCokU0/QfQCKwLfjO0nkj1zUcQ\nrhXZiAQPAH8nFKJQz6Qgf+Gu9iBlSiiBM53nZkVjSg4Knk0VRS17NOU+C73l\n4nVjAFMf65Ki8HsiQyXbc13R8wbJszulgZVbI+oURRTT6cZIobQzZ1RY5+Vn\npCWrH3ahStRrAKlIrIGKLva+1JJSLOvxb4SnB8QTwCP7ebqBnldHqVvax37y\nofOX9gXFnDcgZ18MkaZ7r62TupgFMv56jKgLN8uYRbARcQf0FxdIqs/t7Hh8\n4RFloDPyKw+DjzYrCv5gutFPD4Vg5YgOlAnqkHTABgQUjEPROF4O7tI4A7w0\n7R6XtjyzYu8LnI4i2cwl4v8muvN6kA/8uLX9HfmqIketr9eQ7iAEoi0IcHOI\nk8Kl4SM91D5HcXUd+ffsxwQW6Qd4icdeIT5j1w4wEUAZvLN651bEYfgu4gXv\n0odbDY3ZMGpqVCc/vDXTWzaBVVH4+VLBbCcVBCTqSlMX+ZqfWnM1y9jAVugk\n3GfJGDsOhk4GgbSvp9NLfUrpUUJdNoFcXVYu/16azg8mGRe4yeWV6/oHQR0H\nLKbsbtLaktO/D78gIqn76/qoXI84RMKjKyW0tPuWnlD+rRBtqMafuj8rX7w2\nexBw\r\n=Wkvn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.8.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10271fc-1643594830521_1643594879172_0.44197136991208485","host":"s3://npm-registry-packages"}},"1.1.2-canary-10271fc-1643594831788":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10271fc-1643594831788","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10271fc-1643594831788","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"52630be3965507aaa4b1682cc15b70e1639bff37","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10271fc-1643594831788.tgz","fileCount":7,"integrity":"sha512-9ydSP/VudNbfIA20R+O8LD0mtlNmI8YP0EwCVrPKVguhh3Zs39IKD92nNk302RweIyAJjQ7pqwecUT7kRY6Y5g==","signatures":[{"sig":"MEQCICNliY/e9PjWrohdDaRpylM7AvC7v0EsmU91q1AJeGWAAiBeYD1uLfpFcoTLSzwuhFE+ZF0xEBukLqb/ln8uVHexTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh90SHCRA9TVsSAnZWagAAFWcP/3tCeAnXr8Sx4C91olze\nr6MLN0x5zbL1XUschFuSyoQTFQbIfEdNZjgLyCim4zQOPkHHfY6RwnGv4Fcx\ngDcQCj+3PcdkUZ7HZRoQ81Hlipnb/mP5BGtahYl+eu/0ZEQnffGnW26hiUkN\nOrOPqfDKTvxH/ghg3xJ9senSJPlKd0n7ppLlRB/Wb/OmG3rjDytAlC74Hzq7\nJinwGCM5e4r68JAA+WA6hHrjAHibb04DzRpTHGL9XtXfS1SXlO97qfqhZ8e+\niEi/8pPip/n60O/lYOBmZ1oifEABiT9H+9t1o4ML3LqRMcc5VSuSEzFM8pyn\ngnJJGJC+OYzsOMoW6rx0lcD1BTTic9eQdfRNhuGONtSMsS7/f6WNctRTvWSl\ngkNZus7n2UsgiDmkyXmV0PK6A9MjI8vju3M/El4BoA0JhZ2CMK1TQiLtbPkm\nZWWVAyN0XR+tRjoBr1UDOsbirs622CxSuQRQ/8sojwiTfbckTG72x1fHcHx+\n7DLR/iBF2MgraS9cNqzi4MZr6IlIL6npIjAyFY/xdC0W60lPa2k90UEFp6xq\n9H/bz+UQQU1558OX/fLy2Pn6aHg+kVHdzVVKY69XdV74hjkB50j+bYND+8BB\nV8O1SX3EQlzODxzZ/iH54gQ+uYPnLkNGnam5y5fEGpRjYwMHv/7+YF3suyTH\nZGTw\r\n=DjOP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.15","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.18.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.8.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10271fc-1643594831788_1643594887237_0.07868680461932831","host":"s3://npm-registry-packages"}},"1.1.2-canary-10271fc-1644804465398":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10271fc-1644804465398","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10271fc-1644804465398","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0493a3e30a7a16144a811d85fe6ac9e66930bfe3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10271fc-1644804465398.tgz","fileCount":7,"integrity":"sha512-BzevhPs6OIoAouQE6c431phsjmhMt6k7zBI/PCq2fftwtDnuyGUiyGSZraNxpkJ9qkyjPSLdEfKzGdrnWPxoLw==","signatures":[{"sig":"MEUCIQD1EpaoB0vyiudDRJ+WcQBsMah7017z9zlvsnxy0VZWNQIgZ93+J01oNKA8sKVMZq22QWzKbYv251KbHqVFwOVUqPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCbmjCRA9TVsSAnZWagAA43wP/RBg8TV/qJU7dTqDxzjo\nHm0sOg4T29TDhCuVrKfAuR4E/yTR+3Pz8Zh6VfniXQGDyipc2J2PfUc1JXyN\nwGZgFaHu1Ptfliym57cdaAsLEdwdgyKjeUuEWmPmpdZ8tF65THHd2W8OOXDk\nmQJeLjbag9Y8ZzMKPEsm/ZS2d3SG3s0l7AovaLCxHn+JqD7Q9vndXdGlfbzH\nqrlNXDLVweKFJEAHPC7TUvC0zaBpixiAyInICHPWu2XEnxqlL0xOrzIt6SgC\nETbd7x+ICGJo67+e8867/3VRGrwJ7jiGIBjfDKCrkoMypMtHekAnNJvpV+B8\nVH92+csKmBqjNSgLK1j2U6+ujXLf/xQsS6TclQcXott7bGicYlvUfg1MRI//\njcsilHzp/rhu9yyeJtXkUHPMPYe0zX10gRBOiMAomRM96jx07epbU31z3Ynz\nxjmocB5gDwTTN7XfO1H+EH7HpeCY5ha3R9dvn3uxk1TDtTBOHbw5vCcgY5Wx\nQlwKjTOu//catDHVCGHvEOEbPcEHwqfOkxbmvzq6xxMYMmy38YnYEoGbJUJG\nA/wmVwyqe3ETiRVf3Yg7hnhGvBb5j4qO/iN5q8oFul+k/pcQefXjdeyuOR+j\nSQFjcptQg8n59cCOkyvgk4jshMJNV/fosrqs6F2ioxI9E8vzkPoNp6x5HKiB\nhEKo\r\n=z7SC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.9.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^17.0.2","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10271fc-1644804465398_1644804515824_0.6523766239262669","host":"s3://npm-registry-packages"}},"1.1.2-canary-10271fc-1644906796880":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-10271fc-1644906796880","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-10271fc-1644906796880","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0e9e2c380d8483687ab4121b3807f9c56e4effb4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-10271fc-1644906796880.tgz","fileCount":7,"integrity":"sha512-EvfyLWie9RXQLBQiOAv8nQHBNg6HJuzsvnkLQvyc+hMFxVOz2QEZdMzqzTDIiDef5TfSc7tQyAKC9a+XT9H7Nw==","signatures":[{"sig":"MEUCIQCBW3XfYvOFGK0wQfL5ilG7bLUT+2j9M95SWM4IhO0edAIgdbleFyuH31CGxGmTTfInh3JTNXAwM3Qx+0bv7YLxpTw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC0lhCRA9TVsSAnZWagAAh9MP/2px1X9TPPWRfrg8xwn/\ng8HncoYa31gpWVtxThOnCHVevSwCqnw/5xgYWjgeLiosMTGcHM+uvEiF/1tE\n326hoVn45OpRjd37YrMtS+YkFzZcjcj8nNhJrV3RBHYeKumVXSNLpWJQDvME\np9OLOAulIMqvtdQx+SBcz0eFCbwrxOxiAkxLuXvcA0UQA4Gmp1Hy9grI2I6c\nSgotX44xpOv13zw7y8Y8hQQYfcp9VRdAOCTO2lMPP2HxSDDwKz0s1I0qMYdf\nqZBddblDU6m6lwD28ELsxlp31E7ty8xXH+usSklfmY4iGZw6CNs9J9iXHHgQ\n1eNKvXtzfmbZZMN+JfAZyiSWzHM1i+gdks2I1+ESocxVXH3H3uBssPcoPhsI\n3v2hlEiJ8gyuMHNXHXdf1ZCY/F2MHmFZuyraMKqnMrvlDfahy4F+v4aG0oOB\nKmzo8nARYGZvzbzkPMLcRy6gyh3OqFzLpj4j9DiOl/UlxpGhf0MF5hCuevJc\n6IjG2QfGu3MKfvB4FWG9V0q8wEX+G+8M75O42BpmQYYKVJjk0ZWHLKxVO4qs\nCnf/Q0ZM69B0qNfhsIq6VIBpW1WIMygzfZGIxQGeO0N8E5Zr+P+Z9DLmYlFD\n/eTzAn5jspgEUy0mqKfCcZrnHdpf5RRvT3NTW3pOnz7mJR7TfnuVUltmANV8\noVz/\r\n=iuUj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-10271fc-1644906796880_1644906849555_0.08745529486674308","host":"s3://npm-registry-packages"}},"1.1.2-canary-76b1459-1644906996028":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-76b1459-1644906996028","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-76b1459-1644906996028","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"acddc90d76c8e0178d19d6be7053ea7381eb264f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-76b1459-1644906996028.tgz","fileCount":7,"integrity":"sha512-Pp586X92IeuMMm9N0HDu8/0ATuRkL16re7q0NwHC2vAlEmhm1YCC6xtpMAcqy5lugBG3D8DAdPyURwpPpn97YQ==","signatures":[{"sig":"MEQCIHRj8Q9pOkGvMgwiiGmi233WmYGmbIvpLKl/ZgWLT+wvAiAJvLQIAc1cHNK+S0rIJSpIRipM7P4TmYG15AJv+OEmsg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC0rJCRA9TVsSAnZWagAAkHwP/j0BJTci+4fQRIW315fL\nwFetClrd1QkgbDSb0Yrk6zMj9SvU/Sb6DKG6wgdV7b/pqdQuzKqd+9taopu+\nZuqvjwTTACDgXwdGSfYretrcnUYj5TMntDwbhV3T3QX3zsD8kRvtVIgMluJl\nvhtk7HFkc0UoWbnTY0O7m27XQKxerGb9/yJIXixspW6KQzxZpKcPaN/ZhMnT\nGwIvIdGPOzi8ToFRzyx96cJrjwnbMbIAtzqGpLZHiplGlOYuW/li5X2gQgKF\nOKjkAw9EbT8SXPK5xXCUSn8WfYW3AtbUtXptNIYsi6PeLLeEqiWPqra8R0//\nSAqgH8IEiVy2H2F6VTueqQun9qwFtYQAYHlS9973np849BUd36WmveZqq1gU\nLyFjWwh7KFupGeGZNQV59HRwGmEewkqKcryAOmsSJvmUXOCwf+Vn9QaKHs7G\nvdTVHyieOAI13aEUhdouLTfencYAq7xo/qxYWbGVuu2tl7/w+XZLyuC8NdZ8\nobhMGUjakn24RQJCD5LuL9rwqlsN2mQ5O6D8dJOwiA1xhk/4tM/rCXfaQxfJ\nBiF/qmcfB9eBKi/yhh6Lmq2h7/UlFOTcjkkTNWbwgxM58sfTB5VXaEKFytR8\n0zNwndhk2Cby8gq8C4WbEMP2p28OIVpX0DBhADV8s+Jgw+kyxinlK72tEAsA\nbw0v\r\n=FVod\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-76b1459-1644906996028_1644907209639_0.13719437875669116","host":"s3://npm-registry-packages"}},"1.1.2-canary-76b1459-1644907000100":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-76b1459-1644907000100","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-76b1459-1644907000100","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bf3ee9f1aca88b33d47dae65bcdc06c9cfafb2e8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-76b1459-1644907000100.tgz","fileCount":7,"integrity":"sha512-4b10V7ehtDC6QBO+VqwKPX2WvLKnoDDK4r5DqGluEAwE4Rs2mX33gjbxS1tINn3lpQs4+RnBxciHJA29/Ii+vg==","signatures":[{"sig":"MEUCIQDoKPHd3kCK4fppp1b4f7y9JXRF+/NRflBCpwrrEjwOhAIgNgbnznwLXzYSbCaOZ3qTu7KkcXcGYLKPI+y1kwIoRHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC0rQCRA9TVsSAnZWagAATwUP/iriLY3WyxG6eRUHXNRX\ni1rZ45vBc/JdAi0HSdbh4PbEiLc+r5gp181qzO98+fRZ9/x+Oj7k6dSe39/h\nw/rFfcdRD9nQdCxGyQ1RfAL5VPqf+5nOzk92j7RIXC27hm+wF4/b1dTXA98o\n+PFIzFzsEZMwwEXcggokmUNJM8zrNVyvpzul7E3Y0ax5UBBAIRdOLMhO+XOJ\n+lwlfWyR6W+rq8HrF26QS1d5IQUSTPL4DS+3GO3ckoXkYTnSTfqehZEJzLs5\ngPWJfj8e4tzaTDNMMQt4ZJp+D5kNj47AuEQWzwIC85MJnESfBIXF73/S6xGt\n8FDy0meShqtsP1jYGSY3mvNs21pCkjg+0keOzqo2YAcy8knkCClTJfigUicl\nfCOB9VEOL2lVkaWNne4Ao+KgsXlVkXmMgCS3RS0WEY8EaxlQ0dOk6MYiY50A\nlgcyi9TEqhfmJME0cbyNromgzzF9lAKUjrZLX5IFKIcLNjVq2dqLdNYOqVjY\n5OP9fkJnVjdgoWW1GZcYq0FdzYut3c5NuIHEB62DLXsDGeEWyK7j4EjdFX6J\n6nB+eoE3FzpkIMfrt5PJpaUxHWMcZ4CNeJbZyt25ufTYZ6VH7oh+pWYUWIRh\nGYt/p2qLJ4aWyDmVPjdmocQluMEobmJtUPYJasX7UuTVSTbjoMBMGI+qxAPv\nBKFe\r\n=k4bg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-76b1459-1644907000100_1644907216302_0.8267468177976462","host":"s3://npm-registry-packages"}},"1.1.2-canary-76b1459-1644907065335":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-76b1459-1644907065335","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-76b1459-1644907065335","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"68bfab86cfe8f8de07be9d32ddc27f0f659b4b11","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-76b1459-1644907065335.tgz","fileCount":7,"integrity":"sha512-MZ0hzjDmgjB6pMxYVG0rJYtFFNJpAF1XcEh5CzZyw1yCCJu78wszHP3WC4weOlWxIrlIX6Ro16OA2U1CpYG1sw==","signatures":[{"sig":"MEYCIQCiYUY8LVMbFWXH/4DgzA2El70eIv6m1yLteRR6HuZ3ZgIhAMI5lXj5Z85wTcNguJqa6tkOj+vj6OJXsplH80p47J6m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC0tLCRA9TVsSAnZWagAAfjgQAJZmKykyLiC6AE1F5lrC\ndZPpruNCq96wrApgOWyeZLA/kICUNUVGyDFis/DtWOy4gJXC32S1aBI6zOo/\n9XucHGobOfss+weefinazg+ybBhj0zRxVQEowyB4kuLtEKHYNMHpPNKWw7Bg\ntpXINHYRYxtbcK3oPt7pBbOKBblZD3hCNb/XZiLkPjkz4AUWnOpE2pf3r+4t\nNGUFDxb2UABRZSPVHTEfyPrdf4sa6G8BZnccrexWUcQRoM3UVnnVVshEP6ye\nLORfbVRXnXlOkWFPGpIkz3t1ktivRACGo3TrczNjZ8ge1K84ooANejSlOVZk\nCFRlsZPKm0v7y/ITbK04m0Xbb148uNUI5GOVBDEe0DMtaOoL44LgW2bEGQ9o\nOZcyIIf7jFltOjOHX2N55Hf357zN4sqOC2HwS8n4sbAOCAcsqP3mRzVo3fyS\nunepJTl3I3je/cw8QR4qWhp5o4XCn1EvSVrhiXMChzfalkauXDasU1CnupjK\neWsjcKZh+EwBYxUtwh8fpaUf4fRrsd9rhp4SF/yUTa19c+VtmSQgIzfH6X+q\nXWi4sO5SFizFb1DV7/LATsE0utAI/s7ok83qemXxPi4Il6TNrEqI3ygkeYjn\nIDm1dTVwmDhrMrDmcHCcAHtWDW+yoOi+SFQR/BraB/60T/wni2XvyDfnWih1\nBJEO\r\n=uJcL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-76b1459-1644907065335_1644907339014_0.586765569040415","host":"s3://npm-registry-packages"}},"1.1.3-canary-0adfe8d-1644907312286":{"name":"@iadvize-oss/store-react","version":"1.1.3-canary-0adfe8d-1644907312286","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.3-canary-0adfe8d-1644907312286","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1d0a3c3d19ccdb2b5901ecec06a00297d97683ba","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.3-canary-0adfe8d-1644907312286.tgz","fileCount":7,"integrity":"sha512-A5VKlVkhN+CZ59ooQCfTlvmBIJv/KBuXVLJnkxBqeToJrMF+AJNl7oM/42OhLMBOlUp7l8nP/nDHKYgtBT5aRQ==","signatures":[{"sig":"MEUCIBYI0DRUHW/+idNtHzZPjEDIyOrcr1Z+/NvGGoBXMVAYAiEA9W9ysmhvWB8dRXo8zTs8jJ2LQOx1T5rCZvdIiQbzfDI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC0thCRA9TVsSAnZWagAANGEQAIvLv46+Cyq4HcPYlvn2\n05r8ZrWY72DVZR8A10HsE2+4VYnW3t71z1vQIWnJ5a5yDQf7bb72tv5t1HaZ\nP0Jl/MXHggRn87TSo5vCHyHt1JKQWG7iTqKCxjznTzQmtV/Zql9sJkOtr5/P\nMoOWM57G+g0wVyFmFVB2DfmtkZPOmRgW6m58D/wQ3NAGBlnal2XybYLD5135\nZasHXPF2a+YCmrFSdD3xVVef3rlqj4chCv/r+m248iKve8j3/QnNdnnDiUw3\nLusxbTOT7I/ZOb0jQVytuS4v0Rk4EVwl1tdvywmDYksthEAHRZxvK020qJ+b\nBZ/1n5+pPEP++RYpYS4MxLIwjW8G/o3xoV9Pwz9HTEp2xhI/lIDSA64eviWq\nIpuKXS3nThydyu9R6XLUvYa0qbd4sm1tkHRFXC5zLvBgtJoRqFXiCWlMEg8q\nMyyHFwY/VnnQrGvx+lQXq1gMXj9u1pcUE25jTYsAfuiCJqZySlNyTnMv9/e0\nWuFxTlIBoEPhPmB9bj4bixcMOfAf5BMZ4/UpJKH4JpglWj8gI6nP2en8mKHa\nFVyoCJkf3lxhSxWOTT5bo4+uAtts954LmaBLGjeCiBlsGmIOXZldIWdMuHpp\n/4RXjMGrFKsSUDpe4cFPEd8LdiOISY9xHspxH+qg9XdnKGziR8S9q7h/fCuk\nUExY\r\n=UXxg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.11","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.3-canary-0adfe8d-1644907312286_1644907361242_0.42691360679654866","host":"s3://npm-registry-packages"}},"1.1.2-canary-76b1459-1644907127070":{"name":"@iadvize-oss/store-react","version":"1.1.2-canary-76b1459-1644907127070","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.2-canary-76b1459-1644907127070","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9e5a3e2a3154238ea06c726c654a9397de01d374","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.2-canary-76b1459-1644907127070.tgz","fileCount":7,"integrity":"sha512-Q2VhtMGQ+nRb9TlQIZ2dX5t/g5VFFojJpLsrciJAGKQthdc7ii9xdKHdjLxpAeQ6l8z7YKgrTRG+31ubPwYn/A==","signatures":[{"sig":"MEUCIFzLpPCGphDy5/COMkFmgQJcIio8FpC2Hivlo5OOrWVvAiEAoLxPizbn58aigfzZEPaSkIGXtGS6PbYOLSh8aMMvV4E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC0t7CRA9TVsSAnZWagAARwsP/jQ/a85MiyE0v/nSYwTD\nNOS5Jr0snF/pzq210lrR+leEpga3FFQrXbX7o6dOiy1cktx8rurxpXHZmkVv\nQwR/WA6r6wFg4gs67CKBumEqarGdsg3IxfTBMhH/wMHbamZEWNQiobbwR03U\n6StgomItJ7s4wG64mF43DbSrKQXMbC+mmkQ5NwmTEWSUi/+8YO4+Gqh3b6GA\nivAAK1gX2wCW9nbnAmS9wr8+dWqt1Ii3o3T7xhsIJVzUfzpp9sP2tw/gEumL\nkxu8Q2EUn3RNaIHULkpLO8A+Tn3bpf2MiCsbNc2YhO7UU3qwF7TK5+ciHdX+\nD9p1a/EShvlVhG/+Vke4sjL+ez5fZtsTlQGItSTULatcfQ75E8zQl3zIa5nV\njX0F8Yf/gKgWX7u3ZY2eWGVFMxbgI/+werEQyLnNILqKWS9fUbJr4Bd90p0q\nRjgWSRWl0S5PGd/cfpHMT4OFnSvlobHwMLQ07aTfCQHXlGi4fYpzdAIH/4Rd\nBVw8llu4Ou0RpXscfr4PjIKb61wWsx+fHWgQwuql+1hbjZc8BogRnhzxsF0M\nWGGlf8t4WouuTGaWtspaG9ogIPjrVvg7igL7pDBIBAEAcf24Dvu5eENFFIB7\nNWyCi6A1Un1MygREYKVtik7XVWd2RJAJ2kxeej6osR2J7/A2cBMPw2boyO6w\nJu5h\r\n=OLz5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.11","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.2-canary-76b1459-1644907127070_1644907387269_0.94214112062122","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"@iadvize-oss/store-react","version":"1.1.3","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.3","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"0a9f4956264c9a837ef605e8bf22553cf6a62099","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.3.tgz","fileCount":2,"integrity":"sha512-fZPUIfxxBx1bOb9kSpchbEb7z57nTr01Xs0VYHS4UaOS4j9gs+kgG+KaQgHqLAkqBgcnKpkFriZfHfPK2i0MpQ==","signatures":[{"sig":"MEYCIQC/0X7B9K5zxtEh0lLroaBjIl0vap8kJ6s5PVLubH3l4QIhAPeY0mooBIuy1x0BxNw73Nxru1KO3oEbd5bOrcEIYw/x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC03JCRA9TVsSAnZWagAAE48P/RfHJUYKSfd72UsEuQI4\nJ6Cqoq6E/CEdS9db8tIwvLugoKhCMAdXIPPTovToJDkpw0fkwtSMiRYXViBm\nyIJDhUr2JkIm5FIwm3tPSz+iy8gEFOy3GrG6vsi2KdhPAgov8qbr1dHYHd4F\nvyg8zaQJordOkHpc0lnMi/cog6jTywFlpysUghd7pWEtbSSctIT7Zb7hm8E9\nICfE/tUTuuhRAkE2HlPMtckJL5rr7cRIylVGOV7Wt+Ebe2o+kRycODT4+ssH\nrHXq2RdTu3FGRx0R65il6kwwRieXE7MYCMCg2/meQ4Y0GTqrtemyryx0HxgT\nMMiOAbjbPPTBy0Nh3VgRcfaq7IAQB8iqVBXO6rF/JOD0e+CW4kuqzBHVNp/H\nLdPFQIJXxM5xmEVTyKtsXxRpUrZDvzMbLgl8AZXzyxPc1DT85wDR5YfjH37D\n6+TBs61EZWsDDJ2osTKKzmefC25xbV1korg/SMGshN9qhjGM/EWAowu5tmUE\nyRhByDWfwjFtBtoHWxvT2hI6c7Crnj3ZjE4bRorFNnLZQDYF5i4IE0QpuENj\nfy2C3ux2IRwjJ70u9xPcBizLErjoOaXypM6hDhKLDRTI5ezOW0rHdZ72ZpRs\nHryIheylhyRSPCPP+jfifSYh72nyMJRgzgDeIqVHjyWOHxk2tmJ/k9+h/SMS\nRz2y\r\n=hV+a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","gitHead":"0adfe8d2e9cc14ae9347cc54453b0146f6d7247b","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"7.24.2","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.3_1644907977043_0.37694482146142105","host":"s3://npm-registry-packages"}},"1.1.3-canary-0adfe8d-1644908987561":{"name":"@iadvize-oss/store-react","version":"1.1.3-canary-0adfe8d-1644908987561","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.3-canary-0adfe8d-1644908987561","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"285b0e6b593e5371994ce88703fceb3bfd06303a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.3-canary-0adfe8d-1644908987561.tgz","fileCount":7,"integrity":"sha512-0lUCVJovycQ6nMKaKgwIlEzsUUAEPjmcsYtwpXzuYtW95BFa0uDeQM4mtNwADgatyxxnesWcnBOQD/b4f58mBQ==","signatures":[{"sig":"MEUCIQCbMGoKC4LWl4q6mxntmPHAE118/WRHeHgNaHhq7AZtLQIgK5aUF3rY/gJNSVFG0YzQsCcj0fQ2zVvV0pB96FS6OQ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1HoCRA9TVsSAnZWagAAwRQP/iFCpW9IRBIyl/t1D+Tf\nRaGW15Mjl/Q/ioFyDumImePCJBbtraGFpSzjCm89ufch9al3EWmovoYuX0YW\nZzw7wYwkIr5tZnJS7YdLDYC3EfgJQEatCV3o1t5fRfU+/aXiY+1V0g6QxFsq\ntuz9FmAwM/oElI++HRLUMPJRm7DMszdTHCoVVt9PFHfSN3YLc4crK6/eIw6Q\noMxD4LOj9D/odcECrr+tws/3yaOTlENC7iyBpZB8hE8Nr6yJ8MBtFzMqFLPj\nENa5JFGJm8b+IFBVDJ8fF8xpRN5HTBg7kDDLdKvNKJhzRW6z30wm7D8ZkZxu\nudgIuIljx6ARGD5tQW/atrKMGyAtElIIK3/cxNC6pm5cJe8tgRlCT0HeHYOj\nJXjd/hW/ox8Bm+UUIAGypn48hienYHZXbEM0cgM1s5f10UHCRkio5A4bvA2P\n0tBqhgW3vjk9nlub27nOZkGH8HUDGjyGwx5je0vvgqmYkfPp+d17XcW2Ltct\nOYdNYluX7d3ULwsuBrKtjuL1o7cnJTMl4o9hxknLioVtAc1D1cdBhwvWT1mn\nywwge69tY5Gx0EfMG1D+QaJrehA9Xk1Pd87wX7RhFTQAnCpKU9Lbj7R8ofs7\nJp27J6wmKGpF46xpxI/vGqPVGz5cuVH4szrW7SsaIJlhYFA3w8+gO4KtD2kZ\nWhXA\r\n=Y5bg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.3-canary-0adfe8d-1644908987561_1644909032064_0.6932147329889224","host":"s3://npm-registry-packages"}},"1.1.3-canary-0adfe8d-1644909078651":{"name":"@iadvize-oss/store-react","version":"1.1.3-canary-0adfe8d-1644909078651","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.3-canary-0adfe8d-1644909078651","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"70f19cc2b29ebcac623d9b84c2e557797d8ff840","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.3-canary-0adfe8d-1644909078651.tgz","fileCount":7,"integrity":"sha512-mutOGtnccKQ+tnNwbcHKtEhGNGbuAsgHidiedFyy1tTEZ2aoolnkm5M+9ibVvf8hKDhJpQW5SNHWqFFb8kWwQA==","signatures":[{"sig":"MEUCIGvB8gqpNCYh55xWKNZZwemilcKJa/oL4P/hIF0pJztHAiEAxTID4qL6DlyNPWp/lykwuCPIiiEeAvjR+io8UpHn3hQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1JBCRA9TVsSAnZWagAA0N0P/3WbGb5xAZqHy3UoIbvQ\nBsh/D20IRkN+loaEiP8YvLsSLGvtJFb2uY0/vyOY36Zu2K04oi2sV+VUsEYN\neTLvgr+FWDwFT5SsH40VgLXwY9ZFyC7FtJhOUV4pm8Ykl5irwt5GPzL5UWZ5\nN7xgyXXY/ACoHIGJrKsPcvaqRfQAP0GqV8MHZXMQ/EgaN91f1/XiH4HkQuET\nZryCUGDBM+zKOHhdADKsfKOePX0PbNwmAP97Tto+hSCJ1+2M5qDdDl3/wmVn\n8vReox/7rWAl+Jegf8YNM48mGYKI5GczFe+3g/rLCaw0OAk4aJjP47dF78B4\nHYScKTZhaLiB9kAXXw9Rd2wxJFFFhNmPQkFa26E38uzjkJ7qGEY1l9ee7qI2\nkkU6JIwa1atDJL+tKejjnbocgqqMJrK36yg1tZskQPV6oNgmB2DoHE3qs9GA\nJmEwz7uI8NO7gJZ5i94yQ7E8Te+Ez/hjZQAbEvCEWw7cAaL4CFNl3J5sfZSj\nA/k75OOFuKST04NmOZDpI/HikOXPMOy5em+Vu9OSoz3GqD7Spd6gSXvsq6OH\ntIYIuhJje/bpy1XN3x3xiS55ZmFrE4U4EkEN1MGMyYH1WoG7SN0r18BOxrWa\n60ETu7zFvTpbth6T5RRKx3TD/sFrsPIXbw6dK74dhJLYMwoyQ4DIFvJU8E+C\nK7mW\r\n=8WQ3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.3-canary-0adfe8d-1644909078651_1644909121373_0.42297585321554587","host":"s3://npm-registry-packages"}},"1.1.3-canary-0c81dee-1644909262507":{"name":"@iadvize-oss/store-react","version":"1.1.3-canary-0c81dee-1644909262507","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.3-canary-0c81dee-1644909262507","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"767e6b710cf29307d0c760f680a4a8ad13f34dbf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.3-canary-0c81dee-1644909262507.tgz","fileCount":7,"integrity":"sha512-ROxv3Oj9c6QqvLR1tGKX3Lkxv0wvNWrbfzYeP797JE79d3Sr/OCmE8wm7O424LsZiXFgjKcoRWZjtbijGAR0lA==","signatures":[{"sig":"MEYCIQDxUAni7Ohy/MzbsR+SehZwk1hVWYTRQkiHcZxk7LxK9gIhAPjvp8gRUjgiNqszB/HCvgVt6rXfIx4ywBdYqvK4Ge4X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1NsCRA9TVsSAnZWagAAfO0P/32/6BuB0SDLkYAxAyGh\nM9V5rD7r1R/SCA887mFaCBrNyvJXXWQRI6Sl65NiUrknbL9+8HOxsqd/KO3M\nU3ccqyAPW9VUeOuVZmWPG3ZWIOPQiNfqtM/Z8cURpZsyj3VW5tycDj5MCAkT\n4AEAkYGCYLpCWL5k1zGh8u1Jl/DCYkrQ+1JAjtOH2nTLuLMSlHaS/FNJqs3M\nx9HVm//ekpmKnAai7P1SvLvLOFFEy2sk3g9sKWp1sgAcE/zW2Sq1jDC2ms4/\nEXCMqmVRjzSs/hZJ9LtOm57M7QJhDBWWnnR+lxV+6wi8PEw7BuIB200OTCwP\nmn1mKQ0WprpS6NP52wgOK6Zxt2KbEH+9jc1GBMXSf6APn8e5A/PA+l3+EPQW\nPDWqYHRdSaqLcKvEsctwebCcPIOzHAkrl79xX12/wIAMXPW/v4x+BA566VAF\nxpBwxLLuXyOUBT3mC4QeWaDs+qq1AlWzGQ0Cks3AmTsPG5J1sGNZHqmh4+N9\n7p8o7FHA0gvR0Cx4IcdY8ZemDsrJFv3M9uynNB6+DvkACLsPYq6yWmK8ZrDp\ndTSLOPgOLEeRNT4b6Rtmq6nL3zeqxZTuSMFQSufZn9agA6CVV4oZ4brqF2Md\nLlMizU9Le3+rAlULDszeHPfSIZsZ84x1K1nbjYv+LixCYb7CiFO5alZymuBV\n87VK\r\n=GyaM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.3-canary-0c81dee-1644909262507_1644909420853_0.20980746355130475","host":"s3://npm-registry-packages"}},"1.1.3-canary-0c81dee-1644909340242":{"name":"@iadvize-oss/store-react","version":"1.1.3-canary-0c81dee-1644909340242","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.3-canary-0c81dee-1644909340242","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d6ad2149329751e97559917ee24e65de6ce2740a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.3-canary-0c81dee-1644909340242.tgz","fileCount":7,"integrity":"sha512-pTkW+FeggUbNgyDfVsKKIHhw1cSNCct3tVmEo1GcjPWbbmYT3j34kRLfMnzHcFvS8lthAtvdX2yqh/5+fxD9eQ==","signatures":[{"sig":"MEYCIQDp2hTwbn0FE/94eehAlbKPNVJQ1/D/IfAzztc9juNQkAIhAPzHUwRrjuRoDv0jlDjIeCPnrhenjeqjfOFne9BB5PLw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1O0CRA9TVsSAnZWagAAkIIP/i9jy9RR5SYh6ZrenWVt\nMruEuafwtTVXR+SMJEA7MoFAIGA+YMj+Km57iUcNCWRMJhv58qUMnMgMkZX1\nqPvRoevdOXj1lcuh1ah1fkgZXVUwO+5bFGCtIlHzxDJ9B3tDWByl2klVAtrO\ndDgd/4yFVhNauYYvZbHCI2zwoD1d5sa5gkyt2MTbLBZ43Q5nQAjQtJcWD5ya\neNhvZdpoD9ghFjQYuq0flUuu538qhESpgVu5O9weO+j/Z+3c9sgm8PiyWeib\nLsigQdDBa5FIEKSFDdYVdHKhEfV9p+zy5O4kgwz5UibGM0o/5uddjwFLTxbE\nHEpOAlT6udpglJtiGbcACYg9En6dJx9XyV4nOSii2sc0EPnHTZr172cA2rqW\nojwVZ7WYUyZcrbfSDug1JiA2l6xNLa9ul8dAnr8ftMjWEncDVB5bwxN1wgrH\neVsrCX0feBb52a8+Egtbh1QvhcDHMMk4vRxibcWSs/If2QZrxple0TMvEris\nWSV39Qpv1wfyXebbwbOdToaOco7EmXhCowdHlASZCe3rPFH3hhY91klA2t1W\njS5J3cvk3299iF2aDMpJYhYzollu4Xr6qrY5lomSIUccFBw4grnPXVg3ZF5/\nN5NoZ5Kz1GwrVnExCpW3dY6jNXv4PvyDtyCNbblqieuVVKlAEg4k2fkkFn/l\nwPTu\r\n=yC7J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.9.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.3-canary-0c81dee-1644909340242_1644909492195_0.522198036812991","host":"s3://npm-registry-packages"}},"1.1.3-canary-0c81dee-1644909345004":{"name":"@iadvize-oss/store-react","version":"1.1.3-canary-0c81dee-1644909345004","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.3-canary-0c81dee-1644909345004","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"17a63048bfabe00315b649be2e3b9a167987eb64","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.3-canary-0c81dee-1644909345004.tgz","fileCount":7,"integrity":"sha512-Nuxtsnke4JHZMbLBWJX40JD1EXGemqU+U24Qow/IOb/MJ5m/DgMZjxcro/fKB1BGtVBQo9zwOHhSjgNUIjakHg==","signatures":[{"sig":"MEQCIDNVElZhqdzZpLqOViY3dNTQZH/jYfcMYBn6OAiOqV8PAiBzeKrux5V3S7epaZInXZ/A6gCiufgdCJYAE25EUWaEPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1PqCRA9TVsSAnZWagAAao4P/iFZJF8jFPMb1CMpn741\nQtl7XKY0FikFFWC7796076bvyMlVHR2NheH2GbIMwVJwwed0z2zx+VM3lOTG\naAH6o5QtEyj7w8kMOFs7F5AOBWpXwFtAemTK0h4+Y06X0USLyj4eATaGg/Vj\nTw/a90SIscAmNMyi/zcsrIGDfRNuZxCl0kraEyNbbFB3GUuEMg7pHMUEa/H9\nR8KbkaeIXrNfV4eolBRWH9mydFTfFg+lJasxKNp1Xdi0kUOJgNfZCSXFp3vC\nxhZZsrzHPE3u5goB2amw9dqEpWMicQAkt2O4UUPQhueOuaqMjBEJn498HS3u\nJ1jCIEuhZJHgpCqRArPHfjfpHYtnoWtHTlflFl8R9riL0zrjBh1oKp68zmNx\nLmtOT5AWH+Jbqogn9funmh6kTKN1XlKpBT8JQCQNzpl6+kHzgv5HDrhl70bV\nWnwTF5fTVChqUC9jnSyYM99vpBG9zsKSnW8IbQNWjQz3dOiXPkvMmArgeUEi\nODhoeyUsMRI5tqyx6HnOG6FR32aOLXTZOv3UNzovJzfvAzLD3STgMD7svGOq\nlA3/Zi7ekd0OhYnmGft1bHQ+cSL3MsOgEjZaPpwHSBkAN4Mip28rms5Ufby4\npXWIV6axzlfasTHsPsZtmkvR4mJ1M95OmYowfqfyUKHq7F4txVZlBEy6pinN\njkzK\r\n=FZtX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.3-canary-0c81dee-1644909345004_1644909545915_0.575548007620833","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1644909403598":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1644909403598","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1644909403598","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ccf6fde6f7f98577f7d68016998a2e2865f4a2a8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1644909403598.tgz","fileCount":7,"integrity":"sha512-fsVxsqNv4/KSD/PLOgSCziE1J37m0c5wM7O1tPhvY2k0v/5S6tQ4f5skJ/ZyMbF3SNvZfhSu5Zni0xgajUyb2g==","signatures":[{"sig":"MEUCIEC5gx5USowVot4k7ZyutprBR7FfcyKCg0YD6JIkvDDbAiEA08oI6HCAgWLEbKvOzzaL6NDjU/An851NYdNfKEn8jVY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1PwCRA9TVsSAnZWagAAzL0QAJegLiO3X4Lk03pLqWVE\nO+jRVFuF9Sn+rtu2sLJQJVhUF5nCkhO55SyKb9Z5Del6PKzxWnAEY6tqaXW0\n+zO973Q3G18+BQt1NwN/zZqXZZkN/kDPe3m21zSttAUkNGPUYZucFbKJP+NC\nWe7Ktz3EeTorZvxrRuCYkZakEFYgxPNUJI/6LCZDqzhHhlqkuLGKLt/pOz83\nHjYPBvVojKFKMoSnMG7ddGLk7BXxCjVuYHqdn3Kfw84vpexxm3RR+oe/7UNa\nA66T7boXQZ6M1D3EdYJ+25FgdC1zN9w6HPOvH+QFrr/MFFgY6sZ5/JV/zNgl\n8kCXH8Bs28NITMVhGTWyyUDPOB39GNetDPGjtSpNXWFDXk2H5OXYWTEtCLAY\nnVd8rIbGDqcWRnhXFM2VchNVFU9pNW6RqB1JTCndki2DmHhxhTx7DsA+XaxN\ndJq+a/AVWSsBqrk4OKFenR1ACrlUFd+tdS7bqNrtA8CJyPykMqvKIW6McVnq\nS3ecHHImORjWHs39hx3lgf5VWVS2CSQzppyxiIJCDRsdxQxipdeB4IHNuAhF\nT/iJ3O//ifXSL26YceSyX4MDkMrKoiYsH8GaO+0Sxq3gwJ2Y3C5CnEvmo+bu\nf4vKOqAW8sOirbEQPahz3KShaaFzWYzlF2Hxdh8QS19y8FU9UAiZZ/FApPri\nZnM0\r\n=9wZ2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1644909403598_1644909552730_0.01079304501050049","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"@iadvize-oss/store-react","version":"1.1.4","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3b4f4d49a0721993e01ebb9f2e6d962b8ca5ae98","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4.tgz","fileCount":6,"integrity":"sha512-KtygpWZPb9UnWD5Qq7rqw1jjmSMWmmxTU+4jVhl7DttECQHHdlBFKBX34zTjL6UQLah4ow4c4vZ0DoTMtGEJeg==","signatures":[{"sig":"MEUCIQDz3FCAEnnFfNwovm2c3s6+VMFSzbuCMArv8uypQJ61lAIgTR8T+BqLRSyCYwretvfAhwwCtj/HL8ZZHclbQL1c3fs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1QdCRA9TVsSAnZWagAAHYIP/2/GnWn/NIZYidI6ynD2\n3UiqLPkNgQAqbkp78TRobS/8rnM53aUbL0y/s8kLGVQyfVDFoD1qpO7Cf2Q4\n6aSdYc3D9bJZyjji7QdjNyhcmTcnc+lOakWlayKw2o/g/77LzTOhuiYsIZEX\n5q9ouITu0/9Cr+lvIEC3Fc1AttiYXKwWgGVoM8HDXO8frbSp/GOvj72EDIbJ\n2tV5dURS6vsKNBRxDlarKyFJtfl7SVHZW5CGynj+nxIvkm+KPGqudbxg3l27\n5E1kTkY+OUC9jgdQABTNqXauZlXh02+P6QzMnYFyLRk2IBfZ72+Nh2kvp+pV\nwQ0itElbVe/ygxk4SIRo9il4YXQjqQsVMemE6RXqirs8910uD2/K/bbG9kJh\nEokdeCsfsEmfjW7+yw+GrVSohEMNTxRKBMncjqsDeggJE4kRFewr6Z0bRolC\nw/yVykVzJEua4GnFd26GQadWMSaP24r53jcQQr3wDtjPXsui7eGjLOUzXluT\nPZnX/G/MxvDGBGcsKdjvqQXjFGi/StwnJyitUtjvIVWfp+VZt7lh8tFJDnSF\nmbeqy1QL8h0Ho4yOcs8feneUHHGUsoA+8WhxaRgmU6SYdAR8z75eXWQ9ov6e\ndwUngNoJ7x0U1EujEAHhnCtpws7nKFe8ccxDA//yN2AvhmcJ3D0tESFeBjh4\nOgBh\r\n=Vj3i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","gitHead":"08d62d2f0c3d3f6036c641cd14832a8f09556607","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"euphocat","email":"nicolas.baptiste@gmail.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"7.24.2","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.17.6","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4_1644909597328_0.8560908523449953","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1644909470221":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1644909470221","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1644909470221","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9238f4ac2f178134f0f2e06073d2329884c3330a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1644909470221.tgz","fileCount":7,"integrity":"sha512-1TnVgXyhqbFBCdR+zyng1OXQpOTNpde2aszfBZs1lv1JC40a5KpWTZtBemPCa4uql7XdID/Y0wu3JJ7UMEoOeQ==","signatures":[{"sig":"MEQCIHov9K5FmC23e1g72ZQrXXpnuqXh/l0jdhjcn1P12Xf5AiAsZ5HuCVPGRJGVWgJriAMMkiOHagvb3U5Dk7+Zw62RYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC1QkCRA9TVsSAnZWagAAtycP/i7RdY+gJldHoid4sLKJ\nv0qG8PpUg115ov22Xz7qzJHdHc20UVRFh5xxWgy5gt871L9G/cy7AGtb8TqI\nqyJDB8p6gMCtJQ6knhmW6CiZFt1IB6c5k8JYOzVOb7RWpaS7+kqKxIAwRLg1\nckZRT3DTLTFXXei7aRZySz8Abh9UDCHOChLidBtKC/JJBHuPRIoCeT2jbc9F\nsP0m77nDOzqbhvme0kZko91fWu61OYo4pacp7mD3P9ka7xT86Violy7KwLI+\nX5yQNeoCurL/r4Fzx5djWr2uFsjmJPFiiNbLrXUnZ3LUfZm4FoUQnosVhagC\nDeP3a1FniqbhpXQNyNXXRcthT4f5LC3cpcTLXRUPFDjHzz+Kgl0vR17/6O56\n97p13TZy7w8/sR/L0rJRntBIeIh+Zfs2CT7DSE1X90FP41g/kdNd/K32uhVI\nCk7UBgxPqZPYILokpnJ4MKY/ibnGIPyGjmANW+jXDlQLzSwil1ZKU/NHN6q1\nqQxUC6/ESR3pLZdMfUlmebx7Nf18P9YYuZdg7MxhTeP/yrh6b3n+TXMMdaDL\nEy/WJziok9tmBDaKVX+7I7S3gwcO9dOB4Wl2r+AtvbM/nZkAUPknzPieGqbv\nqtiWWyEO4wk9vF5/pSTq93pcDJ7W9UCJ+kdGL1hzCmSOxdeAg2WgIm3wHROr\nqAuG\r\n=WzP7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.9.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1644909470221_1644909604621_0.0008952682433316372","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1645409247285":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1645409247285","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1645409247285","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2bdeb1ed407d846063cdac7465e146697567d39","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1645409247285.tgz","fileCount":7,"integrity":"sha512-7lQrHQHSxpWz0yFYJtYHyV19BJdKNVXQb4WT7F7INAIMPypW+0Owe+1qoqqPVtaUWCtjeh0BnUDnZqIoRFFmNQ==","signatures":[{"sig":"MEQCIClPev4saDN1Zx/3uL0CqqyP0whNEWHKpuRCFxaK1SftAiBwKETWNhdP6XcVnfa+Ov+MBZtbdNS8NAiCTIgIYAsqxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEvQQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrs+A/+N0yJ7s4GTZ0WCeMQIihI5Rqu5AZoBxbqJrwJiJ9B5RARoAHp\r\nSRAPkfMeDxCnMREAukrysxwWEQMYqo6GjnQue+74MVbXYmkaABS+eEC7gPVs\r\njJe3QfJRDKhd3ZBlu5U1TAxSD/nTVAvEzF8AKK5gl8+F1nDV9uhNQ22BPmMZ\r\nBMKVDv2CE4pUVNWdm30YoKaSGOfdWBXosAhBZ7Qjo7SQvh+hRX9xL+o9i4zU\r\nJM42G30OXWkN4w3XPZTnBNLcYVjIdwns8suF/PoyGkVszKsBoh0MlkKpz7bF\r\n56gpYtMNSwe892bJMc1eOOO/Wi6yHOTs21OP3r1F1EhUPgv/rzUkaouaLgdE\r\nZ/XISz/TiiWrd2ynUTroo9xFlZsq1WOdWKpap76lJSIrB1/6KIebQ+S1LCDq\r\nK/hVls4eWaDrQkJ8R5/yzpF1scGAzwdj1OQGYgyD5dKLLdeZkiJiuKZEG7jM\r\n6LaV/1ukZlm5wJ6w47Asgv8AEVk4Kqq31G8DLQGubRq7rPEmtv1BrofcUkzh\r\n3fT0DgAsEfleCeFFdUyi6hYRM8Czg4EVjNyOYJaPJwh+dHMgRXwXkqYK65jG\r\nyRxgmBcI5mKnVe76Q/favnExljUtbjxuFYqokFqA6iHzy93risnPABa+yHwS\r\n/iVRR0ZHrTJLO2hDs4atTT1iJ8Mi3vYkdwk=\r\n=TCkV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.12","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1645409247285_1645409296449_0.9503922749008491","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1645409247495":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1645409247495","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1645409247495","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"790e469090a843a8c11e9fb6659bea0efaa687e4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1645409247495.tgz","fileCount":7,"integrity":"sha512-o4hUTd8RxFdGgc+2z0/f5unTtAHzkIymrwf9670pJcCxYRls+oMhsjqwyphsk5FzHRtPt7069iHGipTumnBIZw==","signatures":[{"sig":"MEUCIQD4HXNze49aKf0iohQD0Ck13LM61BD2+rorSOwLNQ6IqAIgb1ZtBqj5qKBd1pIblhPKhllRnPoH9nPIyj2qW66hMhM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEvQbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfWA/+JaIjO2S6f5wTl2GDuUNotXDDW9lbnaqDfEmcgRGn9QgNDOf9\r\nN4l76klkayfKcIu1BEZKHuivFxll/tMS/M1ujgD5Dk0yCr+f68B1rrwMICIL\r\nMidRNJtzxGcpD3q8CZP2H8+45GWNag1iDIOHsixi3sfRAecBv1etCwwW98DT\r\njeLWYhYf9/UFdhLXfa7BDzJG13KI/2bPqIBFd8y7CMwcmkT6OZMD4aCbYyGR\r\nfTNqEqRPj8DJK50lwd7j/Q8FeUojJDkJNfJjtomuXt5AK21Di4Kh1NBgPd4M\r\neMEj22pYtQ1+BqzrI7xqoIXqoPAunJZJAbMieGxWOBfyEu5/IBvDDj5MDixE\r\njV1ws0FlDy1ICOytAAkhBaXp/f4GJfvEYnzXm3/wUAs0zblnVpd8Uj8BtAHr\r\n5CZc0q3sYz/WuyJeeVED016sMl7B75mq9PezQPpDSQagTNmASuYoL09C7FMd\r\n+zZwziS/zwZ9+1LlycHuBNVKY5Lt+LfWq4im1Rd9GszAKJwy3+1VQgjDrWre\r\ns107H10L06uVs+ZnHIZlNEtkGFGzTkI5J/weopn0610Nl+LFZmgSUL9d1Z8X\r\n6i3vTJWrF8fBEHK4j9aX/hEkWvUsqb7nnmwYDQupbI2Kl7dWxcCFt6F2H8t2\r\nV9MJxoVQ2KuyioeRH2VjyKctY02pzLohEog=\r\n=G2NF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.12","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1645409247495_1645409307300_0.38781542368185606","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1645668393598":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1645668393598","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1645668393598","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d8f1946df0e91ccf254a75931551469352241e6a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1645668393598.tgz","fileCount":7,"integrity":"sha512-vY+2NKCRHUJRNl8fLyyDLarRpPu9Dpo+2TEZRkMRUHfojdud9sJdR8d9PR895Dj9qAPt7B8zdU4GTodU+9B5gg==","signatures":[{"sig":"MEQCIQCDzoY58kosJnwR1RDjhyHI+LX4ulL1T5YgR8Bbwv2xBwIfbGJFy9tMNhM0yAKCjd48LDjdU3fxy9DX8WG0AyBS6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFuhYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQcA//QCJhsRuWNIBsZt44UzvdPmwuiygHzIDQoQB621sFPwmxorbc\r\nDnAZ86VYH+p9WevuWFsR+CYaG6Spfn2cC0ZuTuNld3wsrHI6UxK+z1BMqBxV\r\njQDP7OCWSp5EEMfShpHH/a/LaYNDsoO50Y0PJQR3GzbAyqffHHcFi8uX6JM0\r\nQK8FmshCifmGllNV3DggGPTVKCNCwspGju11nEP6m05Y8cqnTWAzSA1qrZot\r\nlklgyRYAwYWyaova0mewqdDekXSIqIlqWiNc2+z/FIv2OJ89XEXFjkxXe7pe\r\nvCpN8JQMgGw8xUcPXP+WR0lfY0Z4mRzGZBcVIxMkwHZHmQuJ/Efo5fr4cWBQ\r\ncms/NGEY+GbvziOeRM5IAu/E5njoHM0ddpZ9wpPo40s12YPYziWLz/gvfRLb\r\nfYNCWSYc9HGZ6D0isnY6ym+HcoVCuhF7C8Q1ImLB8oHC005A0iiy6I0Ui3pQ\r\n1ygnNiJu7YY+Ue1DppBcVW7eqH7v8NL9UsLxBvkpssaG88qlKC18SDEgKg46\r\n/SY7o4JFriR0e0LrMh93DG0el1mHdLtbAiZxf3Fk21fpy6KNKV1+mHeYg9lg\r\n5j1EqP7jtFI0qs54n2tgWmRVh/KlvbnJEdF2KJvsg8aAEfEV6cB2gC15qDCC\r\nivmclbVaZbNWzad8CfQuR8JvTu2in4MLfuA=\r\n=caZS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.2","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1645668393598_1645668440229_0.4972969737005857","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1645668395191":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1645668395191","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1645668395191","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bd0104b39cb9bee94d30f5441102ee01011de3eb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1645668395191.tgz","fileCount":7,"integrity":"sha512-y9yaJFXPNlwZUf2gWrv7UF8+yQ989IblR9K3FLIiqEzC/pq4oVk/VpZMzFn5OIjMsUYXhuMbVOPGA0X3v4kD1w==","signatures":[{"sig":"MEQCIExVageV9rDK2FzQs6Ww2rwMpLgsd18xMM4WaewWC4rHAiAJNw/7BwQaxivefxx2EMCR9uojmyqe8+OXh/gIfSYrFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFuhjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbIw//RdurNWptU2eLqn6FbO1k7Ic7z6Kl1843ZfpnESzR8DCfssuT\r\nkZiHl5e2Wjg9jWMayXZPvM9zlTM8rb3xd6J9hJ9JHYMLEiO2GPXzun/h32yA\r\niKiqSC2FOUhq5Av0CPAhSVEkY0wH2GvhPVq9AS8z+TmZzoBi8/RCQnb33Iq8\r\nDADSccgeBIKAQC96RkTIUuZzt6GCg9AL9vz3DjrlfcbkceHUv+o3E9/ww0/x\r\n4JLBeWLXnPunaANhGx+qGp8LGoWtcjxDLdekTnR3CBV9AffqG25QefNvGO7s\r\n1gq+HiQoGzuKtT3FWU/PKNMhMRBrJGtSggKFuVV/HceFUbauIjNX+DFm6xA2\r\neh2tsjAc72s9o75svj74vJxGiwPcjHUwPoKW+B1mTen0VHdD8vPfgyouHykN\r\npnYe4DmnoQWRQ7SGYEotH7PvGsqJdPo4K2B4b95EfUEVtx7d9Gm6ZojLJ0Dj\r\nX64OG7+l5XHcttjitkxziv+pk3J+FKZwCAhbNDUoQrad8mBUjPpiPuJM4o2w\r\no8VAHOw1IAXE5q89ztWSMCDDw5E2AzOaxcwOlGi9QldYJMqd2uyhjAaQGeud\r\n2zgcpxfK2HZw9yIHbpRWMRVdF0dkF2JholBCXDEZh6ZRk9FnbwEabYheoSY/\r\nBC/MtMMpsx4bSjF5CngazzPXvwZEHcZLBFk=\r\n=4U0C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.2","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1645668395191_1645668450875_0.7674467392360362","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1646014142775":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1646014142775","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1646014142775","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e9c11e17c99f0c7d1a15cb8ec2eddb05298e5a62","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1646014142775.tgz","fileCount":7,"integrity":"sha512-C/pNLg4AFiUciWD95e6Bkbsz0y0dgrSSqZYrmtJCxbFCDRUZgH4UASsIQJ+EEvZ1ar7wGUkrpym96P+zMBn8UQ==","signatures":[{"sig":"MEUCIAEyrBhjUIYxBA/b8qmv3C8Sekg4RmQMNMq/n8h4bRxsAiEAljF6KntKlddvdidwwcppsV/+hBDp4WNZC1TjdkaksHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHC75ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo40g//WFpviW0+br2Dog5F0bLL2PlsfBlZLom8JpY4E5S7Ft5UfrNJ\r\nq32QiZ+xcpNjQFuAA/u+5YnJq5YALfvJYLIZMtcUVPStJtK/mFHUB/3h+cVu\r\nyYpLwGlzv4RqQHhaXs63xLGRm4Pr9bh8x91povchVazYjE6xkTRnnhrkA19l\r\nakw706M6w3z5WhAjv1rctjsY32zTnzn9RRIvSdjnc0ObESfZOJ6R1nBN+Uxg\r\nhmnQUQVGH0uBL/Iq7tGn2tclgeHy3WgyVsN0s7pYgoWdvjytZ+gLnqonuyHq\r\nxtU+C8Ip1C7XhAVz+3GgCWTgBodfqGxcGJ4lkZEk2ZfV8wK25qCr4Rp5hf0N\r\nT8wWqkUFlow09KalpZpsh7A3LsL2pU1xegierENig43WfoTQ82BTu+J4oIkR\r\n+wohrx0WsXayKxcKPCOSThOUpEmaJgc09e6eTrRI0//yC9oLyUnnZVJMJlKk\r\nJd/yAsCYAZ3Le+755LKOagvgqYHOSMRoHAGkIy8Hie0N23rKNGlb0hu+mgfU\r\nq/c8aris6njVCB5hmZA6xKiLfkoLR6Skq2IRegPG1kP5qwpTYkuwr9aSvbah\r\nkehRwnfBAJ2ExxNmodC5P64n0XPVUOSeF+uVcq2YhsmaTlnU6Of/V9/OJawI\r\ngfq0j+0iE7jecWyIi13ruseNWXx3M0B72rY=\r\n=KKAn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.10.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1646014142775_1646014201485_0.7536556137829613","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1646014211312":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1646014211312","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1646014211312","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"222b48c271f0c9b8f7fa06a341f70884e22ef380","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1646014211312.tgz","fileCount":7,"integrity":"sha512-PxMti0E7S+tajEo+XuTvJPm14omDgYp88kQLK2RI9BEJtiYXgGUvc+LMjyRc1h8XwtSOSRlIEYQ4d6cH9oc04g==","signatures":[{"sig":"MEUCIQDePUMtd93pLBgyMdl6nRChgWKzIiFT+NYtv+JWlErDPgIgbsXp7jpWirwS56zg8UVbZp1PLo+y2iN9MbDiDUtzHeY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHDGFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3Ew/+IrsgesnvpHy3mda9thM6hGl1uQufuL/82XSuErfFniUAbNm/\r\n4D7sFZ75nKZOM5cxRJur4B03Jv37dem1mZUpcp2HtrBgoB2yaWqQMB+lf6ls\r\n7cOGJ3URXmrqfeuQfem2sbWmmyeRsgsMPGskH5v0ZZC6fVoxposZrTIKgnQB\r\n+dztKNho/TQZkg+/GIzhmXGTaC8aVT5SzS+RqxMw7OwNSwhpDUGyGsS7r8+a\r\n2Mwzey1pFt3LkJX0aKihYDqfL8NlQ83aqDIyAfk6BnhIWO0HXD3PCG/saMAL\r\njfyo11rxooDX+0e5jNX241NJYYdCtZEl2kYM35GbEXPyRHC8AVFPwDses8Cv\r\ngqDRz/g72C9RTsw394erHUx2TiS/9/zgA/tjuguAuaUFcY40zmVABFxTJkzM\r\nKp2Eyl9rknHre0ZB4f3XkOFGoEWCOCdcd5wWoGgk1W5U48HBPX5u2RW0E9mC\r\nyobFN2SlNFWCkMsTToW2ExqAYhFeUXIC6XSIbTqNzi+Mwc/HDacs0GYIHLrm\r\nwPwkeXMoygPJKy+J2bsE9uIGASf4YHVJdfoIM5+OTFzhVgYiYKGlJ/CKMGXA\r\nSF/AQGqmwp4xGNil93IrtHm0CWbUNMex6zEllMDiFsie2/B5icYFfHHQ+enB\r\nHR1Dnv+/9i/XHnrDKckHCgrE7Ts2cklPXWY=\r\n=LSFb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.10.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1646014211312_1646014853593_0.8529631808222391","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1646618832524":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1646618832524","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1646618832524","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c2cf26392485e404e2065d9a80f137f7319539d3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1646618832524.tgz","fileCount":7,"integrity":"sha512-pVpPjxqSHOgItK3gXtc7CdgCCUNpylGP5ungfcQl0YkXXjmPfMD/azRudBcPvG8GgJKhyl8/XXNn6PfFw9WYOQ==","signatures":[{"sig":"MEYCIQDXxgEqePAyctF/LINIJ4USZLGftUVUo8m6PKNSlAzwSgIhAIsmN3Clus3tYHBmoYwVHcUUeqcDex5DiOHqOC2Kxfg3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJWkHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFYA/8D8bGma8YH++tGRYLypMkWAfvqFvuWQlrD+AYK3Yd5NfmxwMM\r\n4L7UELRonAlWZs/aLeb1kbnnVfnn8Vk8mKa5pVVCAfWpr7P9yFJKPHnAiE/A\r\nwMHRuXhRCK1raDV47fasJhHgfodAcUEpwtiZmcieamVVOFSX2s0eJBSwsmpN\r\nSiMUvWDXD2XVALhyiDHxqt2brfMYnNglWxciUMWmwX3+bQ54kponeSyYodFa\r\ntOed+mpKKkKAIMx1VkX09ZSky54R4vphszhnRfblf9RUeVh20+C+Fm4JgAiN\r\nLYo7wT5U1T34PHjmjMjqALqLby8lmzugpA0NKE5/LMDULDUapK42+JLHCJpf\r\ndJwFDo9gy07Kf0YMVaT0FfCp+BqYejyTT9qI5ySXKN2lQq5mku7zh3Bzn1dv\r\n+CBjQt8IdqIQVm3/plJh/XdmsMadcqFAr0k1Dcj9Wml9kl4ioOMWAkz3W8Bx\r\nCmLhdvlk3YaubOjkLAL4rECVjRaD4/Z/xV2DjI82RGN5WvBR/d5GdVU3dPvI\r\n0yh4XDkC8rF9NXuUIGJvrOcKg/Rnzr1T7zC8OygG/6ECzg2zcaUVZdKOisL9\r\njHa4ukHOOPG2WRKND3KQmuJqrdelCE3D0rG22rDx5xot3g4SRfeIEcJixgFt\r\npviu16i0q0pwruxmPt1rd4HKBqGDPjMNsNU=\r\n=u6hS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.13","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1646618832524_1646618887107_0.602480146632276","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1647223508925":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1647223508925","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1647223508925","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e02358c6c1174b0733ed81d540fc38757086c0b3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1647223508925.tgz","fileCount":7,"integrity":"sha512-qtNdHLi4ySyH7UV8jp/9qWqOYzF8ojgiFvs7JWwUqYxW7a47Zz8v80KkAjl1DbsGT7RE6hDNc1I9MXgdBhPOhA==","signatures":[{"sig":"MEUCIQCMKr2k+4V1Z9n7Rh+azerehQQkKRrpcqJYxkDUYFKkUwIgAUhNxZIBuzEgsR4s+H1ANqIBXGu+LinP5UAArxgkWyU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLqMLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqbNA//Vp03E43mzv3OJdEkIgPC0jM2FqGn/SjnF4L08Kiwr+3bqce3\r\neGPyuP/kHXtFbg5HBfuEdOBbsmDdjfKZMjeNNNOotJMESaGrr+5FTAqck+gp\r\nLd/S8cr5y3+5Y69MzkvQ8dy1byDaPmAxkMcmyVuqaRq028vFDnS3F4xPW2iY\r\neJRKZpxJuvJFGlCvlwtMF8QJQ6iK9f+i2XJ5dRAeOyKDDQBN1zxMJ2AprWWH\r\nEmmd9mNOezm0Kp53QNFPCr2Zp8yIucRpRU/OL4FBNe9u6mOw4rY0hS96qsDX\r\nK+bfBD5Vxn3OWmodcA3Pz/R4vkK0+3oTroWDiAO0mdeZh4YMxP9NhgK8yXAH\r\ni/CF9NdaYT4Zvah9IGaZq7NxlKHjRK9KWx5yYKo/di6MdzbDMolxjT0g2gfX\r\n5wHi3XAz7+uFJ/rq1pkFm3s7+lyuexo8/Otu+JHJXqvC1/IvbLYmhI05YSn2\r\nmSlRFBmUSoI2qr5gXspO1bliiUNHr0s9vZPqIOl/DyA5qFxgAVGDvtNwFVV6\r\n5I/h8UAcACtrzf1zBNh16YF14hyIv2CcIkNsV2eZJdMmJWPqpQguN125RjxQ\r\nf7rBgjm3Nz1/KPc+rfY/yeC/H8ILSAb1pEAJjVVQDOpFynyKk9r26cmsM2MN\r\nxUujexKlFKtzh/WjyJnN8vFW+gmGS4H9VWI=\r\n=w5DV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.11.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1647223508925_1647223563111_0.5594521419651315","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1647223512417":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1647223512417","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1647223512417","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"baf602db2af71a5625d17f42e7f7009bdb49f977","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1647223512417.tgz","fileCount":7,"integrity":"sha512-AvuYbJ3Svy1NhO/eksrA+Ipv5hmo2hKw0EhgFx69RLjV0he6/Ds4zbWy9OSsDt5alX0/1TByz07rI07C+EIVQQ==","signatures":[{"sig":"MEUCIQDwkkMdMQ99F+WDFbT5lNkOjB45m/rvFNE6+I8Wd9RBYwIgBbzvBvdrFfr5jOdMUbumgnao8eSr3PvdXpS1ILjyRSY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLqMQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrb3A//Zvc0BWR5pqenmC74AVRV68UqcxF6NABW/bnJuKmi31gpSZzT\r\nYMMtOvRm5neybY+q4dqZaZzh6FZKhbJmd1ayrCTUC5m9UsjxGMduJw+OUrG+\r\nS+1eqU21nLNeAsb/Wj7z978w3ojztLjkysCwTDWmcONlwcOyOOa75SpmKxXK\r\nyLS6p7wh35TQMI0Xn+gIRw1m60Qj/Mlupe/AlculU8XScpKn7KothxPE1W1d\r\nAhiL5URWlZeQBSO5K7O/8ihtgOyP6/GmiXgL8jijySuq/WQ/PwbqwNTyqsmu\r\n5Rr6SMgfRiHT7MH6GKf9hhVMElTc+CEY67GlQYvwhfcnQGHJIKHRYuAzn8bL\r\nnbvOQh+UopYzMpZhARHbhNFZQIvHev65aaqBQJo3jouyNJzSTHngXeJwsYEN\r\nEbktXtVQKePhXCvvpSjRXS2KAWBNEjtdhafcV10+RAg5eJh2Q1XxYBLadQFR\r\nnT0l1xwvkFrjZqUy5PzxCjC9GlxKcoug9kn8OxNkwFtYy/PwsWJ8ryQj5Cea\r\nnW3aEqyySygujkxtgGnf33NBgYB7jye4cgIU6lFsu5IVSilwwF2A806K57d+\r\nhZyP7Q1BE4/Ham3La9ac054zlIWrLLsFNVdfnY48dV8kI1BJM/6hZiq619LZ\r\n1DS86XwA3L7buTvPqKtEgSxW1ZeWlKuhpNw=\r\n=A+Tq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.11.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1647223512417_1647223568476_0.13389333034644468","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1648344685351":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1648344685351","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1648344685351","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"eb4e2e8f5afdf6b4f87c88252a772b3b83f5c717","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1648344685351.tgz","fileCount":7,"integrity":"sha512-RT/6WpdhCWWsHjB1VYVgC92eRD6CLRjaD3pXc2ajtCnkIljogS8Mu97fKlCxrErH0GBW//OTfgWV0Cf5K4lEtg==","signatures":[{"sig":"MEQCIBHwEwO4Bn/YHWb7oTdiCSO8NGL7p2pEKVH/X5qzEH5OAiASJ4ir7eD7rK5vkjJskGiCrnGyEFHxsq9oyQp9lO5uag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiP76mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLwQ//amGMEQktp9F5Javvy4nZKOFd1gDrLQiw1nNarREyCUSjBKNT\r\n2eWXawFB2+3C2wxbpEea8WHlnAJG01z40H54bVQUj/4FGoDJl2k2ZLKb1JtC\r\nOYOeUErFh2ZnRxNJU+nSM6M71Yje90wfTkrrDCOynCVxhLWKKWAzSAZbAW9G\r\n86dA0K/c0kaKENO4lv0XoPsK4uOHRpw2xarmTcwCQ/dSA83oJ5Xl0EX+Zmgo\r\nFEzcwRDtPyFJGv7hJUDiR4qp20P6dEslZ/An5DjFsRbriJdyBMCQ3CpHiyyz\r\nVoBajEzvhiimTDLwiu1SC0FkB4MnI+pHvI3MTZ2rR08f8n7I8qk234m5VOZ7\r\nfqYtL1AvcM8z7pzcmH/g4Fc1f9kCpHXmu59+2wZXN0HWoCE7cnnnaVBqn8xq\r\npv0zEFgzush5gSVm1OHLhoTmU+pjCXZt9rLM03VnCpoQvkO2sbvxTp2c1sOH\r\nYHxlh+3zcDSYQs3CORRDvXxINQlIGGISpk9NDi+7zhuZQQpFCTZD6jy24CBP\r\nROJ7+mcXmQcQhmn6cpXdz3L0RsZE5ezhMqaEZTM5Qkyw/xyMQMoWoJybW9BK\r\nT89r67aDHxLAJRVppEfgjJ1EAt5CCgvBkyMCNnVBKpaieNsgkmYeBBnEWoP+\r\ngstgTztYMkqk/x7wFCibVmqKQGdLWHPAM+4=\r\n=z8gu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1648344685351_1648344742340_0.26210648749395404","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1648433185968":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1648433185968","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1648433185968","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"147c90e36bc2722e182f65c7d1b394275e221dd8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1648433185968.tgz","fileCount":7,"integrity":"sha512-jA/hUKgVY7+79XbuSXfDNbahDUYLpHfV7oDmYpqdq6pSWGPjXeJIpFnHmwaBwXCd11l/cIxhSITnURlo/WeDCw==","signatures":[{"sig":"MEQCIEu2qCBDtA0cvT7SD1ISN12dMNht1kYLRwAZUPwWJhv0AiARjGRfhoU/PNBXT3clFkVJUG65t7jb76okGNP/9D72NA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQRhUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr22Q//TUn3PJGHxNnCVkra2cm0KTLwfFsGD2k0Ly1+IrFUymA90HoQ\r\nrdHx9mk9Zw+pUmHtiK0vjispKkpw5fDPOHmrOFwuCQRvxcOz2wbNkRn+uTR0\r\njHW2E+E+rYrJ58+sZaFzcNCxGLOcA7SmQDhpRHEdr7+wzPTTaNs8ZDVxaooS\r\n5gT1hnc4j/1e4L72TV0SGSyzal+wWBeKi4haEo96S6mNi0mf5eYZTEwu9lOw\r\nONyFKb4TA9QuPABPyNVXm5M2m7dIDLdsEeWHscSokc9ikCRp4I5GhNlnOKbh\r\n1V7H3xo4+LsrHQiVTECARx0Z+ne2zkMtfVo0xwGWpPuVWWUcPS0uqFKie1nq\r\n3mpJC/LVITLd3Can+fs2Y7MlyYGWNYLXWGEd5ynmQwGlAt5xy3L02IidE867\r\nGKhroq8jNyS2DC+tCigaXmCdd9XiuJvXHpdFKqAEqJ8fNu9qwMLyxZBFDBpF\r\nIyxCvWb3shemmE1fkbmnaT2/uc/qr1I3SW2dH+TLYNhCc4AoOGg2M19hfKa0\r\nmpYl/OKYJ08Xx5ORbX1FXYta93WgqeFEW9ZGO41YdLneAW08YIezyD8SOnum\r\nVK6MvLO9xNdjcSB6SwJHwmPusXHuWEBjYPhqGspd8wPTqHnW4LkmGVTpzkqD\r\nUBn9DdKcdzs4pslBht/txs73OyYGjQWOaIs=\r\n=p8Cs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.12.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1648433185968_1648433236157_0.6278178215300536","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1648433190444":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1648433190444","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1648433190444","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c13578070cc9adef1427fb7f4b0e6605384405b2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1648433190444.tgz","fileCount":7,"integrity":"sha512-P9lfACzfuWn6j1iWzcClQgKj855UvS0uAjNaVltuQ/OeJPNkUKucB72L9YK9grF/fihYmvn8P0J7IloeAZx1uw==","signatures":[{"sig":"MEUCIQDTEFynqCzOirzjULLDmbnPMpc3itjnwiS1SsSCtJSYogIgU9ST8pV1+XAzQfpKegZFpNNHrTRv0glChIUDFOaGWLE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQRhfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrO4A//Z9gSxKg5cPvNOp9XZoh11K7vH8M7HLdrs1ykzoBAtGIT3GBk\r\nIjLzhqUS1AJG3Gex5tbO/LsEpUxRsPQ3NQBVYmz6s9UuHVB6BOXxEReG0/0A\r\nC6aAhOO74TslT43PDt5tfHmbq8SHw4HL2Y5uO2OfrMqDTS6iVulIka/AVDgJ\r\ncQD8GydowNdpDUIgCnOVIHTkYqUxIOd51Q6Z0W3iTt4V3p6I7bz908LYlotC\r\noJB3c5/mzg/Z/vWlbweC/5YwkbSnBQm4xZPSkgXLzYGrDfd3jABLip6z9QNj\r\nQMzKeucNz3+E3qYHgqyBTcxm1mFxUNt1oDJl67HwNOjRqhBMC7MXcR0zo8px\r\nEZkocWomrObQG8VMuOhEzW3ftTV2o7oEWIEAlST5Zrl4MuMGx0rM7ZSVhsS2\r\n1WPPXKCRlGOcgd6QXKs/WQBnkSgfmluSJGtM/z6eBzwPcdU9ZTV4p2qwVbkj\r\ndNbMfanElMFSdz0zAMRql2bqzzIfsZCevXCqlzHD1sSYoYYSeG4bNTsS5MuQ\r\nOmIlK+FyiUzScWrRoKeq1FcRvhk+PgttQFMwnvVR9q9X5XGITiL69l1DacUv\r\nU2kCcnSBlaTyPWh4ENTaw9W+g7nhD/u0WphoZTTMQXctcZqRRyRzoAx0UxQs\r\nX/O2/9WE/Pnqh3ES/EJQvhuPvNFpXlPvtJw=\r\n=ZpIv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.12.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1648433190444_1648433246951_0.9353993407757994","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1648433276168":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1648433276168","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1648433276168","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4c4ca3fc82240e95833988d0364f6f6893aa03a3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1648433276168.tgz","fileCount":7,"integrity":"sha512-dqkk5Kq9lJfblDyGqPfPdaegavbp7N4cmMvvEZQxBOLQhiothPuJflCo/fFMqQcP9CJaH28K7XNaQJaWL7UnRA==","signatures":[{"sig":"MEYCIQCsGWlIaFSSvvcwPADqiVgJYnrzjeuCSq6HP328hxKQKQIhAM88Y0f3FnaS0gIHftEX1bfOWoCNdkvPO02qxjNo3q3S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQRivACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+BA/+JSnZmLyOrmKcgjfpEv0N7k8hMn5oWQEKz0n4mgTnMXq0XbTK\r\n/V/GgwnMoavLMoPHXK4yUdXgCYV363R8F64lB+2IBaW356KCDCiw6KOnpUEU\r\nCM0Qk/Oyrbzg5GGv9dkgOb90E2fvSifCHcW3lwvG+ZE/OJJmqWhRpbgx6dht\r\nCZBYYg/aywAYRrn9gWsA60WD1CWeNH4TyQuCAQ+Dt6w4+etJC3iv4gxxQSOf\r\n0qOqxUiOGb9eEpFY/xfeCGmjzjYhjhNuPaqEzZmOMdVoZYWr1CiMvSpe2/wK\r\nfy3ikCXxP9cI4gMe1jjvzdcEVIo5BV3NyquhyRM8xjaKFzJdZVnCArKfYp8S\r\nGiySyraRwPg6IiQufgXrq+k3vC1k49TuZBctrSHF8JTuPApvVON16wMygOoI\r\n5HfoTF7gMdpVMG0EtywSbkrN2W31ojxQwQmtnBZSB8heGrQ9UXG6TG6DX2rP\r\nTmVNZoDzUlEqEoauYEoFcMpMrgMF9FSvF3dP46gHdi03z5LVGTb3E2QgotkT\r\nNMcBZfig0hAdnzD0z3DMqRvcupRwP8Gv5Z+ZX8C1gJAf7oSoraJ+TcHQQj5B\r\nJxh3tbVkZ6hVXsqhaT1RBkULrWn6ZFf1qn0Fu03dCv+wrJSTFJn1jnmDaqs/\r\nGGJUQyBTNyxA8K9Yp0eGEPRB+R1PIGL5DMY=\r\n=sLeV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.3","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1648433276168_1648433326972_0.46255679663117166","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1648433276189":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1648433276189","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1648433276189","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6e87b2b239c25e7956af2037ac52fc431d2c3f99","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1648433276189.tgz","fileCount":7,"integrity":"sha512-YTUWlFMC0T5aJpgvTfeNh+SI8W6TyXnxHeKCJLtVhooOVtGuy91L4z0xjJYJiVjurmfx0M6mlwotmlEpE5JbvQ==","signatures":[{"sig":"MEUCICmipeKglLkr/8ckBUCnapNo4VOC9H2AiRQgX1UVae0SAiEArLRRYv+29dBnVirm0DJIPayXoWlR8G03aEyv3O+lOvc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQRi3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYyg/9HFEZxJ26wk6zS9X3E8nBfaA+O1qFFWaClvQfNO50JUk6KISk\r\nU8G0r9/SDIObp42DYXyrFBIfO0O7TSzUnEBuRlmlNZNdnB+HCw6kNAoMHqnh\r\nV9YRUqUau7HZgwH1j3uIaKRrlUTlJWNTK3W0QBWOoAElECm8MQtbcwpy9syF\r\nouaatV9idAlU4Xuqt9xOVqri55rX1Ac2Mw/FvmjNqZ6D6pL6nSr1CF4AIcD4\r\nfsuGnPHzfzh86qrbxgu8xcpRRkiC0U21jdqOq/rndySaR+wK1I+H0mpt2OQ9\r\noti2Jkyw4RWhkszvp3+ZWnx1HY1kqHF6dYb/NWT1vgwre+JkIp1ePRQenu0f\r\nDaPAlT5+E3IC22Uer+zBlvbwy65LisockGShKSkGMxj1o6s4PDRqocfCbpjx\r\nTawaty+jIgB8lEl82zORCodfT59JC3f4s9tXg1nAZPqHjVt07kjgWO8YI1C7\r\nP6fgbvj7ySByowb76pu6pDSsWUpZuYx449o9by/q2jttsBVfdTg26yMqaKzI\r\nQxDM577Dwo7qwu56Gr5o7oYLjQlPSaWtO0aqI11IeWMPeefMFwWUvrUcBN0h\r\nr3zncXJ0CTczyKUrrovrlBsKS+z3Xt/p5ZT/xKnS/GzoFQGIYes8k2Usl0ZC\r\nEredihmXwqi/t+IIcC2vDMUY2ul7xnCuw9g=\r\n=9eC1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.0.3","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1648433276189_1648433335726_0.5942571944530814","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649383660066":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649383660066","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649383660066","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cde194e1439e1f2607c095a0e8abbfec138edb6e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649383660066.tgz","fileCount":7,"integrity":"sha512-m3g5O7mfLYYfDQOAxnTt17QMOoakBudTaz11pzVQef96qUWuOgh6OsNhQtmiTPSSxMyW+skf0uZRwlpUlbeD/g==","signatures":[{"sig":"MEQCIG98iRSlKYY/X0Dhq8UZeCzviFLZlfzthBlhUNg+3aIqAiBTlkc5Vy7yP2Ikkl3FtM2UnN9JoqcKm6g5xf3WBBFxmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT5kcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVIBAAmi2QiX3nnuE7WhILFPklYui5EPghLmqllPGsqc9NS9FPTwQw\r\nqJZmghEf56pHbHX9IgDgphI7urVKrZaBhibD3PnIHKGxYtSlvUA+eqDtGquI\r\nxxMA6ViDMGgJIb5ZhFMOua3OTcJDe30mg1Kd3h1VhdODLKxB/gjEz1JrYZSj\r\nDhhjJPBAMZfMY8Kdok0UVK7X/RS7yR9D9moY/C9WyUKgiAcNitWyzKOAOnH3\r\nIUbfptvNk4l/T65QMsFH2oW2EYTWJpIElrG3US91Ah21NmInGIODe04z7Dlq\r\nTKxRkF+a3MfHiOEK28L8QZpuPmbx4i08TIVManxEuqbgN0W/vdDPSml4rio2\r\ns6hE2kjpNVeTdQqvUNlCJBcufR9Cg5n/CSvMfL1YRpftiKcqRHWMivpzjOMf\r\n8fHikx500SICfX3x/tzGVHsjRA7cVHsNGFQ16jT+I6Y01e+brvNSDrwv4EUm\r\naVnZhG4TBjtpdagevMwphXfapo9KH5L4PjjBBNg+rcNTZrkYLmRBbSXJ2sHc\r\n5YE1aZgj5WPtVDVVcBkjff8zLG7e1BzUVbglFcZHN0cS5f/Wq0qZtVhy4kFN\r\nZO4rOTHYbiWgBlCRfb2vw7GrOWJ+02s/CsXd0saQoSWhOQZXm2ucknz8D4/l\r\nHcqsP6gt9Lxx3lnKVsyA+HDiCVpVd+Of1T4=\r\n=ov66\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.14","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649383660066_1649383708030_0.0046323747333700815","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649383662491":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649383662491","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649383662491","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"999b50f5c8780767e03f16dbc3550e6f7b3fe871","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649383662491.tgz","fileCount":7,"integrity":"sha512-dzN+uegoyiSnZ+CQaivTdxfU3zbQ5dhgBd3pMxOyqlMTBjY6MihJESheNbkgmn0CWouyjRE5y/dtLgEWyBcQBw==","signatures":[{"sig":"MEQCIDiCdnt7FQLFREkv6+ShqSWV0B0HNs9z1q485cU7lsH7AiAHYd+nmuYjiAL4gX1wVE2km+s4wt3DXWPS1Ce+TPtkYw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT5kmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo04Q//d8oDD7z7h2hhrP5lKoCJQGYBTtA0IGZNXJ0v7h1SQR+xsvKk\r\nwiN8yr/BW3ysUtSfwRExlWSr13dCo3dXRO8oGaUtMXrC6t3kauJvuDad6GiB\r\nYOGaQl54vbj/h34itkoO6yuFZOtGBoAI3gDq+Nz+snER/G3aJT0DtlHR4hmO\r\njsN3c/unXySQZUa0Xhvk1grNDCcVgNqEyOrcr+rELplFk0Ody7nMpT8HmHGk\r\nFlqrArc/LFS0mIZ72V6CmgQ7kp7s82jGi13Z7/z/3PBvJbbTzqW+GSp0kMh5\r\nFoix2EBClA+JOgBvyaKqdQ2h/sCGGDq9TK7EbuoFJYrUt+tmJvWUx9RM9lhi\r\nX0MzW5CoEf0EOzoIzmegVOyLPMMe7OOnTFEzN41yMuUIZEKzMqLmxh1Som0t\r\nebPBQV/EZrvkVHQApXGKRNGsv1y7uu1ZQdSlTNm5hCZpmR8mQYQF8oAHZQXY\r\nK2cta+Puc2pbzhpUxQ08AdXW7LUFVVTB1GedyfujuDLVi7DxFa6Oh7tSNvhT\r\n7EUQCJZGiqupqgZJlPKLysAlVbFP4QF99Lf3dnXP4BFabmDMrMc44YBhgoNz\r\nmvo3Ucf8QvTnUsOb8Axbke8Qg+UuPe0CWwrcuyOCINzVwI2PQJrQeqNTWVXV\r\n7iy08SKDCZx7OOu5wflHE4e6CxD1+CbwicU=\r\n=zxTa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.14","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649383662491_1649383718475_0.7662048932274881","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649642903670":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649642903670","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649642903670","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"021794f2f315783949526ebbe828433268977714","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649642903670.tgz","fileCount":7,"integrity":"sha512-bX0bZTIPbh+gR5I0Qk3nhXLarhURJvau7tceS+5fYa6mRrUonrl47AShellOcEnLgh/gFqZg6WOS+6CmaMQYMA==","signatures":[{"sig":"MEQCIDubJdKpb6E/ztjf8u7Ynyk9Ij1jQlfO2/PE3wyAuxUXAiBNIQrVP89ue4Sk71HQY/OZMxKraRJdczpoP2C82krxsg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiU43HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIyxAAl4jlX9dGHM4UqEc9S0EqTUHGtI8UASCJGGufeI1X+p0NH8jF\r\nwBwjJScCMKhed8Dnt8N+2k+WsEfUW+Ove2QDnK8JfgrabNmGOS1amoKOz1Df\r\n58CJ6AFA8RWcyxy/QFVihaR6DeNBsUV+QmrJWkL1mmO+k58YGYepWw7YAJg1\r\nNMTrOKbXkZIt4kiB8+AflQxgqH7+cxf8UOVA3twKX/yNBIP8tqqVZwczZX5r\r\ndVh5YVflayAOoyTdktuDfJPEPPFc2iM6wL45xg9Ct8EWPURBD0q29eXGuKMQ\r\nTqbQ4PKHNp0a57FZ3MwzTqe+WDg2AOyjbYFcx/jWimGarXydRV22tgF1aU3A\r\nHAeKTf3FsbMk1pYHnAaWdQMbfBtT6WZxNrtrwm/Dk+q/Le1rX8Iu7TB7Dycg\r\nSsYqHz2T/kyJiEcwjNX6vTjnDJQsCXkZ6uZ00FLfDGjp1DUcawze6eEFVHSS\r\nQx0E6FNksm9rKiqzrK50GXU5SysjQk8qiCmBR6tQUE8AjGtHXDlxzOUrCoJU\r\n52404xEpg/hUnddAKFlq2Ycxq4486sFSuIwH/Brszgm5T2ODTczE2R/lDOsN\r\nOKHsqczHMcgXUMvBz+5r8UfmyuplvYKeZWOkv61rzMld5n2+MhnLFu+bhZq9\r\nIVr9gSaqTUg9PT/hgMt8NS6jH8zH2HQpz5w=\r\n=FJUd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.15","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649642903670_1649642950842_0.37232126767801166","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649642903148":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649642903148","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649642903148","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2c4951dae0e81dbe27f02e35ea5891715ab16c5e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649642903148.tgz","fileCount":7,"integrity":"sha512-DbKzZ73FUoTqD4pYsVQgrfT0ZD2OtyS24FpHlHdcFUJRTl/cfk1tba8iqHCjUXCPjaC1Db6SeOl6Gn8GWZPtwQ==","signatures":[{"sig":"MEQCIGFXj3kqYR+YPWfdevFR6PBfzC0RCxsRgzBnrUFTIEnNAiBax6unWze9SgARioY/pVSWhOm9UGo3I28n4wXNBWhnOA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiU43MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQeQ//UmLeI3jIuppvINTe1uPGwZoihW2qxflqwcZ2MBgG7oKloW2x\r\nTzld3bVXaFa5QIxWcP7bkhHNECEe12hPFaJ3ptRDpdCiUs6NE3TxmZhS5Bex\r\nHf4QN4Szo5W43DbWBcO1fwoBUwRGpAP6cx7PA4nklCvMwYM4R0/puftqFw1/\r\n/m3KQuzL9CP5g+dWluYUFCj0AUkXYRC2qnFbtCyiEW2JWTO5immjDBGeZcr5\r\n92sIWt48jsNg4H5Zx8eugOpGrj+sMi5pY8sA+gN7m7t3hlcmZP9KIxIX6zQR\r\nOvtZdSgtoMqtFUkWRFOXJaEAFxzcdq2PnM+o9rre8D793EUOHm9Pjahyl1lD\r\nYYMMQS/6AlFEtxrxUikwWHHd2zPHhnhX6AEElk7mBJSMbkLraSbQLPwj2M8Y\r\nD06E7SgtgVyAjx3LmFRnyS99rNjrWFzB7+jeqeAXWetK1Avl4aduqIEljPKh\r\nRF7b+hQb0wY5rQBcPQX8D/SThS4Xm9iJOropTrVo2RFNVEvGMjtzhWZrNYS0\r\nMKufhazhldRZHBVGyGNyX7KSyBgaxPQElKYeI51npEYehU1h1l94GqZQ0ZWH\r\n7E7phuN6e59q/b8xFOPo/8UZe4vkVUS8jPibWQTfLv/C0lqTi8FYwSJYx6gO\r\nv9c717Tcs8LpetME0+/4OKvJdmVadwah4ag=\r\n=ufbg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.15","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649642903148_1649642956468_0.5847281873964452","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649642942947":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649642942947","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649642942947","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c812ca51fb8b02916bda12955ab4e3e1195c25bc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649642942947.tgz","fileCount":7,"integrity":"sha512-HNgZEeyRxKA9NzFcqaDXzBebt06qy6VD9/BL1UKRunYvyq+GRwibtKJYGq8IhJAG/DqlqnzzLrwlOd7m/DBO8g==","signatures":[{"sig":"MEYCIQC4sEMdk9ujAktgjTKtyStJMep9aIpp6vsdT7H0sup0XgIhAObem3nh6kdOr19bUADpVGUA7fd5lqDJNbl7fVSyoBUF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiU43xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5GA//UR9PGwANZYf1PpM+zTPww82V1txm2bDQGs53PeOnpveptl1V\r\ndKEJqqsNF2vngaOFGhOxsA7TubbNiujo7iEH/blfZ7VtZkglq7qlTH99fbu3\r\nBWebWA38W3+B05UcTALbN6UxILnGQVaF7nzYcis+NwBrLd+SRWRINtnnM3fX\r\nn8+4VXXfS+etODoMpfvQgIjwzPlmMRLfiJUKC3akfSu+PFo0L5jTDu45u2Lw\r\n6LOKeTMTljikF3zZFk/fAzGUK/2yNhk7Z8Ffba6HfA/ABLi5wwlvpkipbcV1\r\nH9Gu0dTl6B7AkbmhOfQ6BRwOSQ9JC7CH4PsP/OpWuHF1oBnKT72cBuk1STg6\r\noiD1c+2cofPqy7XONe3Oy8UjpgDu3Yoz8XuC34xz57ZqIqosmBtc2ELe76Aw\r\nmwf6Vh/VBnyoytEI3jS+ThAgu1lXXGIPYvOVQENPn4RimvlbTPCMExg1U4ZW\r\nmaVyS0D47d2uRJtLOzUee5edGvfoJmyRWGkYYsdnU8X8byyky7ZZcuAW5aGk\r\nb0dDnY0ENiBWGoFIHSfdL1gRmpxFlUmUMvNrCT8dhOcG8KyU8f+nQ541jGdB\r\nR9zq+3xeA6SSOkUip07kV5Xhd0onUJRF0GvXuCMThZGtVHZTFH88dg845Fj9\r\ntS1O7+j0opZFHTdsYnelxGgC6eTubiO0EAQ=\r\n=Tmh2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.13.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649642942947_1649642993470_0.34968387609470053","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649642973154":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649642973154","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649642973154","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2491bbc987a0269df8af68a2430a75d68fe43177","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649642973154.tgz","fileCount":7,"integrity":"sha512-B1ap8UUp6khSxxV9NVwsI/e35TnM0I1Yp0dmbE07QJ8Yc4GfMeiibWWne/fEey2COQPcb1gwF6PkPZen7FLUGw==","signatures":[{"sig":"MEQCIG09BrKEQtufCIp2jnaMhU0cPlj2vDu2tkZkIhkRMgowAiB3ZhPejJJywXpQhcO/0zOtGVugMmnYuykBuJsic6nbZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiU44RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrbxAAhWF/BgoLawGpNIXxR/qshXfVFrW8zmlq2QPncIQNrBzwO/jj\r\nqBTIFqRxIQLjcw47O+K8837tdnCPY6Ijqe8dcOoqJyR0subPRhO/5qKdF69d\r\nSB/kT6xg27DKxWe5EIT55hBMJRQ5DUEhTjMkCRMONXoqPKKHpKX2tSSm640i\r\n/PkMWig3SOctJawrlVD+ZCsnlYSkFc20meh76PO3WsreHZSVsZyG2OhbfKrG\r\nHDsFmSXBrAMyeKsRIvtozKiAE5zKh1ZMMcorRcgf8166KTNH8Gq2ymLOuOhN\r\nyv2e9l/F66VO1b1y9siLW0iNFiSFUAjf/kQqDvlbs0gecAiaFt7clTu05miA\r\nAqbTPl2vvphAztT5diYJEaBR+zvabaoHjMu2RI9WQJ0NiT3jhdu0sHizp0tX\r\nEYVOGcy53GV+j0t8ubTiObkMNR0qLY5ct8lWXhdoIYus+vzQr1S5rdxupjRf\r\nN3RIl4OSNi1ifwrphOCMmPfWeGzVmCEeuvtkIrJJb2bPGO/gzPv+tMV27aQQ\r\nHvtUr+YSLDv4NeeYMv2/tULrgETI2ndEG7CpejrhshqvTXSdHk4ABAMPGI+3\r\nHgC8ZzVJarft1+RGn8mwtL2AqPaaFRPQZBsOaRR4xr3K4gC6Nizr9HLCG3cU\r\nwaKd/Sip+TnrDBJ7Hkguumrj/OVQch0mxVg=\r\n=WCaV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.13.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649642973154_1649643025009_0.3708677160377081","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649730841781":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649730841781","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649730841781","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2944abc26fea5b1fbd7c1dd1f2f6134f6768b0e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649730841781.tgz","fileCount":7,"integrity":"sha512-OMGytCDPr4LHHbH/r9ckga7lUnMcC1OwO8iO686yjIVKwn5CImsaCBMvW6xB7GAk9PXKRxS8cFvyzpRuyyv5ow==","signatures":[{"sig":"MEUCIQD4QGRPGwz31mnyUEe+Stot3D6BSYYCgL8X254HjudQiwIgL+Tr8dfqeFYIrXP6MrLrw+o8BzrDD5TBQb7aGN7iuFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVOVDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4gQ/+LDaI2wSOwZm+fLFiKa9Bz1hMWa2Htz+F6se3P/fHTZ6tgZk9\r\nBsoJIIg60g5wIUu+pqj31dHYgbXR6kofhlnHeC4fpa32T7Ph/KzdFZjD57+w\r\nGqIZl2DG6iUiKyv+Yrk2ph1PxWiIpcPJfTZoHZbBhJwmivNQOJtlDy0CNLjJ\r\n12q4RpKAgDT/ZtIJIUtQoiTQIPSE6Zw2ISL29Xdklc2iWdOS3AO+KEamgqXt\r\nxIwXpBZ/gvyXVsICsda9ud02cyOHOu4MCChLVMnyfjUXhlHxpBvDjiHWB0zd\r\nZdCVkIf+AVrPlrJU7IQO/YGFqYDowSEEJLGeiIwWcRcv7wgOWeRC7/gbmXDK\r\nW7vPmpJRnmYDU4vefYlAMgWnI2Q5KaZvmwB63T6zD7QEyo3WYB/qxWFoqPnq\r\nNDA0scxl70MCX6OPCK+xlUgoz5hFJn/lEzReenEedtLud6+s4gwhnTtc03Pt\r\n77ECYl1607D53mH2Jcl0ux2+mIJ+1HFsh6//sPCA1qfEdS1hR2s31JWDbEEK\r\nkjjwiyTV4lUWOukOMkQC6TRgiNVTuzBi+HpTMmyjA5NneMpHDdXg82Va+Nkh\r\nKztOiaJO0ljMYdnlHMaf7Y7NcnZyAseC+6GE0lSAWEKAeUd+akGL/dJuoDor\r\nQwIG0kDiO6JSq/JuxnJQgw7XS/vKyZjjoAs=\r\n=knj6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649730841781_1649730883393_0.8047288339181389","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1649730843309":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1649730843309","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1649730843309","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"06c5b97eae7a52dcdca25ce0a1a803aebfff60f4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1649730843309.tgz","fileCount":7,"integrity":"sha512-vYdo7vVQ2bIVejtiegN+Dq61E8UaUpYxG50ZYt80xBCh64v3oN+8XizCHknw982fwlTkGSA0XkScn1LqrPETWQ==","signatures":[{"sig":"MEUCIQDK9a5JL+rN/YXYfGLFZAeKd7CpGYuLI5x+VsaLR78wAAIgN81HgfoPTiiVpMlS4LHeSSWZ9t2tqj0f2pQmoGoo5Bs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVOVMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoszg//QD/RuM41heUOFhLwj2YaHZP/c6wIdqVfwWHvOvBLAwmS2jAH\r\nyRrI/pMJKa5ql7ue3CWr/SqRztCtaKp1GlowYjkKzhuwLasr5AIomBSDxUmr\r\ndQDWUlistrr8TShLTQWSJ83parrbXrCLyBSPDUH+k1pIzI5pRP5hxKQdiUeZ\r\nXuU7wAdfj+kiqC/dRNwB+3smBjo3OKGg+ouf4TqHremYTN/NF5ocGrO6TRVj\r\nin8LmHbJsPFLqLsbeMG0e0XgAfVUKVeDp3/py185p6va/4/dhxMQolLRgpmb\r\nDRxCv9IDUDRiybokXkaMUQY6OnAzP/Qf+IkIhn7UpS3TfbyCte6y6VjgL++P\r\nkqZHG9ZSr5cI+t4mieODzVTxCiSldoCxjtp33GI7wv1P0RMWp/XwNMqMBQvh\r\nmkreKiF0Ow7iirNb0ZP4O9rGjusZF795xYB5FjawNJq1uOAvlHIuvIPdAICc\r\n/qFio68+0wPwYl28fROpkYdbHkCstbo/X/br6eHBJ2t/GDgCBcjbqV/0JQk+\r\nkb01qqdtjImz9+qK1SV6Z+XvehbRPA3bX/yyHmUNyL73GhHGPv3Pf17qAI7v\r\nBE/exMcqTg88aegyqvXn5ub9wWpK6QLqPsduQdufCSuJuZAXfKkJ/36xh31C\r\nuJuqcDhxBGDIgpvBN2GTBEEmhynW+pzE6G4=\r\n=QLhQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1649730843309_1649730892070_0.9909334919634429","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1650247774607":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1650247774607","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1650247774607","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"085becdd0499b76dc67c9ab9c75c91aa73e8029f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1650247774607.tgz","fileCount":7,"integrity":"sha512-+vf84TRhvgggeM1ZhvwK/itC2qm7QP2lE/DkmgGgMxKixj7TbLg8ncOmtfeMzDG4IEleCDZMccurgzqLnuvjbw==","signatures":[{"sig":"MEUCIHNeBTWR2nUo0yAu3PJjzWiMchyM7RZ50Y9RMc3bmme8AiEA7cqUuc5JQ5kaLnqZINGpS0Ptw0XKNu4yVQEAjQ1DyDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXMiUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHwRAAjmzkRdergprgLNRxZpkAVmeVyKF7a0IeisMJqVMIestHMCc8\r\nrjFttWfvRNdPbk7fnuJMu14UsFKHnZfEqUok8i2jUXGRitVushF9aVtTtAbR\r\nFT7vvyovRQdd72bsBTA4p853NIP8XPuu7nzgnbSr7sBMGYJ8bU1KNVVF8DRs\r\nV9HXT2Yww74NfcDlbTAX4AOieB3l/9Dq+Bm71wJX6Onpfczig7EZEryZm7n5\r\nhEhJKp/Yf90MGalhsSG0ct+v2rbB0906FwmtaHaZcDw02qX1XVxg4cg1z+0g\r\nglDydS8phFHsqTQHRaoQm9/wE1mZsy1BHpDaXrKjdX8YG5iUaRIl3gPocTzO\r\n4iQbEr+IClsoelRysc3zYYPfXc0yq9MfEAQQv1+T7K7w4CCohjaxj3cy2Aq+\r\nh4m8uePSY0Eh6j7oGrS7dLe8Pzo3UF4zB6iq9fwxcdr50B0Q1Tkh+1/2/OwA\r\nq9HpI7YqlQvDWhOnvwJCb2qrKh3+xCFwVO3rJrupRpgyy86AOPO13LqPwYOX\r\n/g1aOnq72u44fHhG/ghiyMKkSP2uHHbZI9hTXCq5in3gDbLbUt2O89KR5Hs8\r\n/KP0tSPxb+mrMb40Tyei9FbVBasrRUav6H7ZVsW8/QNJGbYHyaULQf2Rom2S\r\n2Ke9S/4KBWXMIKkQAcbJk10+pzTjMu1QTaE=\r\n=93dh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.1.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1650247774607_1650247828717_0.6814563479854394","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1650247773693":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1650247773693","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1650247773693","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e67d001078de52c9030512964c20727869872f01","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1650247773693.tgz","fileCount":7,"integrity":"sha512-Zc06NP1WUeRv5u1qATlMfPcYMgOcA35aDS2TXU0ek0Ugt+IxOBN6TkjKrKZOxuHsq3cOCiGADXNHPyRf4eGiYg==","signatures":[{"sig":"MEQCIHdXXG66ksjgvevOpZkwr2H3uhxI6kplJQn/+dD1UQNcAiBz90iFZmXQNO3M9M34Z97pxbI/AtvdkLVVN66Zlk8yIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXMibACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLBQ//YbcXJxFzWzEsuA2RL1Y8Hc/kLk98ECTjTBoJDKbL2QAMplJg\r\n3IDzePPq6HKYkfmpikzEZCL7ZmBJDciqrWrjwI8uPvmea+wQNNfdTWZbOtu0\r\nGsv4TKt3parHuiZ7f88/RVE9mdeRxZkxbC0Gn1LvuaVahyoUQHThqD5oVd+e\r\noGI/y4a30yIlTsdreUgeUMyyU0m7/Ra9WuiRphlw++55GT9ylc1mdAIv8dtZ\r\nLYQ0/18Cyk4T6EedCAWZDomNXvPy1r8uFh+fNSPWtmWG0cYPZJHPc8HEXSLK\r\nvtyeV72qpS1n3Cg3m4VTBCgl2SdSzN1OiPBay+Bgu7cI4PSnj7gWUXzHXp7V\r\nWxgy89HAncyDJJPBVKHlaA0FXwEwOXFf8V6A9O99pB9j3jqsd9/p96LNggw2\r\nas9GVx8dcEX0OYEW4IcNfg8JczUK2vB9sl54zU0f8+te9fHd7pz2ct3S4Ruc\r\nT4fxJweGJI2bihBCWUex+p2JZcwHA236ky7l6T6XJ+cCQt7796/mNuz9Is0E\r\nkRqgVIsIFXcB9RS6ULLUbrPlG0s3QEQ8aEuK1NXtpCy43K8ahYwH7uUbqFx1\r\nYdXOKcpNxugh6OWBuRVhJA4nxk+U8djIkUPJsRgS694pLitF2kKwP3g0mbE4\r\n32X+GIGg9UBitORwCpcgxRPop2arn75oszI=\r\n=VW+n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^21.1.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1650247773693_1650247835473_0.3107830084003558","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1650247864348":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1650247864348","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1650247864348","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2e38a846b74f9a476dcc4635969ae182ec0364ed","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1650247864348.tgz","fileCount":7,"integrity":"sha512-F2/waaE01/UJAsJHF2GQQuFNmqL6P493pNN1/VTcZVfVGaM6jOgLIyjhpZoF2oP+gy9KsMr/O8MD520EcDSn8g==","signatures":[{"sig":"MEUCICUsc4YIbipIcYprfs3AUwrTEU2rWbH+yKvqOyd7C4yZAiEAvMCcrOnkhQ/JIMqjDoSajgUFb+gmk4RMCWF7q9zcYbw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXMjoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqpjw//VaqLMBXO+M/u6aRXbkQjhhTHBsc3na8xbEsYD1rK8QNjg3wt\r\nCgmDko7ny4O7OcDzR9J8/XSVztM3P0+x9oZJFUOIIB7wtW2CaoUZJYTMNFE/\r\nI3tHgqQIcZWbikFaA0qco25BTf1xSe1agY8s5lKnQlNOhWbOtNGBX9QDd3HJ\r\nyDH/gQfFqrqGZWJZTmURoeAiBJ00wSqpNg2+EUt+9F2+o5SXgs8b52bxGUON\r\nbOl800bLef6xx/eMVOQJsHbZ+eBFmI0Ff4mo1nd8BsAQmZw/+oHVCUI+k3zS\r\nWt+DQAgvzYPk5iLL6F+gGhQZzGB8gtMVdhl+SZrPCalYecpdm1KZmpnAweq0\r\nxM3MZTCKUPwimUwuygZrqzQNARgKl3g++ElRYa5v/tgn5odul+b/1D+RIH51\r\njCU0EvwpIs8aUT79anTIdQ7n2vdwzf3qPSwtbrkPvse4RmyLOBI226PZSK6w\r\ny7W1sqlU8bgAd+vU1iCiCvkGkXjHv2PMBATWhjNB4TFHTvd1Gm5Tt1jcy1Gw\r\nSbOnAkuaJ7PodFCUM21zwAb6h+cbYoRlDD9uXUbbg72nN/+Wg3VbctnrSe1S\r\nxwkNCiN/z08vcYdxzXT6mwxtRRfZT6Uw3/kg47UdUnh8pvSX+LvhT0a+BXsQ\r\nJ5r1n9JicHNKZ0fzWzNHn4F4dxyGA485qpI=\r\n=NRV4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1650247864348_1650247912428_0.12083573037533912","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1650247866656":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1650247866656","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1650247866656","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4605f90de4a262b716e5b9e405618512e1613a39","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1650247866656.tgz","fileCount":7,"integrity":"sha512-73nFoGsjhXMjmXBN9wQ12xFfFu3kJ4v5zMaC/Sb1hvJn8RXy1Kg48ef6Y8t3Ki2kGLaemcq65ZF/oWoKk6HzEw==","signatures":[{"sig":"MEQCIBGfoD2rf61PuesCDtwmiSWaB9mju5XQWtj/mzUBDIGWAiBmwWIFJuuG0Yss213t7A9xlM1nHwetNriCI4sIrNFy6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXMj0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmraGQ//aNEyhbLCM6xhmAXj9Ew8XfMwh/OLnKc1E8LT76nGxhfTY4Ud\r\n6CtjX9q3JnhFxuXAaEQeJKqksQZSK8rknl7iYPAPNKG3WHf7wk/E//SDBvSj\r\njiwYEmFZGSLPiTy3wx0bbz4m6yFCI0G0MWNhbPFOsSHDB2Ggd8OQgUbjyTdX\r\naNjjCIRyoBOo+C00YgmdQ88S9uN53R5M3J8GBaXXC2szif5GXgt2Vd0kM2M4\r\nNgVKbNltaEQtsWoyihhBW0a+MCio7Ak3N66vMC7Km3nAKMFg+skhbp/ZVomb\r\nPwZVZoQtDkQhKnZeePxJYTkIZ3pGgHFMIMm7NM44JB6vc3p0PQ52Tjx/xJet\r\nOS9nUgbWyHkf97JJzP6qTJKk9dZGx1grJo1r4jXtnTxUIKrxVkQhFK45HpWe\r\nfb5zix/n7XSAhMPxEJ7S+BTeEm0DbyKA0iZQvc6WCu2ijJz5Ll5STuEbTAgx\r\n4j9Kv0TkawUMiggodUf4xxxzntmXqETDcmH/T5zR+2cBjf6jj0oAFsoJJrvv\r\nhWZ0YmE3fI7dVgWITvw5Q+m+3L6bBWAoCMPSW4c4nyr2/5qUOXZFrOJYTeQs\r\nIGivLYIPEHOgL+VOpV1MQFlTqjEx+WQAlDShcJ7uSB+mpnliWEFbXRrJ0xZn\r\n52ReOus8nu0zcBfX0k6yDvqzjoMGf8UfwGg=\r\n=PSfU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1650247866656_1650247924248_0.3987907369383805","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1650593206215":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1650593206215","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1650593206215","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b669aee97ad53af03e76783eda700b3a28aae725","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1650593206215.tgz","fileCount":7,"integrity":"sha512-l5aCXDL8Su4AmgMSZ642KYCy+VbWl+2uyRQSzPXlfe/dMif6oE1WdJTqfkQVrGrNRMsw8u7XpUgGnIAKibovPg==","signatures":[{"sig":"MEQCIBt86A1PKatQurC5m8zpDXHnk3MDjdcjxm5huhxXasqFAiBDmOZ+rLxWO66G5Cum9NfaxrCGBuG+x5udARA9hYg/6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYg3gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1zA//WSl9Lbd0ND/2CJgsLQF8KQWHHL5hE4VJf0KVPJIIi4lJw5CE\r\nT4JUSwoLA7MAXB18bsnVGjx5whXyd3NtQ95846tjmLuPq4JUxaf0R4gwaIiS\r\nfHYLPKS54h4YvJr3IO3rY0ctB9oxBozbhr2gRqvuVAGiCgx0Ooi5rZjePJPe\r\nE2D4fUuaJLaWGVksXDOQCweZfbhPyQRWAlJrus7BTbFGfrdPwzijlr+5OwBm\r\nxk4Yb6nRa86vJvGoqj6in2k/Rj8H8lyTIZdD0wn48OpXWpIsmjPw/tAVKmIq\r\n1GJknBFXAQxGUrtAQ2+eept6S2+eMHVNTymsnbkZvSHkK6sbih1OMBa9ZJHY\r\nNb5pXgapgHOf1akKwDjceHq/eM05KrGvdqH8tE9auWKfXvm+qr6cmWhY4k5j\r\nTSgEkC4XR7wHDHX16OdmE5eT78llFf0iUcfnz5RyLExh5p8A0L2QZKqiejL9\r\ncQCkzYJYRFUvIuXQOl4WF3J+XJY4AU0UctvYDALqrqteh/NHkqvB9cpUt1Bf\r\nyUHm30Yuz4dFQ0nxbV2SyWioKs7z7R4iruDsJxqG7OiP2nW6y5vppM0YfUUo\r\nTqgAVxqhhdwjEzXkeQrx809wswDm4q05gPyR0+Jk4Fd6YAke4Iwqx46Z8n1o\r\nboGcdZ1OOCzyMjk6tJT1P5rqEhDynYF/srk=\r\n=qt44\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1650593206215_1650593248367_0.45222460983694823","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1650593207287":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1650593207287","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1650593207287","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"428e0c8298760038b5253f95c2cbd3f539e44ec4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1650593207287.tgz","fileCount":7,"integrity":"sha512-9vuGF6738cC3vzvRJscwYixa/3qo/fpGikInjY7Y83qexqSvIVpq2NoCWnmCVI16ijY7MsWelt7kRysWj8m2iQ==","signatures":[{"sig":"MEUCIQCi9iBojBtvDWThI1im/wwrwpMWr1b1UpxGjrHsmP4AKQIgLEQv2TXnD1R5CVu3n8drl+79+g+ADiz+q6LZ/TCtfLk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYg3tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptVg//Y4/tLex+m9iMM/ppkZhLRLfuVVnSK4OqD4EtEqc6yfSHLaBO\r\nUlePhpg1VBa8ircmV/OWbudVB5npqnIDI0AtD81Y4zdp+tXc4s0sh7jREbwq\r\nNk02t6q5RDf0+zfS6U2NMhcmR8VfX5aqfTUqet1Iw7r5YvMM8N7cBAvYofY9\r\nyr50Tth24u8DfUdNOuJ8pRYr/RRZp4NNKgxv4m6sfuI+6Pn5W3yKhDkPv4QR\r\nqsAceE4UkoV9C5eFFDlW3Pc4PMpoc9nWqfL/JnqAnDF4tbZFV9Mo4qlX+IAP\r\n3JAxW/IeaQlnmOROoFNOgtV6qvpgAlAtX5tBO4c+O9AOBkdzDiRgXAhzyNLW\r\nqyVvT51uJ7RLQH0TZvbQz5Qhc94UEHjEIeXsiZoh3uE0mwWNiDHBvqZVi5MC\r\nVHOACJjUqlivUuqa1uk8XpV9JAtAhgjgNmdjUw+Qjt6W3G/vL63oWpsyCWfn\r\n2jtZcThyaWjXygk+ZGjnn2u7ohsh81sGx0qu8NqTn4cb3K5UKMMWYFoYjZJ4\r\nrpYbtLCu43hivdiEN8pkUDgzUYqgDiVW8O7YN37hT1OKeZkURlvgbVqdYMxA\r\nW5C5iHsweNtlcB3oD6Fkc/rv2MyuoiOg1LTFuHrQCr51wHSxIJ5vFdT7e0KH\r\n+uFbk7cq8OgusrF6KFtDZiqW/nGg4MV/czo=\r\n=gJtx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1650593207287_1650593260768_0.7374046013461257","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1650855616454":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1650855616454","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1650855616454","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c9b7641fccf3fea17e82bac3c145ef72b5c44e34","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1650855616454.tgz","fileCount":7,"integrity":"sha512-JzAkgefT6RP5CcxxU59vRZRkbwAt56MZEO93vIr3bPqyv9yDY9NGE+jcCR1rUsNEvVYR0lhRoHuRK88C9b5wow==","signatures":[{"sig":"MEUCIQCSbs9CljBV4JxtYEIUTxZ4P7maATErP5jIosII6xvcmAIgfj9m9XlgL+qUUSGAHLmdCfy957qEzK7ZwXvnmEFnig4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZg7xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfERAAjKojmkA5TC7VgQ3QRASq5WRzSP4IxKmcllRyvthlEk9VUQBg\r\nZGJBao/cgPHV43kT2J1hOUJn8JSRFO3eTtyEr3richEkpugmw0M5WudqDlE5\r\nLyfytREkN1jP5vE+4s7WFV7cOFMmRyMwpq8+XrmmQNNvJEfVvNbAviNAF6ng\r\nSq2tdQ3O0A5Fx3jjDsRUInYidMzWO4rKzeAPiyM5uC+MWILcPk5q8KvBPq8L\r\nDpBQvR/z39iEpRZLwVmNaSrTyxPlggkPHEdYQI9jdrGZAiXU6PvB6CDEjLoh\r\nM9aMpr0iaqya/TG16E8UNuyDinyCb19J0jVwpgS5owLAF1KnG78QH7z0fLsZ\r\nUhjMCYsvUA0uNz2MX0xeIt+LJCHuXjoR3Jd4Ed2J1RQjKt5uRtl+csFeH+8y\r\nYAqY8GmUmT5b/POUeOFoQRb9+YNpcbMKbplRmTQ2DSIRn7vHRd8oXcYjN/0k\r\nrCatnoaU1xPAw6qcrsp8MGASX3MGWgfMq9nmSTYd1tb7m9kOhOH/R/CHGO/q\r\nKsSqYI2amPSOXJWWVmFKTXsCMRFDCxrOQaMSNVQTDvpRvBm6/eCXN4uoAb6S\r\nZqbNJOzI4t2Yh8oTAA+eDfyHKpCDQ1/vJ9a2nHPv8fqssq6VskiCVWQ3NeyG\r\nQ85d8F2S5AqwxbJ7Q9zNtBY0xY7FXEaVvWo=\r\n=psaB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.14.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1650855616454_1650855665585_0.6001218615941573","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1651543660362":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1651543660362","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1651543660362","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"afe5fde6b3007d1355e1886dcd70367367aa815f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1651543660362.tgz","fileCount":7,"integrity":"sha512-TX8f5FIeb8PAYF/4jxM5azRcSyEW6rS34r0eXHZq/UmKbkDl8tU6I8kt9ffqV9NgDg4l3mWZfNKxyTQeCqPy9A==","signatures":[{"sig":"MEQCIFPmCU4o+tfX+88ZgsBS/G2XkrpJY/EjQiRQfd3NN1qHAiBBiWxIduDjL81yP+wk/JLUxVdfWxTkn7ihZEwoYLOhPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicI6kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAKA//TKpts+t2w9NSCaJu52mS2ZWJV8ujk1DihYBRU3klZQNVjMq0\r\nZm63GOErhfWUVYPubwgDiwhXXjTNjXArLcQ63RSqQcLpcUmnvnUZoTZjMLrQ\r\n56bEbTZDF7aA8Lg/IDdbPsjtEA46BOvsWZFx9JS1zfBp8xB4TXjcfNPdnF+5\r\nZz8FFWcl59GU/sdHy1zPJIppwo+4JF2g4/u6gWDn3fMPRTxqNbnr2/MBCzc7\r\nRh/x+ln0xu3vnOiTmJVPkQSWU8LB8KgFYGbeMYQYfu9atY7LeGswpwYSVpuN\r\nljcD6qn0GB6+n86LaTXqMyAiaa1GXevuRrj8Zz47VXriQzuoVBfNYOooG4Uu\r\nM7AcpREthnk9gwfquLZVZzjdNvZuOU9DdbC0+Kh7x7fTFnGD8WlLtMdwIyc1\r\nL0iw7ZunAsejhYzSbUUPEbKESnjsWKnvXczfLd7G93ire/mFRg6wOFndJg6t\r\nUG+Z7QULxPpIiqTO37cKw1w/k8GyHkddZn97MG6jpn861dqVOfwPKof6KiPS\r\nzl9h7rINcJwilXtQC2DLiPIFzombVrqYqzf0MsmO0bhHINdimJWcRM8ImlH7\r\n1tbecylRRSGn3cXZExwsiJTLA92U3p9xQ/qorcWdaOhznTxF9KfeXqHCfb8D\r\nYON+xtOPPKt4+O/e0JAsYdFqoiotAeSSkBU=\r\n=0y+r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1651543660362_1651543715777_0.8440955159590684","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1652063620713":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1652063620713","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1652063620713","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e191755d973475f2040e359f0a93362493e97838","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1652063620713.tgz","fileCount":7,"integrity":"sha512-4FtqNVYNUXm2418KnezhT6UBXpgWkXrJ7E7HEzZ+09LTvtOsNfrz+6DMJEWxFOZeheLqWoncT5v1CH0iX78lqg==","signatures":[{"sig":"MEUCIE6+/tENWORMP2RSFwazBt1b04dsuM1oTrY4T52cy34sAiEAog0pbXFFllfrHMR0WP62L4ivZHeJpeiXcrGo6f7JB6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieH24ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMsg/+OWdDmzlIC9cou9MD76VtxS15EF4ZLkMtB6yJXlrDhoaPBs6U\r\n33KxZFvIN5xSfMpEMtRvdoao7IgVq18ueAVKWQs/EepAtJ8NH4rP+NIQyVqR\r\nKDr4bAQFloLHoO1j/DszuEO03bGXkaB1Xyzqh0UAsKeyG1TXioTxXzd7Gn8V\r\niKGoZ2cFcNyKqENPTaCgKgu1SNmWznWJGccFL4HlYdkYRrMzd8L5kuWAq0VX\r\nEo8UAr/spZloyy0Lugl0O30N/LWHZnbcJKkt9lh/hXbBJmGi2WeJckTDiWCh\r\nyFGH5+4q4JgJpvh5q6IGIou5uocLrCat62R3rqXcNK46UDgjszLJd9M37LaD\r\nVBK0gBSiZ8t/VT0xM90MD6AbmjnZDRxbjkDhaPAB58a76YMUhsC2c2Q4PUYB\r\noyahxL8DebJtpJe9lf6pCZwFjUMpz8qq3lp59qfaOWe+hFJE9CTOrpCbZ5ug\r\ntvcsi3PjhqjeInjsmIj7lsk4hUZtNDTUq4Ug4S4nam2BoBrzLABDKq/5yEs0\r\ncQiNkzyRg6Snw5yHm9VDzAz7wYMjJmP2ENjJQsx63dN7QDTOuHhodggzwDWH\r\n0h8D9j+h4hhRJswdW7lBj7AS/OnBD3GOSCTrUtg9mAJIHV7hJhxmz4gtVvNf\r\nKdt98ZJPLvU1ylB/QO67YgxuZKar+VlX+N8=\r\n=qU3M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.15.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1652063620713_1652063672448_0.4399672794406482","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1652063621200":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1652063621200","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1652063621200","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bf0bcc65878498141ac5276a108cb2c4cb8b8cce","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1652063621200.tgz","fileCount":7,"integrity":"sha512-ETK/0GajQCZxSKWIQ6NJDM22c/4q9yJFgfNSI9vj14G4JoJvDhZMqdf6kbPPUYSVzS8lDqAI09o9QCAGMKJMBw==","signatures":[{"sig":"MEUCIQD7Z6vpE2HVbTyXckc7qmbF8WnxshIo+Dl3eCqY98ta3QIgQkCjsmYyYqidsMAj1cu921Lu1Pq74mry+fPuK0dti2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieH29ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobGA//a6MHTNEhgQgwEwYcqbmLz2SlH/LbmfNriMyQrut8uFOP7vD7\r\nj4T4gPGhpGNrWvaLFgzCVGSBeC3ElNZNpH3LwQ/c4YHX/hUSevjRd7iwS3po\r\natueMlxm6XCkAD97eIQ0f0mvScIRF15C8niJS+ZIv6Eu76OdnaO0KCt1dkJX\r\nwWYjizrgY/eH5LX7bHN3VOumbf6MXCH31xz7/83+OY0CRYbLJlMJZ87PkYt2\r\nU91NSrpXqOZ49WQr+t3IvpbigEW0yhJb/IzSlEIZ1Sl+vfuuBvOR86b3qfR2\r\nD00GnBJII5wutQYzO6vJ/pHGDMRHT2aACoxKi1vJL/KanT35RGS9BDBxWHTz\r\n91yTRBgPBnoYvEx881McVuU+TQTTUOO2fSy2ozvGoxfdZhKX6pF4RIKTKXK5\r\nM2mEUSaPArev+8RT6WrGoOxURIGFZzi61TenUdPg3wDiaIAD1ZG98TF3ULCr\r\ngOxGOvPHfJvEn5kDuhbDUOiyAJmTqc0MHbA03ZlBNuVaqdm4jNHIK2k12xvy\r\nHTojJoK3OBSMRWtzW0pihH1U6EjyelSwXkw+nxedxAd2UHOed1V8pb1Q5x91\r\nFYAxRrAA7stVbZzUu2JNDoRaFiA0Y+aFCrz/VeLjgMkikhhxIKqNnOIi+yro\r\ncXjiZE40K+zx6Syh508DabaxFEleiI5xFog=\r\n=GwMR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.16","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.15.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1652063621200_1652063677143_0.4756791679558203","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1653271704210":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1653271704210","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1653271704210","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"47c7ae661aac662e6cab5a2b56162e54823c213d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1653271704210.tgz","fileCount":7,"integrity":"sha512-OBydyf1b7TcdfSGl7dBK3EzkfBVsPoHmfZigiBQDGlrCJVk+Vx66O7tLQWRkOqmR8GWdlSzV6nOI9/03zdFJMA==","signatures":[{"sig":"MEYCIQC/syC1FpC+1zfdRvUcCdB6qlaFdkHTrQKtRGa0dvAhlgIhAMW0RgNbW5OZU4KWMhWv1kxGm8jPHUStsLhCgMu2+tx0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiiuzMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6vw/9GAG9HqCEVJoF3shMJkeaWHrLUS+tdhxrs5oF2kZEZ9eD/V+A\r\n69NS1P3fNL6K51QSpvi8zAJQ+4b9yYTMbMDIghRJq0+pj4Hz26uubetHJH+S\r\n2qB3BF5nOAluP9CCL1BMfP4RUSF1n2+LgnCN63rffhA2hneUpaOrajmKfhsP\r\n/U0RjPMq4LyA1fbAkeLF806I976qcE3pIG0Rba8Ykbr20/p/jrnU3c5dRsm1\r\nbmj8jmCXs7Vjg3sOKRJgHQsORTsPAYA+Mp9jJOCg1j3eOa0AwXh079XdAnS8\r\nQ/qjSbIajkR7W7R6NXI3+3jeblHLFulji29v3tdaF485x33Nk8j6DlyO2SkE\r\ngD9rkg6fSS1xDBuCSF3V79Jech93Be695H40EfQTmL+NALmsO/g90UgVC1TP\r\nbxQHIl/xGY3PGoIvmhRqGl2ooHTU0MXm6eiZmhWsak/Am6+w6kdRf7AZBmsv\r\nddLBx+M35Sv8N//lL/V67NQCUGTtnkgm5XzpgiwT6gnS8bnbUn6Zky7/ZECP\r\nhtSj8iwxEnkKtZ1tXPAkdGu8/PqC9j6qfD22Cb29Mk6to1DZan5ADSFGmGkL\r\nL+EZN3Ah8P1c0V1qm59r59+C924GlU0pnNfGtzgsEEkX5i97pYv4CwmddzYo\r\nU9lKhyngM549FegI5SgQnGg+eENbT/S2rXg=\r\n=6TI0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.16.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1653271704210_1653271756708_0.1411756779332174","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1653962658823":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1653962658823","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1653962658823","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a1c10dbb036d546dab0da76c76f19be3532a5500","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1653962658823.tgz","fileCount":7,"integrity":"sha512-1/0xqBPb+HJNbKo1E1iRBmGjdpyWwfvgVWdJ+UPgt5gZ9ATFLGEKtpRWOYfNr4YSLIV06g8wA/1nYWAuUaGZdA==","signatures":[{"sig":"MEUCIQDIlNlB0zc4Lb5ywFkGFWXjfkU4Azy4jXCk9fxGBytNxwIgd9/6HnK3kxPYhfApHhVAztEDmdx50UjCZmbH1hGfwXw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilXfVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4Ng//RHs/Apn0nbkqjMF0of/pA+CksdfY1VS3Oi/bOkU8rwoF87iQ\r\nmsPX1EppX9+jepQCXGft3l5ptAmLeUHLnH3Fxbob0wTPGG9MIb2quHPBRWun\r\nKuA+Ok3gygBcisCjPkrbJ+fUMwYCIRQ0M5sb9DehyHV7MhtkZuEFkF7LaPJg\r\npO7N5P1ly2Ps24BXvcrP4lKym3iN2q0guofMUl9O+FJAON1nBruv8pJnjqJY\r\n7pnysYhFgvA9i/k92uM2X+4xIAEE+o9JLimVqEjGpUss19X+aY8fCpT40ktA\r\n+IbFtA3oHqSr6tBrMdJmYvpJzhIc3U6r+KGGKkv7ZOparM8UfHvNyGwbuqMH\r\nTJGfKSTU00eJ6Jl3+0YkW+TZ5ojTUuBwsMW9sWjZzhmbeW4BlcRRM7hWSU7W\r\npJKv6aQ63sUvPbmv5P/ap/tLgfdLd0JPJiL7H+P9qPyLBy7Nj8IA9gA12VoU\r\nCXUG83fio0WzIyI8FUwJ7+Eu8OJRQ/8uQ2apVq034TIlpgThlx9exM9L/BBr\r\nUr1E8oDce5NtA+koUfbuxOhMcZufOnHnLtnahgSUTTHwVQLYkstB+cfjRvKG\r\nOs8CHydSGQAk/PQTq8GLdOpc6/QWoft94XWgP8De5W2au13y3UMI18eWvfPC\r\nK0RTgykiejpZ/kEnF6x+gPib8FpbjSye5E8=\r\n=J3Is\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.16","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1653962658823_1653962709160_0.32637209794768696","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1653962660149":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1653962660149","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1653962660149","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b0c153efe61bef6a1c43c1516fbe888c2134065b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1653962660149.tgz","fileCount":7,"integrity":"sha512-t4GAuCQNFQBtDYk47dhUtWFZAsdLg++qKwBUuzHrjslSHdev0LEbxza9KkV4M7M8cOXqPvmz6wIgR6eTmDIjdQ==","signatures":[{"sig":"MEUCIQD97O/hAtpSOyzesJocTBpswHKBgmi600e8C5qyQ8d3YgIga8OldWnxA9MGjnWWZv+odupUwWjz85WtCsUw5Zwkxso=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilXfnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeThAAmIoSP9QXn0nW4H6YxiqgTaTSFXfwtZIGp1XaveSNM43hslbW\r\n1wH6v6QsvCzWJr7nIkWqwuTPwVMsMD9R6rKdOS1IUNHpvWVMz0BqDb9iAGkY\r\nhfcQSd1k8tY++A/NX+IboK32ICp3MRosgzi65y/jYUjVe9JgIA4bFrPC819e\r\nhwH6HwnQcljG8POKb4SxCFDNSk5BBSa4D30t0LjUiIomu6HPRnEZeDqo0FDO\r\nCEPmqjca/fKa2Hfo2vJP1ffiMOiLO40iQhPhdXnFIh1tXoUywuXebOXMPVzi\r\nai1snyfYfx4BPNGPHxN76n7SI/ShUuiDjqoaB1lOP7AJ9lg+iZ6wCX7I+qCo\r\nGXiyQQFZWPZnIOZuG1xgsiJeALEPkBfrF1aoTcRYRL+KYgjs8fu/G245JcH9\r\nCtG7GGq15sfrJJNefDw75yhPXUyqyvnKwvX2Bl4jahETHfZ0JTtEGOOwQlnE\r\nsJHP6IDAxBzdXVUweAnj93V5O/7iznEONOd92Vhw3P6x0Byasl5SUFXTPPn/\r\nV4YzT4pnTqNo8R1Eqo21t71W610oGNzsrPPYQ8kf8MqX/UCuSKUo8crNcurw\r\nBdH8qzKCCW/6umnw7tvfOfiTap3xxx2ktCloH5pVJGJ2brCQxBYtg3Zw+szg\r\nNfmyBw9MCXymDWm6l7lGPSqD7Ml82y7TBKc=\r\n=NFxT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.16","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1653962660149_1653962727691_0.28665462082972404","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1654050625671":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1654050625671","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1654050625671","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"041768fae0b02b1ec24662ee31a6d0d549a0f0b5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1654050625671.tgz","fileCount":7,"integrity":"sha512-vJZuMYEOEAfmgvGRM3As8uIUvbtuW2zQbO4i/M3Xxy+STy2U8Yt79wpfdMPavj4aQF29m5E/mu57EmoInnqBBQ==","signatures":[{"sig":"MEUCIQDAvrcK9QprYZ7VA9C7dIDb1JUdYi/WiqczoK6VKdyNRQIgXvlt2N+5BER/ZAEsjxVHcT0/NcCTJ4YCRoamBaANel8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJils9tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIchAAhPtMLc4cjFADFmAq85RMOBBJq9Zo08gNnZeDPt3wegjm1igh\r\n8WizQxxUziP4NRgik6rbnRD2Uz7YRrDCSHzo6XKkpvq0mShvdkWzFz7qnLZ2\r\nyAs0sMLPWfJvNSj5enPligCv+M/FBgwDp94yBQZJE+Fuwchs/7ngbJRXeP+L\r\nbm+4HdmD8IqogG9Kj7kS49yfebr4HmuEgQOAE1dJvLnAFiF4v6IO3I/5lOCb\r\nFAbpOsj5XmR/EQrBoPbf6kA+3m/Dx9zaYXR6tvutzEsxPnCaYwxpr+v01M1R\r\nlF/NDDiOqHfkJQuVtpaXkGs0AYnTEHi+2mFiiO9kUTbzn1EkTgw40874xx5X\r\n17FzvuTZ3/5nEyu4AqIKOJrNOCzH9aXi5KGnJnrKh312X+ynsTXKcINiFudS\r\nFoKujUfqEwwRUvVKO4dqyXQJDlBJzAvDMOT+UxCNL7f6kA8Hos/m0Z+Np7cu\r\nPR9+KcC5/tMkNff+eG9lceJopNMzTUZ6EO/euFXVHpDX2ChO54P2b/VBsaf1\r\nyQUYePeS0kIW0n0dn+h9s6aE1WxtUfoX0PJg/qnSQBlI3QS5TsYS193QKcjt\r\ninNTPwdpF9Tq+lhF+TqUXXIsf13yOGfNrYmnVp3EHCBVDmfJcyh8dbyN5kY6\r\nyFp8rfK+YoV7it8ju5rkSCOhZr3JIEifBWs=\r\n=iPOe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.22.17","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1654050625671_1654050668994_0.5715774717768247","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1654481322283":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1654481322283","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1654481322283","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6bb273a7742b15c64d5d9afa281294f4f11e9bac","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1654481322283.tgz","fileCount":7,"integrity":"sha512-A5Uv66efx5FxpIg8NssXU5joLkWa0/B64l8uRspm/nqJf3kk9tPma/QvwgT/ZIY1rydJo/fd1bwsh/l4au6I2g==","signatures":[{"sig":"MEQCIADVUd16mJggc8OXYqaTEDGNHNB4t60HIf38O+hlHyyRAiAp0Rv0gOsy6ZNVEMJawVtPSTnFjK4Q5mDQIhT93uT1uQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinWHcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5Rg//fvZ03SwIssjbnPn2a5Oel1iE8B0eOb+u1r2saFq8EE3gk3u/\r\nBtUIh3Tg4VBm+XDnBjM9exsMp8bF6yExpCGVnhXb+etcvSEY8jXMV+qNG+0+\r\n5/ccwD2A3AbjphxgoO53+vP8lrbHOMU8wV4uO5TceY8XSa70xVFJsawn17+0\r\nWQeW5+2dMoe8HUVCqX1vIkG2iRbNuM/kSfwO7/5USTtx04yyNgHaeBuEl4qO\r\ngBad97JwnG1k1BR6ioHWttrIBuT+yp0Op+x/R571CCQV39SWH3KPAvCAs6rc\r\np36/HDk6FnSedHvCEBla5bDxrbYI+GmxPb+rTbnMeTJaKfcniRd8gxpY+Fvk\r\n9wsOvWUvflTxXAme/nkMJFVxmEV8gKT6OgV/OhpTw6NnOYFo97t+JoHAkSRf\r\nPjoHQievrXnlzY4t/67qaIXAxyVqWmoGV25qFb7bTEFx1GSISSipQS2/s5LM\r\njlKUE20l951veWDviwQh2T4ZkidLsY/bcnyG3+cbI6f6hFxoLTdP9kzOE/0+\r\nRfyN7q4tt3Tk77ghTpGcWfA8GWUsy+Z8MuJhFlCsJZfk85i3B8IHFlLlM5a9\r\nFU51b7oH6glOVszgWuSekaO5QEAEVr3//VJiLyJV/P7JPMe3/LWSco4Lh2oI\r\nUwsCWFrs8IgxkP2tsIQ07d4rWrYirHoxyJ4=\r\n=gB5B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.17.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1654481322283_1654481372716_0.6912191509644423","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1654481324805":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1654481324805","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1654481324805","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1d265cfcd001d5e635e84877455125ee7b14525f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1654481324805.tgz","fileCount":7,"integrity":"sha512-ByxqDZyEDMY4+LNmWWKYoVaVizUXgj/XVIYVVp4q1mBOUsH1dyQaZnriO/elESisbqfDMUwMAGxjiX6EiZtIYw==","signatures":[{"sig":"MEQCICqTO4YHV40ARBHUrsRlv8VlVbz22o4sJW9mitB5aqteAiBFAK9sW9E2+vXE++jD4Wb3ivs+dQXdNoQZtmubfroE9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinWHhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqn9hAAj4eLAVdODLhVJQ5ujgF53rY8Si3/Tp7JLm5cdaxt+MzNUUAs\r\n6+TOi4oaJJx1pwSiae0tTZRgUPun/R8eW5sq2BiGoOlaCuFwoVWjuALFAvaV\r\nAhno6jLBmsa1A1/drRMeYuDOmMbptDULeKP2ffymWLIMlz2bExXTfcMP27LI\r\nuxAvxusqCtMjVKG8ODazFy1fcF1MtTWNrhL5NPKRcvfLBf3cLdTtI3BDvMs4\r\n/xqR8xu4+tAy6pOXQ/2XgdTQPmE9uPI/lTHsRzwEM8hITa/+tbtJj3f362p6\r\nKua0UAB5tf/V+bi7o9XAKYr1TeSsRBjhOZU+90S5SUvDFnf9e22AG94L6Y6d\r\nSXK8IzqFBM3IrrgyEskXjjmYGiaBl0zxRrnaBFT9FAnfk0aTLosQICaodKLK\r\n3YXXn3qcN0wErO5hntX8rwuQiGeR6bqX6GcKfjtumNefI17YSiU9+5Lt0ain\r\nO109eloTM3rybEwRTYLPapUXCqEQZbVQrhd4G0ykZgPG57Kq4v8KkHB+Eq0C\r\nUTihkgGpVIbmfZ2yuJz4juaxXV9ci7hWIAlSVxHWE6FZbFszuaXS1G/3htN3\r\nds69sYiMLuaau5y9OCnBWLBVyPE/HbTMlMde3Ih/m5v4BAK4xZJzAsO+ireM\r\nk1kHB9QUPsrMNdjjuQOMW5KKXEN9Y2UD31o=\r\n=gB/Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.17.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1654481324805_1654481376826_0.4932839475411228","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1655690947509":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1655690947509","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1655690947509","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1043a65689925adf41a42698c1c453d813ced2e5","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1655690947509.tgz","fileCount":7,"integrity":"sha512-QehCKHTbmGuUDmhdC7p+Nlxa2Y4xVlppwtSuAEkfeti2tgmtKO0NZTqOH2mjN5RcpjnQJiHVNZy8pgdSQuBDjw==","signatures":[{"sig":"MEUCIEfBWbEAAhF9ioO+dzB72R2lo5NalY6lVKeXpJ4U2P3kAiEAwXypqx5fPNbjm7wF8vvktQruFaSy8tO3JV44oVK8dlk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir9bxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8FQ//RMBxqjMwsUf41Fq4nAICBX6qA9NahxxR7B4ibD1yGQTDhCc6\r\nWGyKtj6f535qv6ftjiS+GA7p3r7XI+K7woUcFoFeNXDJHrCJPb2vPb3iZ4x5\r\nJueRxw19lc4Q3+DGQ6SbYm0x6RsIypyR3BgOCg+pXj4effDvLXtUkFUNd8v5\r\nPRdfzSt/cl/LSpeqBtaxEeZVHyRBz1aMhHqf1h2x7ebxEnqmP5IorXxR7E/D\r\nb3VxbdraOx8R0HQzIPevISgJGcihxiM6j6PpXFxxG75tfm9/W2TP8P2mJfBj\r\nF8mciRgGWoMe8qRaxXeaRPhN91Cf50gZX6yNf+t1j6LmmYwjiZH8F7Ru7O9y\r\n5axauMqV85BwUlBCXj6gLs9GQNMgxiJQjKCNviHNBWF9Br4zA5WfkpXRYlGN\r\n2F/WVEQpBlX6oGVsabiLCl2ck+caVFHqIXEFvWrfRpZuwSvSDmeqzOzwI917\r\n3t2QzUA/vxuT5pposOYOWiDsgT04tutlC/f4sgIQrzs1LhOZs1X7BnB7/+Gy\r\n9m+B6WF15rWUCoMK/OuVUnXnRtMro+3kePWn0mSSnfhytciWip8m78dZUzGV\r\nDOvKZn1KWwW+JToLfgU4gGObk+VHbNwFnotGTFvbf5QoT5A9K1xurzOJft7X\r\nQr9JKvrLd5KJSv0Y4SbTLvXZ9DLFmYKLIjw=\r\n=vcZG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.18.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1655690947509_1655690992794_0.7262909042083072","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1655690951107":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1655690951107","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1655690951107","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4215a2f7ffe932b3cdceb456933614365966ecd6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1655690951107.tgz","fileCount":7,"integrity":"sha512-7iKvVm9u32D7SG481CI8sTfZOCoPohNm4ctLKfc05wfSjB1q/3pq9qgME5TnvhGCQpWDl3v4sGH5GsMtRlApzA==","signatures":[{"sig":"MEUCIQDmv5MaShvGPO8YpikrJx3NJEqOcaw1BN5C+STFwurrEQIgPP1NJZSlP1zLFG92B0hUv21WF+qjriD1Va2euxtILwM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir9b6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqndw//Q6535xj/lL1FPTB8NRajVILw6jqXVedyAwNfLOrbo1K9sr6/\r\n8F6EJfgCCovI83pzI6hgSgH7UMalTF0LMds4vlnD3I47y+Nq2eC6tJrbdrQA\r\nST5mX9XWQWDK9gvu5jvmRlZrtjCi3eMvHvYIJz36LxFj817mG41PZOC/ZJe+\r\nh8iXylwRIR5E6qMI1sH5+sOIPc/UiLr6GlKb+eReUY1APphqjwPWzsWy6xXm\r\nEmRL/9/UOchCt0LB2n8fW00WyHQckeo/5uMExM/PVz+Ezi3yXQ1wddXFe2Wp\r\nFRxDE2+UGiuWRGoPPizsuMnKkY2mTSn4LuRN3namRuvw61t1ChoG24KAzAhc\r\nXe+uxzpW3i8ZnGlyGkz78agq+o1tHROtTNoLorZuAMfly2lW58njvhWoGUjv\r\nGeIxXH3e3jARUigBM2ceCZwzE8NeP1/UvDVyTuKy/W+JJN1s7a+jVWiwu83c\r\nvYuBvEkMvreKkrQol8wEVynJRlijKav5bI/lyM24f5NWRscLerhvMlu/5I6X\r\n+yktvcqfpNb/wBlglBgzi9PWGHpocvPqtzaBhP614aQWILYx9BqhTCV50V8b\r\nAqS/Cxqs/5DoddHB43+tGdvl7Ar2CfjM5jzjmjYKUeERuLmWUrJjUm4Sjm1Q\r\nWMcAxZRC5IBawAnpr8PUGfip/5a2W9QjAqA=\r\n=Q/TD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.18.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1655690951107_1655691002107_0.815716888866068","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1656296640966":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1656296640966","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1656296640966","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"23ea4946a7d2005240071784efd4dada71d0c6c4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1656296640966.tgz","fileCount":7,"integrity":"sha512-GfF7zC1lIK93HcjpbqDeDWoS8FFTfnf9z/ZmDwp0GGLKrFXOi5mBU9kJG/rlAPG8slQfZxJmSDvD1tGg9DRjkA==","signatures":[{"sig":"MEYCIQD9PNUUlnhXF57V0/EpuLgk3Hnuhu2cUlk6cQssI8o3/gIhAPNxA+C8BqIqPr+oQmkLyYYSveXiRzr921a/0ArtKySe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuRTtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEng//aHiC83mVTw+jx68o49nnbEZlpOd0z6lMtdggkbwqXYrqXcYH\r\nFxDIIUtq5D/z8TZS/zu7kXJbFJ7ocdMaWUHKdYgTy4+lB/qwv274CNEpOln7\r\nzi3NpANmoHrvbj0SJMDESLKKnW37LGLLV1vrqo9AS/dyrriSkdAc9j8bMwYD\r\n1eWXYL2MC+B+PXUEHjcJ00k2gqMLd4UXX7ABgL5fjUWf5aqAPlERUNHi0p0f\r\ndhWKUywDnyOZBotq3/kdPJ4eFuEDsY5zfMBVDq/o7dKOgipYRncTmbIEuQfh\r\nABjWiCPJT763nQT6HfecyssKIaaw6mSDxm53dC93woCRpS0ZGdZFCfI/J3/4\r\ngFGrHhjPnMGkOsZOuprB9JWpBPcOyum6NIjEPtU6tducmozzD6ly8R47oAZx\r\nH8dSimT/7RsvGDdz5Y+9mS7Z2u12JASDtiAdzkajT6ORh8QHsatglhtEROdm\r\nofR6kVOOFjHOD6GWTyJEQrURblanFLm+X+RMcyTqTIiljNrtUwVoQk9gruwQ\r\nSr6GPDcJaZiQo8Tt46mTJNbOEurvy2j00T72AIWvSau0opaNNDe4HVzreChf\r\nyA519joMrNX3OXYpSrvkkKu673E5mD9jFNQ8xjgQVrRCuSilnoIUKT+0cz0O\r\nlXwtT9lKSTdVjlIlmcJXRU/bAixS0ZNXuZI=\r\n=pV0i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.1","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1656296640966_1656296685760_0.8784743062738585","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1656296642960":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1656296642960","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1656296642960","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e43c0e09db9d0e00aa82420cf91afbba41dfc6d4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1656296642960.tgz","fileCount":7,"integrity":"sha512-Zk4NxS1ZDns/u4TN1xlwSZtm9OEqtzg4SM4um8I1EI5IYdyDEmTeh1KDKiiDjhZCmgFyDVaktIWV4Swbrfyj5A==","signatures":[{"sig":"MEYCIQD1lUQB/AYkIeXbmsdT4MYc46jc1poDASxthcgFWQc5lQIhAPo+rUKLYfilZzUxhtRiS8e9IWpt5Rzy4OlBp9qbOQX1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuRTzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKWQ//WFMh3H4XPgSTqlIA6vHrLx8MRSSWYjPbf48OvG2+zh7hQ/Jt\r\naf2WS8A2qVs8e577MiJFsaaYOmHShhzAlldJpiIxl56PHnT+4WnbHvROHR4m\r\n+u84k0O7bvbMF5dswokwX2fOq/yUdr66+V2/bCPydvp71LmDBBd/5YPIPcV9\r\n4hEd18vUd9IjsggyYaku6x21PPzb5xFLYi6JHng62ZVkpyVGM+l//p8UlJxn\r\nfyqALfz+CqzOMG8afSumHJgfu9XDiFOrAY57tGUJy6vnPQj8v8nPb7JXyxvq\r\nG9+UDALJPZZml1N9z5c+G5o1u+uBV4ukjZ9deGHg6A8FgSX68vs76DJy10Hr\r\npQiqmFsr0fVSM/KUSeptNN6ts8qqjKoA6BjFvkRShPSRx2gq+ryVdIdlqfuF\r\nSWFpNT36JT7o89TYa/ILTasTkjU9UBpApuhZlsQ3T2PVw3Sd8Ar7rugivF3R\r\nl0fF82J+SMnP3kTpivRtSx6eU3oq7SkOB/QoX3Ume0UAJYzlFTSIIwDNlQdC\r\n6Hyf/mRSejYS/cjBvbOjijBZtlBhee6gl9O3VCZUXMU4BfDuxGdRKkttgUYj\r\nheKe7I7SdQbhE/CXbm/IEU8tXcBlJodqoqxHF63R731ZVA+c1HbS/QPuUYg6\r\nBHVizhMlnQZ7eJd1QAnNXqfcdMw6thJ1JjA=\r\n=YVFE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.1","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1656296642960_1656296691460_0.11547955501555629","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1656382057237":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1656382057237","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1656382057237","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"daf4a77fce41e002763e7e5c52b4003f5313184e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1656382057237.tgz","fileCount":7,"integrity":"sha512-qQLoG5BgsX8GA5bbGqN4I43nRIdhh/pIMFDmrDbrpmVXwoJVxtFnqA5D/udwHC3/ZuTaKDtiDV3bEjHW7/YHpw==","signatures":[{"sig":"MEQCICY9cSbCIHCMWHiZfcq8opRNPc5c+kk/moYYswYB6L4OAiB3E59+zoCCNoJ2lK+DK45BDVT2dZYdbuWR2q0Yh7wnww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiumKWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoBQ/+LZftFlE8VvymvM7oD57z6KT0CFn8ZJWVTS2ndPpBpgCN3ern\r\nhjxpy08iYAzqDFoJXWNV9w2OFUzONjYxJ7iqD1r/BKKYdgcVNzh47xnVZueQ\r\nIcSghTViej4H1aEIrq94DE1UKcC0fmtkhjl/tW2Vg47Gggyl51AfqFKcKttE\r\nUnSh+BJyFYmWkGCfOKqm8gp7OqkjjtQMdv6LHmO92NcRevKmjPHaLNZUqNc4\r\nSmilN39SPoErr6gjH/Sdc1utHHQ6XfKgxLMKdsb4ukKdA9M6yPJHjBM4kmqn\r\nHeeo2JEVB9IWe9wPN6XWbPzIA1AN73sPoMzLHM3vv3ElzCK3O61WrKpLVJ4x\r\nJXQXM1J3mQvR7Cjup7Z0r6l+LTlazakBYMYQc5uzXoH2ztNou314AjoPMe60\r\noEkFk1/jpjbx9bbLtsE7AZQskkaqfYVnY/ZQxJJLxEm7MA5XrT4MRgatGlPL\r\n05Ve3O57G8oKWHcqBw/jfzgwjZfL53BLyfk4MOJ4h2OwwJlccYqsMnwQiF55\r\nVCMS2EBA+0qFSMmFXgyV0Elz9uA4x22rzV64OxlNSVGIvorbU/xGd2nqi/kd\r\n/UsAaVwxcEWdMEw0NjUIMMwKLFXPYjGegrJWb2NsYLigM/WXkzzp1VNIBQO4\r\ngGpruhQEeSnemeVNFezx/ntn/GLgw07JzVc=\r\n=gXxR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.2","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1656382057237_1656382102631_0.6430083452783708","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1656382065611":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1656382065611","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1656382065611","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1004ebd01db718ad17711ac956a59877d8fe28ad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1656382065611.tgz","fileCount":7,"integrity":"sha512-hTyZUBGNYYxs9YG5E7fa1db9gLZGplLU+GcSKDl0N7Iz7P0PPfjdTI9l4dcSNbziKGazYKu3kLfQc+paL3hlQA==","signatures":[{"sig":"MEYCIQDxoPRg2bG7NNnHJXNGKHYVeMNzzXO/XynHe1E4bHEq3AIhAKPz4eRSSWa3DHCgfg47vOnVW5lcltGfl9GahTr6SBfE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiumKzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvgA/5AKVZo56q5bk3BcViuvVMQXqgeO35XvNVARO/LKEDCU+xqBF2\r\nn2MskfCF3ZPK+PhJM0Ol03RtuuJ5tJ5CmksSQyLve+6cwmriXXlo3G3/ANlt\r\n7xCpj7CdMnsNr4PY2kp2l9ksRrMu+xycTosB9tyYX8Y8bbQGlvB1eRbK3LHX\r\nP18zb/YgwqGuIqL6qtE+ZcGD50JTUxUJrOma9uL9JgHVismS/n37wRX245eY\r\n0X9SIDoR7qmt4nSwRolMLbAUCd+z9qZdlhY6KhG7sYXQ+8VmCWlaiiF1eNbl\r\nUGR+1Q8QRbNJ+msMeWMnYhGYurKFV/HMZARi6yX941UX0fbu9mT9Qopgk8CI\r\neo9/yeyrw8wMZW2CTWbSMBxDCMCLmXB3TJ64TmUO/bCmoqLMEy+kJfLVg8cF\r\ngIMBuJZhIY19Xv5dXEiz2yNNxsVSoplyWurpnva5uku3m8bZJdgqQWNnn/4+\r\np2Ml6ZEdVL6OLvwW+hPvFeOy+zz/EFAnMeF8J8R1AMzwjCL3Fm8I50R8orxx\r\nAbwdMIWeXpXF7eMJ7gADlbyibJSZpwdRLU7af3YAho5R2aYxD02y1Ux2AcCV\r\nM3fX/UYo8kB85BaooSGcMyEhqhZI6cVdvnFSUB6qIZMU/Uj++cfnNaDZFTxc\r\nlAoW6xgBzZA/MSnD66Ib6h9KUUSwtfucfi8=\r\n=okLi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.2","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1656382065611_1656382131381_0.7820577587795297","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1656900720335":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1656900720335","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1656900720335","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"43d67d1dae78a6fa374b2ca33e989fd49da7efc6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1656900720335.tgz","fileCount":7,"integrity":"sha512-xUwzACTXpLw9xsQ3EFOnRDDx757hxn+cjiPZ6hf4Eo0WHASKgL7o305Tg0I4k04aAe4NCjT/55djfCG9xiQWSQ==","signatures":[{"sig":"MEUCIQCZlKqawZwiLNHmnoxeXUwDqZ0r2edeS3s68vF+aR3EPAIgKWYPJLL5j0dR4xA4d5fsOwYRUQSssU6LCxosIUa4/ww=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwkyqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpVtw//Uz1W2+5SGV4joMmHjo7Ox6MJXWM44F4FTKJtl7DTmLLbUC33\r\nrwkJamQfxihhCmRWXori9gQ9z5TvGwcGN5v872k0mj47XhwY+TVMCC3SSuy3\r\nxIB1QcmoOK00CRgxn3emlnlEFTdYFfZZw7m5aswJLErmenXF6f4QEJKJIkxN\r\nUkSFan+2aNNJIYq56P8nUZxHCZT1nppOJAhBRtRQTQOcDmeJ1NO9kosY4EqI\r\n9YM+qo3tFa+6rdBQRmsrXlVb9Z/G8RcrSSgao703uaGZ0sp0VbueezUyI9Tp\r\nDpV9Ezq63Omqjvyxxe04KmRScqVyZ1EXDn3JQZKWrXx1X7Faw5R4CfUU3OMy\r\nW2Ad5OYrcw2wHsSz2doF1Q5/Yu0VDPgbCMw1rbhV7UAKEoR3KRhNIwt3Gu6r\r\nDFvoGHll7AJnr6Ypz14SFWO5rUpgLVWZsS2CvuIt/R0ZveBtzjIFZ5Kln/6s\r\noPuTyoEAG05ryE2p6b6R9fbtLlDzoOlze0cj6wRB11GQFmVpglQIP6iJorDs\r\n8vkMgWlld0HbM6ofZP7x6SpY/PjJVDf2O7B/kOJoFeBP47EJGobWrpGQa/3K\r\nn1YvWhsD8dmiHLJYVn9nYhdLvvxhBC7ABNCVpiyeisJ3QvlTPn82jL58e/T1\r\nIbGn7mv3mTI8GFbUz3oSoi6YhhGE2OLbrhE=\r\n=i5nR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.19.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1656900720335_1656900777829_0.2581416250382895","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1656900744901":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1656900744901","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1656900744901","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b0385d85e757679ac51de30a1de655a4af86e328","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1656900744901.tgz","fileCount":7,"integrity":"sha512-Mu/qG/SE4kux907R4XBXXW7hXMCuCdfBuXERaWxFqsh6L0A/aam1gxaU3+tqs1UWqjsL/L6ccKtpc4PPEz/UHQ==","signatures":[{"sig":"MEUCIFr8sr8USt+Tr4PwRt4gx2nalB0XFaF4yfFGpQDtWwWCAiEA+EzlS1/OU+lfVLRVSyXcFs6yKiYyTwojtirZHiDIGl0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwky2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDyxAAl1klmvHWttBKIbqsVA3vIFIMdO5vADmWf9F1eVGV4ifv5YPG\r\n2AqO+TwPpu8MTsLzJEKldNWZ6CNuaNAVOdIBc4sd1dLndGP+/k8Uh3K1u49q\r\n3blz2XxD5aFLABhOKEm5//hAEvEUxv1gzCdHXUcXIIBisSoMqCHwIXcIgM5J\r\n6bi7xAHYn3GOJWlmLWP8RTc2/QJKqMms2ncn/tAq5TogBGCN8gdZtknh5I+J\r\nnfDDd+XJzf4VHpGcbWw9POLgYSGCtMG0SIwAcmKHkB4cUvWpJ/0Fa+vO7+eq\r\nG6nXJ/lgPfbSmZU4WTQl5ShchUdfiyaUvTGnqeWncKJWpg9hWqHq+NLFOHrz\r\nFnvA4M9uRa/BmGvyeCuWUDDW6WGjhOv/3RN4j3u2GwGXq3XvU1Mc34Q1odFu\r\nMy7Ozj8R6C9cRf6wqstDkKKmwBSs25UNm0uoj5ivAAos+CwrbegwSNwEV9jp\r\n1TtDGgt+Yd5Iwckm0SGtp7QUlQ4S8KaFUI2XYPuxaipqe0oQ4zWHErgqx0jj\r\nYQgpQqcry/Cv5He2fSfNWKjXPklh75q/EPv57SerObCqSIOVIF59oPPnXG4o\r\nl7VdCGZG2zr3UyZEMlzQGznJDL4YRbpCSpwIjdmlgOwa8wkgXnCevZlGMs1J\r\nFdrr9z9N963JILLHt/PX6j8ofjx6YtbC0CY=\r\n=1YVz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.5","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1656900744901_1656900789957_0.022406223650268453","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1657246100114":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1657246100114","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1657246100114","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"627588b3f428fa7aaabe84c0d1c07295b6935697","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1657246100114.tgz","fileCount":7,"integrity":"sha512-vt3nTNBb3LcsOcabFBaYhkTQo/YO8w9wVmIqwjk8HTsz2kCDFjiOtqNNJ+zaQyDMRlVh+sO7KXpgGr7VGijUgA==","signatures":[{"sig":"MEYCIQDpSbDgLi3EhO9kdL7J1Zf+KHu+RoQwHgPXZ0ZmNMWfqwIhANOh3UzQ3tdSg/qSVSeas/AVi0/MkO/OOCGZ3RhBUMo+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix5HCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTCBAAh2unQOF8OSza7J3DZ+e36r+HUcvZ56078R8DpEXxyYrX/sg3\r\no4CAHFV03jFqoqjI3SHnJVwHQadDDC8SSvkrFtKjYcZal188EiD0cJFJvMk3\r\ncmz34TdBBvuAutU0ORQpVkoEKJYZvEHE3zrVMrzMCAS/KOICdvBL5i3LUGjh\r\nPvZ706eauOJ+3hUjCIUURs6NpI2g/GEuOOvfrOo50BCRDNUiYe3BAXjEQ1Jm\r\nA2LKWbC68Jm8cFIliXbv8/ry7B2jIPnsDecz8IFH5PneG36R2cv0XTYKm8jT\r\naQaPPw/oQtSRxqUtJ/OKSM6Y8Qz203lNHqiPIpsbT9s+5f1OpBwwn7HE36tI\r\nAUvou1TSgDMZzEgkPsstYxdyI8kbGj1LtwNrOQjJwEK4FOoB/HwacNEjNn2k\r\nZMz1lXxu/vKPe4wQuDZS24kyATw+Tw+Pg7ZMkgyize79Hgm0doZJLhx8405g\r\nfPZ1pPZkAPqkmLhOVOcqQAc3vzIjyGhw4oP4NY4+P33qFM9fSquSN/NMnARb\r\ncm9XYeCZ0Cz0XoyB+cYOXBj2JOHtuaYY7efJE2wEbcbbpSqyhbL9OVun7zoZ\r\nojUUjxTAhJLUwYMJHfQDuQj8NvI4X6/lhu2VIESwfUtWTcV+Vh1BHl1wskyM\r\nOZM8jGnvlvPiZaLQJR9vfFkey6PXDdupVQo=\r\n=u7xE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.6","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1657246100114_1657246146464_0.625451841645861","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1657505600413":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1657505600413","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1657505600413","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9327bcd6fc362766732e49ee5d1d7a6dc2d9a972","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1657505600413.tgz","fileCount":7,"integrity":"sha512-S+x8yA0e+miM6e/6rtzZlTP5uyV1xZ3YnmhOji47Xg4CxhZMc8ozPZvBYxVmVDY123erSzzvf4pLPxgt2lBL9Q==","signatures":[{"sig":"MEYCIQD3oNIT5XTSwaAnk+jNH3+SWEuHXDkIROlK9x47C+ZGzwIhAJuu6pRPBl8bKJl9zXpEwwmmWnqiX4umdC9GOFsqVC1A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiy4dpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRNw//WWVTxGegv5tl+QV3KbfScJg1C0HDkocR0WYyEQB8mmXgOTmy\r\ndbNU6FERZhDVLxClWOHDkF9mcTaoWxvIcLvzwJvac13mJL/efSlSiRaoF/QP\r\n7abC63UfrOz5sqIS7LgCz6R9Tu5eCaushAXoSD6eoGwhqf+aYNSJKzOhYak2\r\nSUgxaxxZKXJ8AV8TB0yRcSNyAuhhe49ErGf9n8Z1zHT3f5YN1Adq14GRz8Fn\r\n8UKysXCy+IYA4yq3mWFNsTUAt2niRigm3CVVeLf+7ShkCFVLASeVnVx8nL8u\r\nQUN6ipMV/CFvCeoDmTTldanriLOaez2R9ddhcfXmT8R0Vd+rDlBOmYyb6Rih\r\n2SEatwGfpCtauhinrIDiFXhoCZ74t6pFIUay00iYYFc0csSD2qcK6gln1leE\r\nFE++tnfVbAfC9o2Fr8k7dvgT58F5pTsP76ob2hxzcMR8ScGnvqLi8/yqfOu2\r\nIO5mkQSQ8krQSOYMCNgYoNNPd0vHbSew68MJjlmZCbG/fbibzMXZByC4RmvK\r\n/5CM5P7DDlZXAGSIPimQDIKQdlhiKQjz6E2dwcGedGKHHI7OLb3Vz4r0FEZL\r\nZ401INpNfkBbZwkHjYuvb5b+Q/EX3rC/vpLntiGfGiR29Y3W0MnQg1e+yJe8\r\nIxQvLc5EJJNTS7jbQ6qNkv3nZoV47h9Cn+g=\r\n=t1cr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.19.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.7","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1657505600413_1657505641300_0.4533364467250729","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1658110075597":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1658110075597","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1658110075597","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5a4029de25c0ad58bbaf67f384f371ae14054a94","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1658110075597.tgz","fileCount":7,"integrity":"sha512-7N8jkyeQYQk8hbY9jI+B3/AXOF15cHO8UPaIadiSNTdwSaT4qRtHrA5bZLOGOGDo/hg5udGGOtAfYz+FFg8SEA==","signatures":[{"sig":"MEUCIA49YkOuib7+zrLJq3gBFuoIda/ffhveJbiSdHHsqSHCAiEA3y86D9ucKWmOAZFw//IF4y7cAB52ImeT4gBHYAqmQeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1MCvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEkg/9Euf6vKyg0HQB1uPPA9CP9CmG5KfA5Xt3WdeQYSsuljudyC9q\r\nJD8nnVw4M09z6+QJXViNHkyY1eYIpRa+6c9ZPwbEbUTVHdnMWwnnnqe6yws2\r\nAyuosoq5tSmkT/RK8QDuDaUpbgeDTkO55z1M75THZpD4xeWdE92d96Ev7j0v\r\nfJDxThtslBSwZ+lhKPHsH8mXL5W8vZh59Ny9AzQ1YrKPE6Z4hv4MChGZZAOc\r\nia2Vo7wzjg/2mflUCaWGzvs1E188ZuOizfyKYyxQBnAZyH5yDR2U1+aftoX3\r\nK/0PSMx7itJ2fte5lh5ofM9roWpytzMw7wPaY8Im0u7xcPx4Z0Cjj7HeNgRC\r\nfq7obb/vIKCuREyoWM3CZFZARj07IUFQyM6mn17a71uqFsnY7xDEEgc4EDgk\r\n+IEWnKGHdYpZJflIrMfzEzz2lk8XJ5opx9IJdCTGxaCkwM3cGVExFZwWjU1p\r\npinW56lZoYZdjWoJnZUcBP777ICI8YG33JBu91qIHAiRnkXPBojwETN2CA3u\r\nr86SA0ofIzanyDDi8jwzgVuX4mmE/oLoFZLhH2A4eBSaNkHqmDVXAQyRsB+K\r\nUPJ7MIQYz/u9OC742LTXDKp6r5425e0No6DmJjWJwEYwsqLd3UBsP7sKuRfv\r\nHn8rlapYBuFl8++3WnzopXbJnlGQwqB6cNg=\r\n=XYs2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.20.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1658110075597_1658110127397_0.1882583823035613","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1658110087974":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1658110087974","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1658110087974","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"bcd53d589750e8676d9c1ca7a22e91f647407e4e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1658110087974.tgz","fileCount":7,"integrity":"sha512-EYdf/6dU0k/0Mv4ZIiLlW6FK2UDRRJEpUcg8yraThtMYsh3oJRebxQndi8x2H9b1foG4iJgN1lpUQivWeFGNbg==","signatures":[{"sig":"MEUCIH9U5aCTDVjCuYFXQUMY7xGzWS2LJuwCTD/tJ0fYJE1BAiEA/ADtPVkswEp+0Bp+UdtXYeJGgaUblD5tsfD10ERWkl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1MC1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFKw/+OnFpj+JAapOSYC8qAFaVeomvG3bAn8Ywd9pvcHdjBziJy/yZ\r\nt6KgQi75lhkB3DXfZ4TEKt1BMw8HEv41itiyhYALVNNed+skJgCmUmJTqdxZ\r\nC50rwFDC8Huqn1xIweoSWM9QQsm+LYqUlnaLMQqgNEy6HdDdCyHEY75OOf7j\r\nuNnzEdHRisZKJborfj/juZAq7RywuXbNKCCUFcn5Q7KmuKXZNkCxfMYJhVVj\r\nVlqkNJyFHsczsSw9s7LY149Z8yfo1YuZN7XRvdjakS2suUGl+YRuv/6AebHQ\r\nUfcWy4pIsB/eT+3ocL9OmcqyiTc90fMXwI9n2aNvuSeQBlKuan46c2m4h7J9\r\n1WBP9Q7NWcf/NM2qr5FGBcQ4pGuNIUP0ClHRyDcNRMWRrCg7Jt6u8KJXIahd\r\nEtJ92j79aCbIp1ju0M0xgLyAgP/NDeU2tJPf7XP1SLr33tmlyi88T4/R4n4Z\r\nmDxCekCvkNLhsWdN0z5V5UeJ1EBuLs9rZSMg0Q2wjNmG8Y/LqzTbm5MYUsDz\r\nS6HUozr/xD9cmWwy2IpB5wZoN9Czp3nQTotVwlpk3/XkrKSsi06+orKDLF0l\r\nOYx/qeMUqm05oUC86YHJxBdMj7Rovesswh51i5C9MdKw80E1PPuMnh9roS9X\r\nix5Y/b1FgpefWC9DmkdnJ28/34sv8dk7yJ4=\r\n=ETZ7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.8","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1658110087974_1658110133214_0.46487843079974267","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1658110085524":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1658110085524","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1658110085524","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"24e6a83b38a45fe924c8e084201ad7749ce54dda","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1658110085524.tgz","fileCount":7,"integrity":"sha512-qAe8tK0qVnMiHt7aKk/J/SIQe4DW63/CWrvrHnCV1F6u/y/3mVcTOBoaR2TPuB7prlTQwv5qRZpmz5DQEBKVhw==","signatures":[{"sig":"MEUCIGdYYkTkYkSTS5kDveW0n0W4Olj1XUFmpU2Cgmeklk2GAiEAoO94vpvxADZPn/a/IKe0SV6pCIyiUxSB7IRg3WGUv80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1MDAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6cQ/+OPqUSIcaZFSSSYoORPoTJD6XsoCPjMgxUPM8pUGnG+xyJQdl\r\n4196+da0yd6xrjgyIH1W+BpTfEyT7iWxp3cyDNNTxEy54+70/M4oMGe1wr84\r\nPRA1PlJTVL39cTtWp2EaCmtXZX4m7+NO6JsahDQ6JP8+bp6n78L/Cxd5IfCc\r\n4VjQyf03H4LX3NFaygyA/hPhTbAoibZSyENIXQ7r19KnPxXbTyUvP1Mc+pbU\r\nAuDEkgTPaeZTZI+siI+B3mhTzKAUmIvgvYmhAmsqZt5OjzCHTkBVQ15VZKL2\r\nL/bCoMAFbu7g2f+T9HodFFsja+mm/zMk+1mlrjbaQa2FjuuRS/4KKSWHu6lf\r\nwjfEDWmMVFmaEh5+2uEakhoF5A1WfB0OUPQXBzW4TiAeOE0cPGVmZJkjbrcS\r\nHLZ3ece1zFZWahvOrtfEvmhbwYurZixOTDcKL+sFDMAoZg0uj6pelddNhYHt\r\nxsyAtQqOqjiXStuf+PoL0zlMsO/MwAHu3FkY6w3/3YsSfpZ7+Ix2geQ8IP8F\r\nY5gzxfpTylDU+dxxKxjsTbHMsYrS9EbVc/s+85mVGEUTkPtu1OYEPTGt8jin\r\n4cA7anRA88DEy1TIvtDMVbcKUPg8XJnUxDWW/1uxLgM4O2c4Kg1/UNgVV7yE\r\nINNw+yPuTS34EHlDD1R/C/rJ8dAhKaAHVbA=\r\n=T6ow\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.8","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1658110085524_1658110144371_0.3151656649326393","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1658281559708":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1658281559708","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1658281559708","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6f5f4efb40185019b2c4921c0ab46d8c77203f23","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1658281559708.tgz","fileCount":7,"integrity":"sha512-4OJ3vDDyc20co8Mjbur9ff+o/cm2twcJKNBQaSEaV+z92H3RYMwsSoGThK/2AARUgxiwouE7tFfygcrTdNJHPw==","signatures":[{"sig":"MEYCIQDmkIDLbBZzOq2YPJB0RTvOerEkX6YUC2PREvM9IPjs1gIhAIYdJiIHJtmcWXvdwVuj0o0lZIAUiriHGgkb8d8As4yl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi116JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFpg/9Ecx2zn4NZs2ql86Wye2rEa12bUhF/k/nTFqCcqkbCaRZTMHE\r\nOScBqsEp+0dAPaVYbna4s+EeqQBYTD/8roMIUVrgujqUEFTfdqm3il/Vwafx\r\nBBpJODfISgKDQUclatA68m/ozaia8LsNsZUVWFlZOcFiIhMCv/ovtveWYEri\r\n85NS2XF9TcI2GMw1ODtnSAa7g1+e1jirbppl+7hxgt8pP5qfioeB3DpdvAZp\r\nDu9emvzf1M4gcPNN+n9tPU7gUSZSInDi9o1NnGb7bpl+m3Xb+vQNbtOq3ytC\r\nfK7uVYrPJjDiQQ1rH/6yjc+VliKQxApgoKv0dvxnZIRK5LklYrvakAAgXvvO\r\nwrhZMHzDjiAU38zptwxiEqbK7lWAnhr1JLeB12sK9Iaof068dNcP4qflzVg3\r\n4KUnFLS27o81Cj4kzm5Zy/9/O66Uu/AJUcz6fJByexDckFhOHbJFzNz7LaEI\r\nkPWKU2lvTkb3zV0tYZg3ku3Ja/UkTdaaEDFLcL99727TtGzgNCBGfYgV94G3\r\nik6c7HSDuzO0bUPS9yTS+6mvlRJijguU0QgOCIFR2c54gnh4iahkNw546w9t\r\nswp43qxch7HUbrl/+d9LanwcL5nzXRdMUfakocu4Nj3xYwfBVEt+xYaKqp3O\r\nPXVKu2TExDSDs9JQLkYSBkffnujRFmPvOjg=\r\n=BvaG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1658281559708_1658281608838_0.05760012494148725","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1658281559283":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1658281559283","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1658281559283","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b141d44b833440404f65be9a66f8d933d195a509","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1658281559283.tgz","fileCount":7,"integrity":"sha512-WfrnD2Wu9WVSNtJuorH3NYYmOKJBDwqTJDU3E14ecc7RZ6sg7DQbDYYXqVZqco4CAiHVHqJJ19GoWIxktZTagQ==","signatures":[{"sig":"MEUCIQDSQfOuieMAN5LdiGcgp9niau858PfBYqyMMys8sEPb5AIgPmzGCGqyVI5q7CNod+X0sC9xgjck0XEWoqA6EpPPy94=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi116XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNbA//ZbyIocZGjhdBBqRBFMlt5Ptokcuva0leiOfso4kSAU8xvHJb\r\nC1NKPAIKPHJWpDImRPN4XLkd+0bbrBbXq99gYfoENeAoVt4tNmeZmVp27dU4\r\n9H3evH3MHlF2OCqPiaY6IrI41XvBpEer8EZa6XgzoZwVPa8qWw+7gLGeuSJ0\r\nMQa3f55y0CqZS3R3Qr+3qAGHyzMvD+3voZKgdL+2YHdXod9cknFylx5TTyHi\r\nG+49HG/8DGeGp0xWUt5iLF9rq3mwevrwguUTL6RtYqqZQSvpcqHFVqmCFwpM\r\nDs3D1Fb7aN5m+xLUkq9Q6ydtznGkLEEO8luKfmRfhAGhF8Pnrxi55HRtxA1O\r\nTrFnAHQAyl2zzfa5wtCkMpIouJGZ3tmHjyjuyinVLiBwXEpVfgcOEEMSzgZ6\r\nYa5u3B5So5x/vOiVMbShlBqziHYkro1HFK2ZNiUjCa8ydRIjODiBdhYpbvUS\r\nT3TznggVOyH6OQPF0hdeAygBLaxRlHD1Ox4vkqNNMUHaCDLLY5pBQZSfVxcU\r\nvZ3f6zvuOkja8OF6XLIZcX/MU1QOAj3OB+5CF1TvnqOuGruYrSDUavPiJqUv\r\n3trt444A8laTGpS9/BsKQ890HcI2WYPJQwM/6frl4FQ6mn3XufDhdPs9oHSH\r\nOYKnO296lk0awkqcQZaDAhqvIVqdhcp7lLk=\r\n=5OA2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1658281559283_1658281623070_0.8828324520162345","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1658714968108":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1658714968108","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1658714968108","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2e5dc0ea209d89fe5fd506b092395c0fdfa46519","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1658714968108.tgz","fileCount":7,"integrity":"sha512-oPMWifhgGubOrRh0G+SiLh3cjLJ8VDSl9FhPzNmCNSItgWSJxKAJWawHbtx/3H5BqRI7zDDPywM7niiqWc0JiA==","signatures":[{"sig":"MEUCICqqbxdn299XiMrzrQ2nG9cm/SncrtRDWaT+at1YYDL8AiEAh8wh8CP3UjibEKf3quz5yzlWEdFeGrMN6IKRWQzgvr8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3fuJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpm2w//UzydyfUjhK+x5jQiK1cC2kAtGjetwlwuinvLBcWXTK0aG2Yh\r\nWovKwJw7eVZBKylFoFIS9VbvpDjFlOfbpig3qNDdggIGM5j6n+ZHwrBPkz+s\r\n4nhIeItt8o6SOT57D5mFJOQqHFYQ7ZGnZtdTx+cn6pr502y02Qnt6ZNwsnri\r\n4mg8eVHquk+GPlqI8/9SrOIs0LzDEEAqrwV75FOTrtuszaX0i55rYCnRp9GH\r\no8Icw0zSpPPX1qf4QLYsuDAyQVlo77EYpydX1CJV/nuZpMw0HcBB3xGmIm1n\r\nIeI2Q1GFY9UGdEBfta+XR432GeNmYg4D35LjERUbiuEVdZ4YJLGw9qhcxCkg\r\nC2JvH2P2GzQd9ocDRTC4PfYT9r3rsoIAQoeWaREUfByT2rt6f79AsRR3R0Y7\r\nN0x7MGILcv86zbG3zLk1Yo5CRA8UqY64CLpK8qELvOLzWguzHbJHIZbVRHHj\r\nCq/BRIbQvKMWnAKbYelW/Agd+kyrmX9MelpZvasH+jpwvcB/0jK1hUP/VpwF\r\nmDbVU80As3YR7Sj7g8V2epSigGLSuYEJLXhlhMdrysmM4hOEypR8egZd8FSO\r\nIZGaW7jMJMeGw3gqe1yzcKpG9zlQI8ijh00fk5D/+UUwyJhvcrZGabjOIUGR\r\npqagnbjCx3hHLmffFKhCxW05z6DgInSCZ1E=\r\n=tAuE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.9","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1658714968108_1658715017576_0.14381933887417908","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1658714967414":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1658714967414","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1658714967414","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"9f0cc3510c231869efe3f004f6e6750b3684bdc3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1658714967414.tgz","fileCount":7,"integrity":"sha512-iKGBozWddLgmhAep6ezZs9kTyZR5dmEFImyAQ8bYVXwwmnOkqgOyGoCRMEjnZWPCpZ7UML1tm3cqUSsC64Cv2g==","signatures":[{"sig":"MEYCIQDHacaSYQXD0QY2+QwmD7kpSs6rxUmOmFYmEuIEpDlcsAIhAPE8NO8fcIYMwbjDZGMs9qsOa3ZA5QQPIqtZzkFWl74N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3fuUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqm8xAAjL30HHuK3NtXGKzbxjWsXs0pAxJwg7wuoZ5F4rNvwnPYYfcZ\r\nDGxw0cZHVCheAAe9M5/TBxn0mH8alf2ZFRp/8l9lH7qtiKi4j9HuQ/jAi5bx\r\njuLGWwjijiufiUMd13H4GsnCWLxDeEtQnytyhKyXmFFfQttnMRR2giG5HzP1\r\ntsdlD+O3pZ0FsFKI6B4F1FR0uEfpyfpqrv1chmkkTCgcwLn20kbie4TGyhq7\r\nnrTsFFUY0xrjNBR/eG2MMU89yP42Fl3ukA95St6j1ynxcrGeMHNL9Wl9B+1V\r\nOvLYdjQPPMqU8R0H1stzcmcz5mDVQHBu45Ji9kgPHWXBfkUPoGhIOd4jSyOE\r\nGU8feiwJ9s6D2zRpM3btxD+fsBh8hOY4GzjFdmqOepUtgDDC8fG2IZOug8ws\r\nK9Lz+2vI/aWdRtZITqBJSRAbxd4RsVGF7Efn781smn19IhwIulzQE/lGO6RC\r\nXHxaQLyUFneMV/5PiJ/p7l3CYdKkTJWjquIUIJUzUiYPln4HjGYhveo2QpQO\r\n5XtQ/NE/FtcT/Oayj8m08/nTM7D/OUTaE7sWk4dZn/lFIizKiIllOwb4Pq6Y\r\nqk4oCW67uB03OSu1Eyn/e99o8QQ6SYU0dDm3rvjezaNDTJCgfGPqyCwQeQkX\r\nO9KjUNAI2zTuXmdZNyIu8llW5/n/KdnHz6I=\r\n=W3XY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.9","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1658714967414_1658715027986_0.4196940839756249","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1659320321168":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1659320321168","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1659320321168","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"dc7a7c6e513ce3732e361dec4b926d008059a651","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1659320321168.tgz","fileCount":7,"integrity":"sha512-BP1wDUPmq8p1otMQJavsNNm5HAWf7qCGsV2ba7Ed4NaqMYQ0q9ew726uHKJy7aSZLQwx5SwSLTFZzKNDIKjCIg==","signatures":[{"sig":"MEUCIQDB3PACvnwW/5sPipVXheLMUHV5XMxXbU0bh14bGlDcMAIgG0r4Ba9Ykl1fYtKGWFZHvPehvl8PvaDKFa4FIsU4jig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5zgvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqezQ/+JzwoAabQZ623pwqL2wCvZD0Udyfwk6spFJP3L8qB5EkRKjDq\r\ns3ACWKRNs+aVkr0GXr35i6N+VH+6vBgQ5Q4Ye4t6Siwx4Hs4Eiko0AcxQRHg\r\nDj3PmOrDWeiuoggNiwE4hYD0nvKmQySh59wfdtLCYyk+zuEftiNz3OtGse/g\r\nas1z1fiLWRglgcmqbuc2qC9MUXP98yw/KkekSZTDd+n4ke79VHXbMhcidKag\r\nZyoi/aR+HozkDoYfRnwu32zKXgGhQnZopmxKHE7e5QIgpA2WxXc7pIcpnVPP\r\nAjFEbUOFTZQeAyF81UD5IfpmDLy/RGWWl8j/+yLCKtJd6WQ7ZRnET2xmSUeC\r\nfh03m63tomEhP0q2THyXdidK9BrgBUbsyNZUbWA0cg+2L2nEJnk+v9dkuPQc\r\nk2iqMDLPw64Od7gz/qp/BCo0ksWAc/ekOdQ3N1//utLjAAYzJfAUwDGIaal8\r\nAhUSnB/kA0bCjJUG+iG08lCsGxCytUKuUAG64dVonL1ICLslZeqf1YZngPkf\r\nemtm3gRH2C4+A/lySmtlNzCi88Bad/NGY/uILdRGvDSS8TWQByyNJ4co8gVl\r\nufWYeFbW6kngMLyH7nO42dNXKzUrfO3jj5HWsKS9h0faMe9IKCMRNID/02D0\r\nvpuepc7dp78l1s+jXEViIK+m5DtstlKCvSg=\r\n=IZF9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.10","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1659320321168_1659320367381_0.16721206243074538","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1659405986943":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1659405986943","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1659405986943","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e349ac93851cda655c0345857fd43316f3f23a52","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1659405986943.tgz","fileCount":7,"integrity":"sha512-CiFajWd5oJ+NO6bvX+rub9WLoDoN0DgYExwbk0Z4AG9Rik5ZTBxeEozvYm6ETAiZ/zMreYvf1Eaj2JimnG1dyA==","signatures":[{"sig":"MEYCIQD+alyQZKmWoKqZoebhIfe8wyIJTZXX/lUqvYkdeNyTGgIhANHXszgW+GJIoqvpcjXPVgZhEusAlatDw0DIIe5ttw9I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6IbLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJPhAAoMi2+5rr3gtk1WFKPjqw2Lrh5T9LlTpc8S5mUI9wvsQAhXNj\r\na0SphT3v76TLEeS4EHJk9C7oYVyNbzJNQviDD+0D6UndiM2/PppaQeMS3Pnt\r\nz9749gtNsj1eRrV4S09AqB32dKUvgPfI8ONunnAR5deWfwtiqsvR81nIAzuZ\r\n+me8Zv+df260A9RXEtb4b/+xJEdrHUXZxoQbCHaf7LcHsDyG6GLmMnAIYRZs\r\nrNGLHoEvJWG+QO/XJBkzRqJzXY3DzSzunNN1dILHjuMyvns9y/Q0xCxLuvgG\r\naA9+qwVEuCk/a9J99ZoAyLWyUZRhtxZpKat9spTMPEKmUPwEiphYZfJr5OD4\r\nPkA1h1gKowTHj+OSis48QqbG2akHKkeiZvLPQLnH2F6k57UnbPBnKZP8wo0C\r\nzfpL/L/pSTRPuVrfYaEPvI78KjgRUuuHq4NVZGiWGU4Eum9/sm4XQOLa6MG5\r\n5sJua7qA2hMTYryPViSXvOjhtXNYVuBlsarZOzSS5OjVRXgKt7zttXHPM9aU\r\nFPF6012MDVRW8iE23Xi1Av4SGxAZB72XVOcxSSFuKTertVVBfpWZEz0578pW\r\nb5wNR1d4j1XQhguMAvWacxsFVDUfk8e1uLHIJKuTHwVKYR4syWy7uVViCp/7\r\nWs3vQXl+0LGLVI7M5S2X/CTkYPE1WBiCIPM=\r\n=YU6b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.21.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1659405986943_1659406026994_0.7570887385397234","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1659405992433":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1659405992433","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1659405992433","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fedeab6709439e5d6a0bc4994b770e55372ebcc6","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1659405992433.tgz","fileCount":7,"integrity":"sha512-nJOXpUSzyiVRJ3qLUPd9mHQFyL9s408HM7A/tk/uQhfrcqNJnLCjVs3o46mTvyZ3/Na9cHOFktpYdKf/8xITeg==","signatures":[{"sig":"MEYCIQDBtsQ3f1TQfz1xtTYV7XYF9cHYLkbDpr8pbH0n3IRdfgIhAMRpGf30JS7fmG/P9wvNPXsmHopRtgaTFOsZt1I2mmOY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6IbaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCpA//cAdkZhbk+k1K0PmPRyXV9i75c4K561Zd7lwJGE0a6mSwKlDQ\r\nYJl1hNTbb2VXH/vjoovspXGIUyXyK9Xi0e6rfCoSedZt+B77Dvu/LZ3mZDJM\r\npRGwh/LIljxRMYTsZYzHolaSrRC7fYr4Sng+JPZD6CdpeHZ0jxxAi6hfaKzq\r\nfzj1sfLDRSIdxCSSiRukQOW52SJlWHUaSkTUdpTD9jUcPZs41P+GSjfyG15w\r\ntj2REvoNA+GK4lqUjMPPjKWjQiyu3lQlg/vq2sKA5/Vhkd9D5tK+IbwJ2+cI\r\nZnFkFxORkKvsujGf2LF48rIHkJmPC8beGsxuU6+uwkpAmFDRhipMQeHU0VxW\r\nj/6sRuHa3RuMiJhX5K6ESFTFuX0hFsWSmi1rjviZJKdF0FehM24CuZOKMCgn\r\nn/hXU6jYPmO1UThoHZyfqg00Wisve2irRao2TCCAck4Z+ohtygvyrmllV9u9\r\nBxY8rfaEEA2M3Q7oQdrtnuB472xV/tuBy4B1l3lPmFSKTVVGMXNuWe4oUhtT\r\non3fqrsN+Vv74WUxHV0DQhsGHuUOPHI5qR4IfJlMGylLswGVI6EHfPeGt4z1\r\nO95ZZDnjlCm5xUw1/7gjSR9uA44P+hQnl677uIq5DLVJtujpA06oqfhwP921\r\nfgBNnM5vd9nUFmbmILed3085+SGA1RCAX1c=\r\n=bM9c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.21.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1659405992433_1659406042455_0.9983357469729306","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1660529355964":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1660529355964","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1660529355964","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5d61db2e4874452adcd22da3e1fd0985ed51b277","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1660529355964.tgz","fileCount":7,"integrity":"sha512-udXZn+9yMKN1zSnhYdj0jeS8dhC73v2XZ0bx1FKd8HUDUyoOTMnBNuakd8G87WduVyXzuYX5vJlTA7YSCCF82A==","signatures":[{"sig":"MEUCICKHwAJtBK90HaK9tds8ciDjchnXJriPpkR2+3/R56xUAiEAympildVrV45tzWx7+GE40e+k1gvcf+Huy9ljk6JwLRE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+asFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4Pw//fmNkcsyOq1lh13N/EqGz6sJNjFazCKQnV8L7sBQq7NwWOTq7\r\nPv4WuW1vKvZiywPK9uFkHZbRFJfkoXD7PPQEUHZwjlZtsgtPgKq48TIB5ZHz\r\npWrXrVtbROKPL2nPONMElAO9Rf7KcMuPojht1U1Mh2MOhUSU/zOGvWP5Uc4+\r\nPEXhY6YFKlxxZ/1MhwvA0ey6hlzB0t+OwzYsa5TdQSkIqpzNto/tKRLFbDUL\r\ncdfHmaHt/4p9qAD9rU1Woc4D8Lmw7v93gEgSUuuYwQnB5aSssfmWKANFMx6+\r\nRMQrWqDt+PcCXLqgHA7vAOCm8o0xKUubW3gPqUokB1s6C/lOrzmKBfD4zk6I\r\nfPvhXo7PqsFQpNqhvsSYZLikvqY4fSBEsh8Pj9xquOuK/N9H821eH27FQhjc\r\nlV1u77+E8JQHQ26K96NlNwjgbTaf81MrPiiToTc1Qud+HVB4kAuFlRu9K/3m\r\nxwTEkZuz9OgYLpLKt3TfZZOSdUZjnLDspcs2T1V84GXUupLxxgpPCP2TbFiU\r\n5YOYlKfOQT0Ix2wq/uIpybDP6kbx2Vue/UQ9MqMZ+2WWwp1bmkBlLT0L4Mxc\r\neYREanvVxQhkvYUJEYSRCDjagsDO/BlLrg8gcPjofWU6EAelj8lA5HyW5Z4H\r\ngvwBcGpD8CDJadxUK63Pft9T7F7w98XJXGk=\r\n=POjk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.22.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1660529355964_1660529413677_0.48904744112721277","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1660529353179":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1660529353179","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1660529353179","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"74f8943da4452ca4392bd9fb93511bdf63494be4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1660529353179.tgz","fileCount":7,"integrity":"sha512-0Lb10g32S2xJsR4i5Vmgcz4PDMoaNOvvJDZ5RY/WzKf5iyMr9uNYy40fMGfl7OU9McQJgD0/xEx5N9mv+gogLw==","signatures":[{"sig":"MEQCID9tUwRRcVMu4AWVq2ar1rcGiEC/gBpFxFgL8icAS4YkAiBzC7jmKnderIOLuqk8bAaJKDTxm+puvlEKLYrUEqPLxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+asLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqh+Q/9HIVkSem+FW1x1bViLOitwDRJpCfFklGWuWNW7ZzRmVAnTwJ8\r\nt1HNMuvJCs3frBNoy34zBvK2Ey8vo6Mt8TF5iyty36suyGkqDAQ2dZRnCfpU\r\noi14i3hTQqHEimbhz90agb9goQhzdNzPrYOBgtO5TC6OoLDyeNfAHADltPjx\r\nYBes0mdBMZ49krbHzl5fqQNVZha+WF5UABKEa7+Q1cWhvbvu3KvifLHZsuiI\r\nsfHmr2wbJIe9zGubEJbwJBIEzpvIsv/ZL68lwKzbfscZmj4vwmiXBL+cDcyO\r\nhT7/UBLv8D+k6ekSfrh6hG9q4sVSGi/qe8Z5ix90k8JnZiGfZgpz2ViwMMdl\r\ng3AfMqGjP9gGOcwuIRviWe+VaxoREc7GzD4sCGSRbBLKPdkng9jHP6g/YonE\r\nopy+AfDp0B5NY0mVVdmG744B0xA/4khWrrVC0tyXEs2ADFhcgHilCQFfAZSf\r\nScx6KB64j81IVWef1PgjOMTie5ki/8wYpzLoWEfUcnqceks4O1rLCJhl26KZ\r\nnHPlKEyRqlrybEleTG+onPBpvqA5olD0rEv6BwtuKFIGQ9PJZqId4PbsDQA4\r\nMfVFeWEsh9hNiPJMb4CYhVAPbImSB6eL7koEa0/dqnCNVO0rsIHFjyQDV6AX\r\nDexgDnvBZOlNnG4r7nNhy5Q7CH/Rr90AmwM=\r\n=xTKw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.22.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1660529353179_1660529418820_0.8884453789027937","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1661739150498":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1661739150498","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1661739150498","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"773430fdaeab28614a245cee416235452691e730","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1661739150498.tgz","fileCount":7,"integrity":"sha512-XXsqdY15/SG2biKPfP9OprazVXAN+cXjTCzuwLfuA8Hih3VecFaLdpkUrxPN611jbmdbbs3MwGyGH1J7EIY0nA==","signatures":[{"sig":"MEUCIGqFf5h6SWYuQGC3kMfOe01bY+L3EN8rra6Iih/oe0LqAiEArW3oidS0eDB6AsgvraCRPmOpy/zvYDAaEMPvbWWsvSE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDCC6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpR+g/7Bi6zVTbvT3pOd4CdSLa3ykc7EwtVkAzmUZK8EurEBC75ZjCv\r\nz4bHEBXvA4jIsxKy64CLEW41vxn3gStzeq+c4L4yyW9K9cDLjgKkhE6OqxNk\r\nO/wcngEnznXTWAl6Hq9U7Y11qigV7UlCzLpxC735FElLDtQFivJOxy5OnHcn\r\nWIziQdX8uUa/qIXoItKTQyH9V1gok0g7qUPq+PgGu44iacBmwHYzxJxaDZn9\r\ncnbX0qxGtxM9sLI8IYn9Z6ZM4fSwV+VzeR3vLpmFQ0GIgiqjwaeQws5488wG\r\nF6JkAXhMICcibOP5phlObkeccadoxESu3AtGCeuh/LwNTIbrSHG8o12nhx03\r\nPVgQLF0b+dNc4Px4XqBsdX6pr9Od9tHNMFQW3IZpCmSmI+N+TH1kI+J0cJeR\r\nayBoYBDkZkE6rQnxJlsBB7yLMH9GhMhdpQaIykzHnC19w8YWasdU9EnBAF9M\r\n8BcY3+QHipqtYqqWJqZk63AkcWctyrv63ZWPhYoxKkdfgHbNwhv4XL/kS3MG\r\nHPJa6KqhAW8oefI1qS/4LQ70xR8LuNXe/RMjBzJCa9W/J51dkE/7o2dGxAVN\r\nKk/OXt9N5bAMxIzEHAZvyrjNy0PZnE9wSj8WbEjDpZyMKKseDvXkyPdfD4LT\r\nJa2iPhBgx4qmU0uiz/xjMOnQXotBtIMufT0=\r\n=dCwK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.23.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1661739150498_1661739194091_0.13571734407544178","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1661739147810":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1661739147810","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1661739147810","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"36cf52edf66569665792bd91dec77078bf90d0e4","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1661739147810.tgz","fileCount":7,"integrity":"sha512-KLEVGJbMhFOOCgr3fFnAfF1y305YkS6yy/bdS5/UcwczUm5/+hhzC2lYoXO9EOb5IYudOHvrcSOzPmvB2SfmEQ==","signatures":[{"sig":"MEUCIQCfqbh/6YkOLF4KOIAjRC7IHNypYt0j1OE7pptqi49RigIgCCziSqtI/sVlXqoXTbkTzrtLa0xFc5R7TjM2IKa4rX0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDCC/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBpw//Qvuyzo4bZ3Hm4ieX/OmVFpTF95vfx7/nqxsutihaj7sS+8KQ\r\nmcdLKhTFesRKDFhBddbNOTW0LigRKYFoZnfV0WxVxUELuHwIZ0exdA75RAXQ\r\nrEiB04j52d2XJ10nUfTnjx9zUM24h1xVF1mZReCcUHeS2Gj0WpIpiqhZU6Sr\r\n4MA4EYYqhQKMIBACX5gy/iQPOQd2B5BpWZMk0iDoAhxVmTEbdFyKDSQKFlwC\r\njpGAGmB7fQdPAOi+GH88tln/2mpXFYxcsvctCS9FENy1BnqD0DPP1cVFTe4V\r\n4b+/Dc2bivScTxM6qGI+7UqSTFwKuS1DPyE0IhU+KvEEoLyXVlLKEfdJd8Or\r\neMDZaO1tsIN3cj3mbUz6AZQu0h3RPL5Khc7Z/CALqfevrNebsxkRewnJ9THT\r\nq4aCNnPZlghhqKoAvzztTd5MT7iKcyBmZq6mkGSX75R+a3JJ/Q1Lcttc1Y6t\r\nkOdNdQInu/Oa63pbNZejcYNKhEBHTtvMHlE+maWyBkoQoB7/hWNw6JcCATD/\r\nhbY9jIH1GJbDVd3A5oR+O7qhymNHOE8PkKo0BXVScmiXmEhI44X4ctxZ5+7p\r\npQv5GebBa65CgwMZJpakajL4gkqhJFTf6gBQ4N3VYl2LvYwXO/KV8oCZ9ZB1\r\nbPc7lvL4VgrqcPlCn/CrMimtYXayrtfF5Iw=\r\n=pSeV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.23.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1661739147810_1661739198906_0.7808455397523564","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1661739172277":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1661739172277","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1661739172277","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f531c2cc78e0c037296048d16d143795a4df737a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1661739172277.tgz","fileCount":7,"integrity":"sha512-9r8ioIhtvw4c/4jlkH4rB8jTv0C4neOlpaEWQ/q0cvceOZ8q0zAOBXojPY4KdUE2rGkjjJ/U2047wJ87w7sJdA==","signatures":[{"sig":"MEUCIQDr6UJtEsTPdZjnBd0hCvcKngd3TvE59KktSrhP+Lk2QAIgRe3wcbYjwMlIuOhhO2Eq5uQEBc4+UA6rPEyzyyFX+Jg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDCDdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGLg//ZDOO3Ntt1eMLxtiS97euEY8WTPz/mwnI5pvLJaHm5j6OXXZF\r\neU1+AkijyCZC7QMpfFFgjshmUKMARzfhvczhK6HRe2KnmNQDleOM9hoRx44k\r\n3WrQrEXFlWhjcAMc0/FYSv4qDYL4Bp8fH507h9QyhOxc2ksQkLWsDXXpfY0d\r\nkEz/3LjC9eU9sEfMn9CXQ4Lax0DqAETuIl8EAXl6aZ4WgU+s1lcI3rjTtaK8\r\nFEfNse43MWQFY+dW7h+oM1Dkd438KzBZEDSyar5L3OhwDSp7CnmmFgOHWxjg\r\naWMfG1MXQzlnu6DOWDl9qmeSXZYDo3/vmKb1EDXDCk76Z8eKUbXgwr96gmAS\r\nrIQw+Tc/tw+xVJi8+VSZIp7sAqsQHEipNYEeTlQFiIouPTqW7b9GuK0On5M5\r\n2+RVaEbsWckJjOBcIxOocXEsSG5rK9vGghF1HoFcSWmtZKC8399UKLTVTRyo\r\n86YshRAp7IbXe+zMeVXdbxgi+/JF9KnH4tcK5F1Aj3Hq885lq9VET8ocjmks\r\npNCOvN9t0xxDkw+kV5ywv2nvDMtfMlprWX8KJkdGlkGQyBnmWWFN/eTH8Zfp\r\nB0YjFrFY2vTImutuehhN6uYEzhLYExRywb0DmpakvvfUUR85cAzDsJcdsIcK\r\nTQCgrA5l1z6JPIQkJ9rN6GpiYBWlsSZ/MUI=\r\n=Lrfd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.11","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1661739172277_1661739229193_0.9306971868557476","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1661998204629":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1661998204629","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1661998204629","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1a6d5e13dbfc8052fdb2f0e11b61398840a42f63","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1661998204629.tgz","fileCount":7,"integrity":"sha512-pI6AMV8E5T8E6WZoLwdxUVrWbLwAGkIPu72sov5hC83V9v/rz6k/8/ZOHI4bj/Jytx7Uqq2yH9UVRJFaYv+/6Q==","signatures":[{"sig":"MEUCIBelPiItU3Fe5Q0H2vvt4udL4IvW+wvrn8/FdnCmTj6oAiEA6BHbNaO8I0TdH10mlVi8PqRTT8DnlqKj8Be+YwJJ9Go=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEBStACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6fw//adFb3hW/FJgpkxaEYpPAN9ucN2pP1CXhfp+9p9LNqiPG85XZ\r\nBORWZbVbBExCeuibrA8Cm3eCDczK60q08z/J329Men45OfXL2sxb6BBaawXi\r\nSdd+TPeWWY12e6qoItrXvN46HHF79RPoh5uBAM3T2rRRvpRDj0zNxGVepy9x\r\nwlb8Pkpoj5HJ8cIP5owOD0ubOqSGKgThh3M9bwHw3vYY3kHtQk4Fzg+CsLvI\r\nMtosCE9Vd+CZtPkjkfN94LscIxhVZMdg3370of5JCc+6g9EIZrObfQNhc7Xq\r\nH5BaZirrlwyM85cYQfPJDiAjr5Cm3yWNIaTEcVNrGcPetxjQsPVe/jBNqQ6r\r\n6GV5V2qVjlZ8CeHbS9CT4bLJDryskIpWqxPu4OMpZfb1zoD7aIThBBSjwDuX\r\nwKgsTKMWlvnjH9h7mj1QfqCAfSvL232AQ06oOmilC90sCEP9YZ6nGMOtxnnt\r\nLHRkqkYKVKS2k7jVWmsfgoaCaKSWpCRjIPk//UWag+tdQZJ+pyvZ3Qfqc5Jt\r\nv2+o1OOFW7bxoRdJdTbKBtMyHP8cBDIpkigyUaRwoYKt16ikyCucHSofO11o\r\njSH6znBOdglh8UekQeboJ2YO8xsLg6oqgf40Febxba/mx+Hw6fFfkGUU0pZw\r\nIQYfsFrHuipb5LEeCsKg5T4seTlzc1CWLYA=\r\n=D9OS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.13","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1661998204629_1661998252894_0.3562930083761753","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1661998208581":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1661998208581","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1661998208581","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"86a7a9b4c353b19c4af3ad874db0f1f34daff3ed","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1661998208581.tgz","fileCount":7,"integrity":"sha512-7opwuVe3hiphNUbaHNGQQGmas0g4irwuQDMV5GrDgt14lNd0+aRa/aOG/ATy4D1n08r98ylRxkOYcCeZYJkm1A==","signatures":[{"sig":"MEYCIQCvXCah+Ddipex8ZM3gj8fYySD6ebHE4mHPLJ0FtTfz1wIhAIrzbNU/z3CZbyCNsPDrMBKeOe+uR0qMBL7GHcQw2SGb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEBS0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRtw//fo/9GC4kDhu/3gh+kanugVEC6WU6eIsmzsbYmBD0uTS43A8k\r\n4YTK7L7QoE7gUhqBQ9P+O20kRaD2Q4dzoLnEjaTSZnehmtm7AGPOvymWeTH8\r\nUaxWzUA+bh2Gu4wZ/Yt7au6RbWr1UbRnJUdVtV/690ph3uh2kso7tlPtL3i8\r\ntcHxZo2q+1+iKO/mIx960H4jUQ9UI1JfU6MeZ5827QBjh6rs0WmGSH8NuoG7\r\nGL+vnXT2gD8+309HUnbnwPU7Ko5Qslrr+VYUfN9Q3MQKERLJyTEku7MlCET/\r\nZOEZRKXApygmTCwemnOwXshwg/MBdNTEkNWak9YUWnFenqy2ngfv1NpPqqAh\r\nsDvhK9R7vSE0kXt6JViMAh6iusvuiT/fDojxc0VJItEtBK3gRrVBbS3M65iq\r\nzYG3IghKpL4+mRb8l6kE9UmwDkgKbhJf4fd5xw7mQ5Moe/2ZMEwlsiPU5JDb\r\nmgUGD4f+4eb1IK22VKTmuYMrw7iKqXAAMxLJHbyJnJ6MhgsBBBJWw99F1AXW\r\n+RbKMLwMAzDYsBbQuAIYB3/vGejA46MppwtsqP8GFwtvD8ZQZzyvGL8jNgo2\r\n4R1cd11CfB9sY8Oh/Rd2Xpbbx4wjeeA0EXQc8I+PEi27iGEF1fJ8GDuyR2w/\r\nv1kBUDDcWNJ0DGr57lQDXV3+wyBDwh3RXNs=\r\n=wuFe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.13","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1661998208581_1661998260146_0.840854582026916","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1662382493297":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1662382493297","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1662382493297","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5819eb929f96a6eb8dbb18153c0720f6a32daade","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1662382493297.tgz","fileCount":7,"integrity":"sha512-35pZoiPJbiw/HFiRgAabq+s/Ue1dZVRZmCq+wf00+gB4sE7wFOUf7cyCto9jYUbe+7G/YtgmqdPDYOKhAqh1pA==","signatures":[{"sig":"MEUCIDqNihikLgGpY8GEE9ugbxzvtthJNkvOz6iXhyHMXs7sAiEA10N6SDPi7pyzWF8pVQTByGZJkm+4E9Jrneaik1S60NI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFfHbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/tw//ZVyo/Fxju0tJC/bTzzf3Bb6fLJgWjO1QfAJI5RuU15bqvZm3\r\necT3111lT2Rkl4CuTfFsF4efmpmfOG49wVSKgAO5VCSkrXsSBf6Ad+I3PnQY\r\nePd0qpXRLPzKZgaDK8Xb9FV/vjyzdYvOAxRoLce2N+bfB95JRyqveaiqv5C9\r\nGxBJvWi69psY+LQA0lwNDJXz9A9YMcgXL98+SB68nP8P4OfpLIWt4Et18fjG\r\nIV8/Zjc8RpRG2Q4AscRVszzi/AoiZr1z7x37/gOqCLcRHAfNRVX8w57ULIlL\r\nKEXBOnd/kr6ojMDvv+ZHgxAMFWI2DFJbSAEEfDgdazFIBV3b19dV132GSJYY\r\ntkbgGoGu36wUMVh2BEmNOtPDhTr1ktpQtA7nVDwqW2wM3KlSDDBigryiRE16\r\nWe9QPDk64rH9gVsj6Bnpp4EP81dLZ3w/aLNs9E8T7x6VvLoJUVc0+0EZuGYl\r\nr94gBUYmdBLArTmSFiN9Hkp6jMFP5tsTWVu1OAP4d4Hb8VpfOplCNlFTYHkY\r\nebqUlQDyT2A7DAiMUX50BlZhGcImjvp45Exa9qDRDfaMUWsr9Hrg300NYP5k\r\nF5o0BMAxCEpJvTTypwjyZdpZJ7y3XLODfEE2rp3YgipeyFiB+vo5HhtEQbbr\r\nvVP4BB69Cx8pcjwJSETCtSGtF7eNj60hhh4=\r\n=dtnL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.14","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1662382493297_1662382555305_0.8259673420206344","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1662516358428":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1662516358428","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1662516358428","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"3ddcaad65c6b57f438294bc33159e964ac457242","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1662516358428.tgz","fileCount":7,"integrity":"sha512-yezMnzzXqUpKWdycvQ0ZkbGRR6NF0FtLeBg3uCdii/Zfuiu6bwVBnUWyldvdVP63c+lMhXQWsTdbA12kuIDvqQ==","signatures":[{"sig":"MEUCIGsCuqHxAHHJ59c8sMSQaZY910fd8Zl3x9eGtOt00FiDAiEAqQVbMOypL/cXxv87FWER3tHU0+brH9Jfuzmt3wmMHaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjF/y4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKgQ/9GQu4uNpA6NfpVm8eJIcTaHXikVKLf1b7+fMfI5O/kWZ/o534\r\n2DDiUeCz0W8hC/kOqYA2QLBvRRA/axCK85yOWfF+XG18M/WZ/8hm8+eA3Q8X\r\nSzxxo6AMeK4v/oJ3nDcSQsZiKlLu6+OwlGXipyqpHKHWAkAgAuzmqHaa7gcC\r\nuNjf9ZWGWS+SdGsBw/9j/yZ/mNtdmQXN4V3Y65W9vOIudIxhmpdKTR5yzQVq\r\nZQ+cb6oZcELOXCvlnLtYJnLteZXzqP0/MV782WzGh9YqjwKH6gRo4gPXY1HW\r\neiNR0EtPtLparoGC7Xe+yAQcXfZd389jzmh7UtlFH/Tsr3ouJZ8uCoOlGuvc\r\nusqaCY9/PAXeOH5rbdfBEQLyQzNJQzW7UEJI1sxS4UM3ECjS6NMEHIDvpYaM\r\nCbVgNktd5lrtR2V5+HXb0vKJd5rZzUBPQVWhcf8ApCLApZSocGwm4ruOr0Rn\r\nUvefJ/7/LmMyEKQircITly3OPhMof1ekbKPGvpiqYYGafXjfpjUgZWhlF2wq\r\nushea9Hcrso3ePbtILKJBrCgmPMWcjTD54sfVPvaQL43atJDvpMH6+8Lufk9\r\nakpmQGIgH8M3GHzcdXQJWMy1aq7ORa8f2n0bRZAMjTxc5Pvtd8McncjPhazR\r\n42x0l6Xoh3qgmHKZL4KsiqHWjh9LZFx7C30=\r\n=JV1T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^14.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1662516358428_1662516407815_0.49524827469334","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1662689258630":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1662689258630","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1662689258630","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"462425c551416e075547f755b22e99188934bb46","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1662689258630.tgz","fileCount":7,"integrity":"sha512-aDufJtCYBfW7pLeQ6cSDIpM2TM9r4Ivw3GqGMIZp6k/CUX6lVW+g1BA//ontLNwb12S6mCVLnarj1u8NpvTXRg==","signatures":[{"sig":"MEQCIDIcMmi2nlnI0fHva7xsDNAx0CYWDtg+UDva3favaDJEAiB0A5w/4kMBYQ4BYzwo1K2vlz5FgBjnF37ULl8+fVdT7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGqAYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPQQ/9EiQ0ukPGGcwfZgm/VkzauaGevrB1xRXuX4ZNSldwgt4AJtUn\r\n7ICZqm9q31ImEbfIVEghIGOb+3Wlu1tfYczpXCXHsEPu65GF0YZb7FAUdquC\r\nwwuW8LWupqMWy5IV3GyQRy7Tnt95qkDYGGdvLl7/yoeKsnZAvtSke3jH0mvX\r\nzrJiUU3xQ83M3HsRsbhQFm9HEtojP852GL1ew7ttB0f5qs96ethF9WaUBw7D\r\nRn0V6c2W9PnVByOZpVQfBIAbLmYHqZDCzYWPGUXDLRCucCBT7loYA3rN0Tty\r\nNsvYqsvId/4ZcCEAVxeabf4HdTkBqNq23WYUQ5inTOydbwCC8So51bTwfcpm\r\n/OX+/A1Gtk/PWxop/t05Ece9pxpknjHPZAbRQA3I6Wy0OeWLpl89lcYLe++v\r\nCsgJloQtimyIXb61REVqmB9xhklk3Fat7oVBH+Vr37/R6+LeKjDYvKKnKQqA\r\nl2r5jfySH+QVZAYzfpDSEoQUEXivstipyoweTmebEm+13kTiJfo/j4LIkq10\r\noyXvgxhDMYqCOvt95bjEUpKpawvlb6lm46VyujW4cTnrw7KvUjyPAQEfL2fK\r\nd32d1PG5sJ3ecFQZvw56BTYY7gtapepaMjXJuNAkPoJq6YxCs7JH7e51wYYl\r\nfBv8m5X7XF2JmqiOvz2LTAq/p7PQ03BR30c=\r\n=NT8K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^14.0.1","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1662689258630_1662689304550_0.5747570732676945","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1663035014603":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1663035014603","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1663035014603","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"80599122b12164cac5ab71e2d80e8b013d44a047","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1663035014603.tgz","fileCount":7,"integrity":"sha512-9T7+npTAAJCMBfPuF9b+CmXi9A1Lf2BsY163Y99DHhEuE86NrJPd3+I+PsJTw9G47tpK2mb3F1Xzgyxh+5csAQ==","signatures":[{"sig":"MEUCIQDGObn0IXw1Ik/VV8eDv0lC/2rVP2veXwcwulchcn4hYQIgYuf0vjjJm/EiltMNK6XjmEiWFpOMDpqKcptwJ/+kmBw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH+a8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGLBAAmxKrtIM4axqZNZbvBx3c9NTl5zadA/1kuTmyBxRcZaq27kz3\r\nuidYFHCE7VRofyF9UreDhQKUbGWHKEUmxGETr+YaRcTYWSDRt0EGxhXcNZvv\r\nofm/4FEzH7Myc5U4QrLvyEtgVxjWJeU6d4faVzcKZGUfOlId4j7ChdXUHors\r\nPpVaTH6D+qgaBeuc9DFZADwvmMbGfaF1gTaRs1uexhypNtQ15GcULW0uykJR\r\ni/5EtPYWSghwInDRFPlWThWgYIRzD3Eg0m5XjJ8BMaBPot7/xwSv6NEwTpK+\r\nNoekNepGjeyM3/Fos8+g0k/iWcoYT3H7oY/JNH1VIOUUa8ny5drN3eknZaS0\r\nnPyGDv/VN8fAF/Pp24yPujQ4/mh3A2+YW8FphREUjUNnHmg5JnX3H6PY0BJ8\r\nyKTidlv3b78IunYlRs829xN8jK/5Y4lxlZlM3mLj1WTF3da+nNU9tGISYjS7\r\nHYEjqN0N6BVcJXJy9+o1VUtAKHQjbLKVHmhHAtOHVZg/jxhmdWA52A1jV0wS\r\ncWvCenhZeow9RUppKJaK8K4RD7hj1Nd6BmKexIQkgWr5sHhrECw53Guv1WnT\r\ngPnErsptQWlWy/1byHJ0gySMVt9reKY00p/xRMW3Qrty5m3w3+rKZ92s00wX\r\nVOFgaavRvbWdrkLcHlaO8iqs666M4KdWZeU=\r\n=+1RL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.23.1","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1663035014603_1663035068562_0.11388479115865646","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1663035050167":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1663035050167","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1663035050167","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f20350ab013f7cbadf7140a1489d9b0e551551be","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1663035050167.tgz","fileCount":7,"integrity":"sha512-lbZBm5MTCFKVlfenZulirN6Ry+9SPf7RhSc8fIxTLMFzlQSPcGUfYVG0UDe95iOnSWs0g7yAqfYWi9OrYKOy9w==","signatures":[{"sig":"MEYCIQCDBy037Z33rzjfN2paOJXGY/bTaTf8VUJs17hFGo6MqgIhALyMDeR0MhUc3eXz6jrFO40je9/JkSQWpG1SKl3lYih4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH+baACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOnw/8CiSQpKnMrAhQAd+HkxmBZLC6BM6B2iLgsjYdSNYQnKTIaRZJ\r\nn5uy9R44SA8hF9Ep+vs4Xvg8UDFi0PqpiAdATHXOR7MkPMTy1ac1aOu1f8c9\r\nD4/Q/bNfEWVacztFA0cVab9nmSgKwWl45PU7LQvhQZhTUIlb1asPHzkB2/eY\r\n7/ufGD4PESComaxWuqnrOufbOk4KRmFpp8qcgZAmvluZv9QKBZ+8hEvt0cu2\r\n159iNHjeGm7GdQPWSV8LXxD4RrgCN3EdEwVmohuY4WdT44G5EetkJmHoCro0\r\nDkrZrpxA5md7OKVa2Yh0eQDPRJT4EfHp2XwJKE8Z766f93cTjKK2jR0DT30Q\r\nXwwE0GZNENHK2dJjEfoOe0K8l2/K1XhOcSeqZEgjVtX8z+/DFdLIZ0V6gLeY\r\nx5ozlV0miNi57Ouo7poq00moPe8XnG5qH5hnqf/RUaUkhd3Cuvc8WI9NPDFf\r\nKqQ1bs1N2PAtQK0NraZccEsYVUvaw6myBhcISZhMc9pK04VPlLx8+HDjPXAB\r\nZphZkO0SCo1Z/2lyw2b0LG2Ozh4QzA3LSjv9yNCx5NyMyukBBiYv+z6qhdLF\r\nYmPEk0IwIyWu++S2ZiDGZS+T8U3x4jerfKlq1fMX4HxZhVGAV0oB38z12dCs\r\nRqK5783+qbg7nrpfBFKZeJYXHefMWSq2a7Y=\r\n=T7Th\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^14.1.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1663035050167_1663035098133_0.5674261113217456","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1663035052283":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1663035052283","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1663035052283","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"21a67f07668c160d26b896d8d0599efc7b3bbcc3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1663035052283.tgz","fileCount":7,"integrity":"sha512-h38ZpDxQcOiDGil863eud3pcKtyHkk+j6exVYYceuR6gVz+FSbUWDug1mdqVBBMa5jJdSkMKd/YJx+tPQTsxBg==","signatures":[{"sig":"MEUCIQDZ7fu7pcHJmSNU6mCGtzFLd6b9+atr1Yq8kbk0FBV7uwIgZ2f7ruKdfzI4TfxRIJfVMOEUSFuIC2pE0IZ5P8gLwWY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH+bjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp04xAAhPHwg0k3aiRWx5AC7ha2xFT5Gtb6yX8iOBEqpJsUk8IqIxBu\r\nBzm7FtylXcoB5Gh8cU6co6nANsiVVpWwsRjB9JzjrLCnIkw45BDmatbg5Lbn\r\nQhuCNqJNrCO+trWUaa59xB0DbP8o7tLQ1zcRj7pHCKHbMMiQ68BMpicYGsaS\r\ngzrEhmSpyF+R00GLYQfalgF4WLb6NsbnlmFbA61UNYDnC1lqHuTKct9JhEfS\r\npJeXEMfng+TNJJkqHYv4EFbESJ0aTEtbfCAKnsWI1HyZ5226Hoq+/EmK6Mau\r\nHPivOT0+46aiBC+1HLkHxxL3/Mq/zzNsZLW6SBRL8ydK0SHoWVTEruuT/tsg\r\nfMdj6Jxn8IY89go7zrcRdypmLycOcEvj3uwfK/vpecMmKAHwxpg90CnyFCbI\r\nDNHCEX5nJ2yk9QtnRib/FJrKrxMxMXHKmUyreFOdmNfCXArAqFy6pS12BaXm\r\nmHwRSEk5xhnxDQ7fPm6WGdZXMyAfZBEuxpKad/1i3jBteIaHLpRos39di6ws\r\n027MY1mupTWAhps79GjF9MzVDBFoCTpLQpuaLHAgDDpgqHbZzszx5UpWkZQl\r\nVeMwHXLZNOdI44MqsN01HqgPjHoKx7DkMRqchjzp3hgthNK1wfeAYyLFXtYT\r\n3n7pHHNKs29EJUYKG6kAKDFo9uVzGGxp+Hw=\r\n=bHJn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^14.1.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1663035052283_1663035107448_0.5202618207655783","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1663553463055":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1663553463055","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1663553463055","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5578141fa2ddfdbb8151c79f38a207d36dad8928","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1663553463055.tgz","fileCount":7,"integrity":"sha512-r8CKxOuoBtbt7UljecM2V15nIEJcrcBYcGqFfrlU/zwBBHUlDvPbjt8mD5xltphwlmhr9uR7fLaT7+6SqwPm1A==","signatures":[{"sig":"MEYCIQDAylBjbEmH7DEsRSx3btdThVEHEsy2RiQN8/kGslAEOQIhALj9Abagliwr7kK+ngE5UIY0+XFzrD0Nc5cC+WSsLIqZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ8/yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpekA/+Oo+zQg37lRsHZ/tYbzHNB8fO3aTNnhR5Q09UvHt4OpLOgpOw\r\nNXOCg9jKzysuJgy+G7a7l+gWiNXBkuiGYZ7PfUquCmv5rFoiAbP+K2dSq9fU\r\n7p5dV1fRKOqdeiAsnr8BfJZTjk4IUQF0cAhmCtoPQ1GQEs/SdzAnuE+cYgr1\r\n0wpfr3XU5rNgwgF9PtOxO2u6r0kMYs5lH2grCUkUkv/apqfvJDDfIG4PDL86\r\n05ZaYjD8Zelp8Oos822Ot5XgWtfs3e1QiX9I8Bzu0AP1S0UHzYUg9YYj9Eri\r\nARi1m1Ch9GM7I6ZRB+/JI7lgWA+s6Jpiy8VAI0+KR+U0vDx91n1u3TLeby4a\r\nfDbrDeNbNvWncHdYJwqZLfKQ2IY777jIguvoUpoGTFV8TEuQd/uffhegr/61\r\nl9IRTzekRgSzN+W3w5FCs2WgVPqZztG1Yq4FR2iL3gDQZdS/lgNb9Tt4ki5v\r\n4P5olQu0pi/qtq/7ffN5oOcea7M680eIYa/EKMb0PZQ0mFOe5PG0Wx8EUDsi\r\nqCska0WCbOWX942InG1dmtfyokTiqnChgTeArb5r3Jo4Qos77l7L7ODrNX9t\r\nHHwfKUKYBZ3gocDO8ivb6pMvCR8hHRCr9TcppzshoAUZXKyblw5qXBrPlg7m\r\nnjxpOzolcixCpnloJG6/qN6NjOv+SYl/uJA=\r\n=3afT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.15","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1663553463055_1663553522606_0.7446088919251408","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1664158141235":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1664158141235","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1664158141235","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"04772198ecf78dfd791cd9070834753fc60e4854","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1664158141235.tgz","fileCount":7,"integrity":"sha512-YgQfd2mjqNooZr4AOWPB7lyV/wN9mIN/YjQGGfTCqEeYrhs+3+teuKYn3kTAf8k9wwNGQfOeI/krvyXciMbdOg==","signatures":[{"sig":"MEUCIQCbCZGbOBsBolwaGTfRK56WaXhxsB/x62Pe0yNZ2WeHIgIgctcRmcgXIzCpYNHhdoCbfJHbo5RjhguZZSzJFpyzwQA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMQntACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2LA/9HXlreVngLtZA+arkg74m6kXLf8Hi/1IzEaXT9yXfIheg5eGp\r\nNuZkMvMOyKonqTkaS26GYiEdNLwFpIG8Ew3uJgn+/KNppTz/CVRuVg87LhVh\r\nWyAYlyOgVOUpYY4HOwFfDLFgsFOyyWsBx2D+MdS/mIpynHw5SsCraqLsdGoQ\r\n2nRzw75cyXboilGKG/vfsy1to+uFIw2tspnQ4nA+0R6oqsKx/HG54x6eEs4y\r\nyldP37poRIbJFKOGja07XZjCX5+J65w/o+WfrjrHhPwmhGHy+O3+hHtimDnt\r\nWO+hjTKoPxtj2fX4z9KiMZaWKTPTJjlYhzH9uMgS71mPlACUjB66W2vGSZzd\r\nFdBwVWYYVDLhax4SZ7zakXgN1YKASC0tA6fdJu3B5Qcl5oniGpz7VitGOj2L\r\nHsVhgdnXaSpDMaPqnzaRO1dilLZMlro/mhIFOEmbi2EQDe8T1HJWUc9qnUBi\r\nIoyJLBZpzhB6BNh5ZLO8lK7usye9AHNKzRz862qfr6xgbdWluvqdKncAdNaz\r\nxussWzsYcIiEboy6ueL/acdj5E7BnryParnAkoHCkLRL6ajxZmVIMNEI3xCR\r\n6B8fton28bW9bkonCCZAbwNbFy5IkQsKSjgUWKTDZ7JA1FgT3wpAd9+zgoPD\r\nSA8nNwIJF04fVp4oHa87niAwVpBX3euV02k=\r\n=M3Dw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.24.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1664158141235_1664158189178_0.15254826947123168","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1664158139643":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1664158139643","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1664158139643","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6a4a7bb1600a5f299fd31c0f9c5035c651a8286a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1664158139643.tgz","fileCount":7,"integrity":"sha512-pAvLDWKLYVlM7V+67xyb12swvgp8XAdiQYSYPmvziltbJtcU6WI1zMKWQhjzRVm5DJCdy3W6OJEzvpB/ZMqhnw==","signatures":[{"sig":"MEQCIFrSvOhP0fQPdNqYA9O2t+YspIpIMd3d3nsV/apLxtciAiATtQpYPpK92a4N6j/wauJ4k+srLCbv9vKMiFgJU58L2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMQn3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnyA//RNMXkWyuTEoJU8+OELFoJ0w5j8jfTZzVnaNm8mpQKjmNX0ym\r\n3TRG/lYhy7fHWGF9vXfzxOMzZktO/d6HGRNdB6ydbM4qK1I9upqa1XPdPRz4\r\nPfmNAiqNyG6uytaNbx2hsky6ngsFtvhz/hOp0Mnguz4hEpwDfitteCwJ3h6f\r\nyXN4q82o7te4B0muZWT15cM2V4D4FxG9C99eNg8p0aB18hCkDkHHM5+qlDbf\r\nPH4j3vLvMS9tiONijKsoZuMVSlPPDWvJelV4s3JNnVTEJQI7v1jYiC86fue+\r\n9fJul+qmdRFmub1K70dXIr3AcbK8ng0TRpFsTbyIj+iOX0rbmZmqZZvdsZZH\r\n6yk5I6FbxS4TWPK98DN4Pa9HG6AOyjlprGiKU0RY9xHsDU2/HSXXG6Am2wCo\r\ngAfwxowztD8NZGBi8xXegf1oZ5v2hl94EijTwPZESuHUJa/sRw6kMPeuE8I0\r\nkMhxiVZYZdxVi6L7w2kvlKw63hwZaY88TbiV6WmbZE6MZ6Y8q/QLYKC8sX1f\r\ntzQGW48JXpG+FkOxfM44XLKWvUfjI0OB1C389Op1BqVviH0xmUMpsAJELFxS\r\nWvtbZHew0baLYK1h4DX30lENnekMQCVvk0DNcOupkovuT0x7wEfwdAuu867y\r\nE6HhVOvqbOYoarVm1NQjldQk9hFXpc/URi4=\r\n=YAn6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.0","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.24.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1664158139643_1664158199138_0.0064775914578592","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1665367698571":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1665367698571","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1665367698571","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"33ec3735c39b83f50431db8419edd69a98a7bd08","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1665367698571.tgz","fileCount":7,"integrity":"sha512-jsAOpeIfVryXIcJFwBtNkw18ExD+XQs47TspOb0HYtZlsJ96m57UBldGfsyM/fc0U5oAHQzGqkFIbE9zIxRVwA==","signatures":[{"sig":"MEYCIQCR3aWqYszcJEE9RoeW3Sg51vLMPcE5FJIxhaHqWAgaRwIhAPQbgMrZhNXa43YFM/jejkmPCFZxiORACAJOdCY6kq5E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ37HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriQg//aWsJwnGlnDl3teorBb5Nb5Hm26kHxUweknrBVMty+DoK3klR\r\nT8Af+GlgqlWFkqQZjlrwVvIJQqpZxqfjuheZXYbixNF19v98tUbs8IHNvEec\r\nicK2lm6QpwWxT3ddNWjcamzlwc+PpEAxrAeQGbGGu+PLOvFxBvRi2pXj/nw5\r\nkkLu28+NNVy+KcpNaqY59D6OlV2Sb5uA+LWuk7c/AKBlh+oOwJWRr7c2gy0u\r\nKpxS6pfUgENnwXj1+JBcnVvrHuDr5xcPa8ag+MGUTOsZkhIAf80+SJ9cAkM/\r\nOQZhKGFjXR5wBYEp7rM7nqL3AuSuQNpO+HYCs+CS/mN8Osshzn3SMX3GONcd\r\nRGgxIL2v2TFwMaf5ivAp8u33I3CE/bqivaHynxJQBMmMnE4wzbNqs3NtdxGk\r\nedvkCDjBwfOV2ICwYeC4tp47F281xv2TD0lVHjSCY5Tz0Iz+TNxC+u3l7z6N\r\nLn1sNqPhFqnaF1SMYs3+toRa44hVsyl4F0a3d4GmPRCvPEFHkBkR4ZWVwdPY\r\n9fwwWib3fYgzIoTrs4d19nGn7qYByqJH1z04CRufq1XQyCoJTo3gz5u77ads\r\nNElm/u//llQuWkAQ7lM7TLiGSiefXU/LuKCPBxMqELZCIDre59G3v7BY8aij\r\nx1EEqXLfk7gSrQwB3x11KR6J6ARzolHBI+Q=\r\n=Awgl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.25.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1665367698571_1665367751412_0.2524000750129689","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1665367705610":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1665367705610","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1665367705610","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"21c63a155654dbde17e0756643d632c4d32f0f32","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1665367705610.tgz","fileCount":7,"integrity":"sha512-bYox25Ybs9mETmZk4v5jojSNhFX4XJIz4CTwxOOUNo6M0cWRNzRsTcdOFopAsc0VeNouKD+WWO6cdy9JRt1W3g==","signatures":[{"sig":"MEUCIC3OQtgiszgK57KX0YM2sSwgn3r4b2IoXWZZ0CUMesZNAiEA9x3sxXGg5gwAnNbQGIHmGoUdEyiJDvtgc8jLM78fgMY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ37QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokbQ//XGemOKNzu4o/oZSilnt3AfhVFzLQ4ajtnV19ZMhDTHIKjbfr\r\nfMty3UF2WDC8bK0q6A02O5EtZgOBbsgP6E3xqNwPBOt4x5W0DEhG6YBar3HL\r\nSjZta5eys3tLfEDQJd3VcSIue3jL7RQiQcv87G/a395TY36YMfLLGqngGvxR\r\nHbhOObUBRrrc4F2257qLVUoVpeyXRzC8WClCqaYwfP3WPcBZeU8vtbCK8Xyx\r\nXoxDl1vLZlRgDhhVgEjVezZkJlYNyIsSZYkMLo3pyVWH+nvqM1tkd4vP1TA/\r\n0iFHp865YOg7Vka1lErVjoobslCkCxUn+kaTF4yGChKKWBtkPzvX8DN14JLJ\r\nnTtxUSS0QDsT6iODlktooivp4NdytciuWr4QlQTIWL572bOMY6vzLg6TIYc4\r\n7SSJuCMoPylqCVse/h3FWdoK5BPzQc1HhB1UJIKz/LadBKwib/zYGjGZL1IQ\r\n5SOk4tOqz2ffGVEr4uHH6Aaw7Ja/5q8ZuDDWFUZX8aHuORfWZ1FNSnGR9fp9\r\naf8C/4dkf9J1LPyT885cEfdvs9bUB2Vu5/mu6tw9AAL3BfE3zZ9/80O0u+qB\r\nbQeolFgWL8YLS5ZIiNQGlxBvzknkNwY7I8IMFY1dR46PEh74hSdTXWVZ/DpK\r\noxw8LAS71uQ3TVHv9BUivS7zUVgsSRuc9wE=\r\n=/1uO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.25.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1665367705610_1665367759749_0.632381787840713","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1665453992328":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1665453992328","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1665453992328","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d4e9cea58316ebc9f3331bb38defd971f3d32ee3","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1665453992328.tgz","fileCount":7,"integrity":"sha512-WSkm9I6jRcNQ9VAVX8+GFM1iKzeXw0erZEByHurM/Np7h9tRG137PY5Ngd0ZeCdThD89dAc6Ob5ACdp3VitUeQ==","signatures":[{"sig":"MEQCICiOahqsIwM7HPQW6XvbXqirB8qxJ4LMm/9YZ+9pYPh3AiAd7wwLxIXJqVT0VA4s6jEAz84epILyuFa+6+AAvuJpFw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRM/jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrE7g//U3BO85jTO8SFLtEMYOvxz3ZDiFS3ilRJSIL3Cg7ufloWmnGe\r\nHwbDqSgb1TeM8/uVBkoevYfOnpmCphBCvuk13KLUPQ3yzUze3ANMMTBzHM/D\r\nJOOd0Y8+RnwrizD1mt6XGI4jh5v9M9yJ8LBZxOQldp05Ef4K+IbFp2JdqNUx\r\nG+BlSrQS0/dECG5ZoBkGV5Bp7jtaZzDmyvMDCAwQucQQWLmvCKk6N6uqbFgS\r\ny5cJv2sQrYkB60W+IjVjsyTRLgvL+vyiRB18PI0l3dFhCJg3KOlSeBZutUxr\r\nm10cpwQI9JSXOR0g0G1qW52P6q4/5BldfhBcVyiUqDtt2ouZyxGJ41HiUXTm\r\nKeIaT/Zjpb+rlah65+x3eZFoRiFERTJhjo+/saaO2GXzS5CV02vStCok7dJU\r\n+6ZPj/a4ln1A6990tzQxGVNNCTKzRw46xYrn1CDjwui6pim7trwUuEZxRkWf\r\n/CmMV50r+3bTD5kg8U5gl373XMF/QoTX/MX0o/vjJd/NNsDxqVNE06laeGFz\r\nvAbtx/Jli1YFcrzAnGWzrMzifXy+BGaDxaWzFOQKxYBPr3Y3aNPJ9TDfYIwT\r\nVl0NOo5NuYvEAyZLbhK+t5bMzVCq8wrfSR+u5XGKi+jPjbI42SLvO2QAT0Ut\r\nv1sCf40X1Kf6EpQ7NwWayRTBnNLcQ7AZWvM=\r\n=P9Mo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.16","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1665453992328_1665454051698_0.01069521008918084","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1665453997031":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1665453997031","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1665453997031","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"85d9903387fe46581bea059129358d0e1ac44709","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1665453997031.tgz","fileCount":7,"integrity":"sha512-mCAo66fT+wPjt4T1lmZTFbRnDmRKVXl73uFhm/RGx7KMEUiJIqoVKVUL6fQr1tZ0j7UmPJK/AhAJd+cClzaTkw==","signatures":[{"sig":"MEUCIHFo9nsaGl9KNdDoK+eY4qzfuuBoQi9kqun5cwp7KnxhAiEA0xKJBg44GB5ds8pdKLJRT1YYmsAIt9G+Pu3TTozQing=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRM/oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEog/+P9MExnP+hWk62ZVM/2ub+2q4saHw8LULixMurOLma98IROnW\r\n3mR/GFZo/Iw1g/P80W/r0uEvlLg6I6XikJCkEi88bPaJlDTteRp4dPgwpxUl\r\nVGD+OP7/ZqYgOCn9g09Yucji8lgYdRdO9DIz1BesimY50ydHwWYFqP1YiuW1\r\nysRau3yQRb7vheuljnJ9pc7R3TdBUbCcGjO59fyHsWJ0V4ZIGTQmJEafNNER\r\nMy6fpbWrvRhTJkdyghK2aWrsATY545yaDsBO3B0SwvVQds3u0pM7InKX6Fsa\r\n5I9pky/Ylx6nxxsy59TMqnjvTEegs7Tvf9xjL7RiYbTX4Xj5jmRWhQaxZLgU\r\nsN6JDB+kJ/RnhI/O7p1WKRyzX5LQi+9x9UVueAR/rBzxNXAO8c02WIjgHz65\r\n+P0JB2FuftUwzEkBBpG/7zBxPLUm+TEGxWVQO4Ry1wWh/ORdspcCGy64J8Sw\r\nSazFZeERlPHRsm2pYdZRObNeL9bu6GH+Oz7kpUa3TDc77xZDu5yfmUuuvRow\r\nLMht6cMqMt2b0pGX+4VjpyWCNzdFQo7zhoyHiggYG3UJbp2YrKIpcHtIqI2X\r\nO+F9jgmoOgmbCBVJxlUAsVM37o7TAwPtdFiE7RkGqRFeiiIrko1tEfYgqxbv\r\nXDoGeoySbUK27rWG2zSObIbZ85radcOAses=\r\n=3JA9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.16","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1665453997031_1665454056624_0.18870596106502302","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1665454074674":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1665454074674","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1665454074674","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e7e18c86f572068660d63bdad5930fc769638405","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1665454074674.tgz","fileCount":7,"integrity":"sha512-qr6DhMCeYmxUPWklne3lp8r+obJaLw+1xsonBGGwQD2ZHO3IH5xl3PP+xo9bbNQjH9gmHePzQEvitFYT8NF+lg==","signatures":[{"sig":"MEUCIQC8BvyuK2GizW9wR+zm0wPD3sjpHrkoZPpZaPBe4IWTUwIgXUr42I4bMfIXKbjhhkQAmFE2NQhjUQhlRh9WS7FuMes=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRNA4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+NxAAkKrNSo7HhwnjAZDs6pKzq9K89LfNp52Qtu1EH5f4LTd37oNG\r\nC92Y0t4ds5BKVVP5mh/vDr3vwyt0MtVIHG6oE4N3fMFKXUl3HjSaiemkdi5C\r\n5++lEsp0xgi5u075bfH89cF7WWxkDFnQJvq7xOeoHw+hCI+Xo41l92YMlr8b\r\nBvWbXwPOu6Dw3vgst//UhIkd63F6rvPVfQqlOr50+oLSCBFAcSMciMbnVPQo\r\nRAIORO/UhjuIgy/uMwlGrPBISlVxVANhpIycE5uswv32MoTwkkxPFn3ngQrg\r\nwE2duoGWEn12WHwc7Gfyi/l5yPBQ5dHnIqTK9yOgy+j1hj7/YIC9G5Gwj0YU\r\nOBTkGuMF2jsM2EX1gEPI4gxNOU8g8NtVd5R6qjbDLm4mUI2+7L10YiFv3N6t\r\n7U5/46euKloNKmA+ErSrb3obB8IC25yQszneDJ3c0+iHqSgLC/dJDaiBp8jh\r\nFOhLYTRHVeb+ZFe1MK7t9dnE+K0R6nQGXUwnhyPW0os0pwk+YEmYEf5ENro4\r\nczcnJ/vihDcQ/Wovs1PmLJrjTjXvns+dau3536rvoi23nB2d78fUkOZsHHID\r\n3PF9wvakqQwxCsnwfpdfQ5M+uT5i3gcdC7X/9PYdq7oAh8RGLgPfkGAJYvPN\r\nCBjw55QZN3xXXIAJtQfxm0o4bpu1wclsOB8=\r\n=SIYT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^15.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1665454074674_1665454136070_0.2903119294402845","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1665454082314":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1665454082314","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1665454082314","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"cb03834e698d0097ceab4a4659b1f181364096cf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1665454082314.tgz","fileCount":7,"integrity":"sha512-cIbFLEHRCFvDpA3le1CPmvkOMbMxpdIwC/xPGNP+suLvG8aI5zvHvLzfMdty30FNyA7UIS2OrFjmV1FrW4fSkA==","signatures":[{"sig":"MEQCICypj0kbxNg11zD3Sn5nqx16skrXCdxMalG2shJdC55oAiANoN5/7Quk8PnVoyE/ErkwGiFl4dyAmqHEQ1o8Ff2TTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRNBLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2Ig//fArIx2VGl1MYphawPPJR7P2H+V8is8r3v448eIDd6p8+n5rG\r\n4FEq8J1vGkkJhat1XqIFI3m5Sv+5fKcYANF+5jiq+M+tj372OBCeOj6yIutn\r\nZYdzxt7/0mhBIdQbkDU0EK72i8poMg7h0sxKpYAlzwzEE3Ba2sGkzHkzUTwP\r\nSf+qf43oi/OO+MVOPzT2CZiP66kw9RX6azUr3uyK8HjXt2Ik85VQYKrAQrMj\r\ndQ46k/0R/kZLd9RtuQ5VSlg5sXDElz0sNWyuGBgVv+fV17f+MQiz9vI1uNhQ\r\naRNw3YbVfmUj9RNaLfkD0qqOwKedB667zoiEh5iRsJg2SWU97N2eT/WSYMGR\r\nMGsOUx2TO+YihIHtQ8wmXulEuUoxXB3gRMA7GmGcvH1kYSg+S0qU7ci1DwOY\r\nH5YHYwMgvLtiTaOvKvi7qbLF5XkjDHRm0Itbymxbi78+RiIACMcCJZVjow2p\r\n5KbALyVuOy+jqsZWeudHcNBfEkXYygCS70f0rz5m8imLBfuqA5D7zAqWwHQN\r\nKHFMIS/WKma1cONP9CouLXWyCu2/m6A1HTJBHZHhqilva6y0pMe8UdpBe/CL\r\nepO0nIWBM5JEGo/zMLQfs4LAmJtGE7lhzoaDODSQMWzzvl4GDlweT7ZsEP5k\r\na95cC/9R83Rj0GndsPcPa69TEWpqM8Gwc0s=\r\n=8gY4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^15.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1665454082314_1665454155737_0.09384403995154122","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1666145352392":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1666145352392","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1666145352392","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8a7390304c57aadf3df8e815726b4a0af5ab2804","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1666145352392.tgz","fileCount":7,"integrity":"sha512-O3S0lvfBrB0rb/zrIx9agFXn8eB/IGcMHNaUoXuvzlgTF+lQbobVnGo60qTkODn8sTeq34ShAc6kvPTiCko5Fg==","signatures":[{"sig":"MEYCIQCFJ4ChyiQ/WUNVUyeyZNFC7jjI2JQSesOZADI2BtwDUQIhAP2wwrhCoj9w6SVJuoJmOuBYxBoQLil3fLR8NxqQ3qEM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjT1xzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpE+hAAmu5j3thaR7Ylh5z8wkPQPK3JKj7bODijkNY4tJ7ohbI0F9Ha\r\n7NaMcTaOgp9v7EkYmsYg18ljGJFQyU57KX8tGyNY/ituIUYl/3+4KBdhYJWg\r\nc49dHBxBrhWwZHuEjTxviABPI037Q9DkY4BFVeEiDHFks5y83xGSOKJODoRJ\r\nA5kzfu39RDqd2dtP3M1De/uBKx+bPXtXm1r5eSY4LDYIcRUcRVWAO2OE9i2f\r\n3LRZA2iTWoTtxiHL2mMJ6IL1IRdKhn/iq/LKwALDi0JJiR5u8Xn0PxQpCIuC\r\n3Ci/GKkkLx1M1qqhW1vejf8W+jw1YTQMFCnDEpisT2hyNqbGsp2lr34u6pjJ\r\nHSiR37Bv5KhpDe8NkzLcnYQuG2eNFSzd6nQu8YCAcWJhZ+9UcEnCzaJAngCP\r\nqKPMyyBlkGeUA6+Iz/BWLJZB0X/FoOIjgPHtwH3RXXdHs/RWLUfCrBeeGpS8\r\nIpBjncWM0o3+sTLZ8Fk25AgyRc+Cx1w8gTkVBdFl4SxJB06Ut8a1Gcxj8Rvy\r\nE2nTnNi7eT7Uqpmt1cnM6yyb9kf92VXowsO27TPMnHcejVevSI8bhIWZqF6v\r\n4/hdsd4ruEUjMo2C7nzeAluzRd4ZDONpCQUucY1nizmHcY/q5msjUjt9fc2w\r\nCU/PukUIS5FWxWXnZ0gYtHC+4vbenVZP6Q4=\r\n=1Tzl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.17","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1666145352392_1666145395810_0.6503784996309292","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1666577128276":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1666577128276","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1666577128276","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"f74d45a60a1a0dfb5e468082334be32c0dca1977","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1666577128276.tgz","fileCount":7,"integrity":"sha512-JaiX1Y5aQqqHLaWK1G8r+mpluP1B0dvdN0KCYKiM7E7ljdzLRtsvq1WzHC/1Wk1AF6RvmuqrbMTKLQITTrwqUw==","signatures":[{"sig":"MEUCIQCe4QI0c8+A8RwBFdC0UNSkrTttivp00ZUzdSRwR9RSSgIgMiRV1fooZFbaLaQJEgrynvWFo9JaNdOvoM+E0zcFL8c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVfMTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqTw/+KcA4J4UZ7gmfxRH/6ra5CdiAg15WjXN3OlGk/B+QDdKlbB5b\r\nDUBKcYcfuD9uXjvNBq+h6TB2rnFMbwdc+UiOEIn4rN39AgZZOBSi4bus13+p\r\nTrIcuKGAZGvc3DnajOC9dFcUmXfrb+JxsxMTSvL0AMCuzGcojOefuPjCYzDM\r\ni+yOYBG93krw2y2Uv2HYhPd+aNb9hA6HYxKYsXqnIsGVykRso9kui1+xnX8p\r\nuHJEjdc6GK1/2OdkcT5SyrlTb+i081SV/ivR1mh9O3b5BztU0RwjyCNvgQDs\r\nAvDFz/Ozmg2GMZqYzymtWRCUuKXGuwZXRiyHwLOXXBcRYhMB1r/8j0O8V6IL\r\nu7L8zEueKih6902mVUOVKI0bxKZfO6NgxHBP17KoZHc/sqwZTZtpZ9+PcF7W\r\nBxoi3o5eZodfkaVZ4He43KcdlkUKxIWrryltogvleUnUbCjT2oghRl2BJCL7\r\nZahlKJekatcwGz8NbNsOj/W3GdU/ohgjhIzUi7QfuEf20s1J1M5rST0HUo1x\r\nWb9roi18sTRSDUzyNNJULw4EpclO+IpzmOOgqNvaDoyE0BlcOKwf9PcIr0+7\r\n7Z4J0EIHj9betilCA1A7eMJjh5/TG072yUPZVCvKxzO+YXUjbhACxPTxsM2R\r\nqSC5MrxEigDcJMtjJQQ3qJ/lRsl6JUceSzs=\r\n=UnLk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.18","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1666577128276_1666577171477_0.8919023218602786","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1666577126807":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1666577126807","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1666577126807","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"2f9267fec597ae14ff752e43eb80f6cfe86ef7d8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1666577126807.tgz","fileCount":7,"integrity":"sha512-1zqQGvM/uS78lgxxbwgeTQCtrG3qmcjPc/DqHS0AWVBaOHNXn1Qpbn4dhjAZCOa6z26kYa8Xe7RJPhpfENVshQ==","signatures":[{"sig":"MEUCIGIe5OvGkSJsz9b9Ke8sHBJRzl14wsJkHTLT4WViHWUgAiEAqeXq/OjSQhwaDBmd33zC0yZEmWUIGdH7SrSTfL00b/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVfMfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmom+g//Ti+OX3gKa/s8kZQgoUTQhogwaty4xIVKMc4aZO6iuz2lAuln\r\nLeVfHOg6rIl/81eys9OJUShtoHG1K3efrd0KA1H6ySBbynn7Tuw+5Vh5jZ7U\r\nK2a2y8EOeLH6DN2y0NEJFkNfFbnQd0mB+8wiwAk3lBte315hKiaCt0f4ntnd\r\nNdwkLwKdeafDzywHXqQM00L1WrF6hYuIqnhD+xUwbg7A0Wb/ouTDvBJ79hn9\r\nDMUL8wXsH7hvNYFFQX/yNTEPPtByIw8rOg6S8ehTWV+S2QYxG5QAll6D21HE\r\nNQ7DnnFylqUY236ul0WPguSp8eehL+CNufbdWznL+7VlrHYBuL70BMiWCkCv\r\n5+rF8atlxE/SZbRGimEcQLPU0KR01TPLrixkX6n/pavUpJ1CfbGUkqnl7Nu+\r\nphdUeyj4YeGJiWnzHcP/dZny7JVBL4TEmcFG6Qx44tjYqRRkRk+6EZ+xJvY0\r\nSxR9/8CJIyDKSJ5OmdXU1Ps0yWF2C4trO/t+ZpF4GRPsIceBNVAk115lS5fS\r\npjHpQrDWwSW1tGWYpH93g4xvge4pFnB+wOcpm13gPhhDp04qzGnrUe1+K0h/\r\n6RWvhvzDcmLKEVhfRZZhq4lDAx03pOGvusQBdfXhbqZtknvPh7zbvjX+xpND\r\na+X0rqlRZLmaSrs30HVABq5I4KHwk5toTN4=\r\n=m25g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.18","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1666577126807_1666577183472_0.5234114996329982","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1666577206572":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1666577206572","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1666577206572","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"969563873da73972c62c952f751457f0aa1bc717","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1666577206572.tgz","fileCount":7,"integrity":"sha512-B7/4C4tlXX7OuKb6H3JyPScrk6iFnj1P/SSmvxOFKz+o7Gf/KiEV3vRivTTMJYT8DKctAHiPSO3vM/wJ9SYSMw==","signatures":[{"sig":"MEUCIFXgO8ZzeLshdQnrEdHQNFgZe0H+KLES3VdSmwBFaSUDAiEAnFTEVOCmu28+QwPwMoXD0t398znSqGUsZLQI7TgAUbs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVfNrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQ6RAAj5zBiSLcMhIX2DmC8nNwFPO7/+d5sP/JePmevnP+B5XWKUcD\r\nhZx/XSU6I+5mPfuuwOrL2gyCCekqv0hjrFtaHbX3kbkrWtOpDkMXDljEzteL\r\n/62IR9pXWCaLJj0vR3GMjOoBOHVNS7EKhDhrAK8Iw8tQR3PODMqtwUvJ7jPc\r\n2KQACDhdD8nrStxjWypwgt7VBBMWPCTLSfuX26yfnOK+z95buFFkhkzqWEVH\r\n+sWE7G3zVhx1aq3LYr8PAvZkZrzOLMonFJhujZoOsow0HntoT2hDdCU3pwcL\r\nQo9y2KCt/LCeE571ic+RUTRI8jbQgKdehJahkCe/zGGTiPl7z4trrq/ahNT/\r\nQGSroJiPAlFYL74KWTK5iqL4Y3X6mg5XZld/+VzDxoUVeXFMvep6pVkSVC6V\r\nhgzl39iuKQQLXe60z4sv73K/QOZugVQrbIHFTkU+eadkNDqCvBOHcUwSe1gg\r\npoOEHXGztcY0iuhIe73QCC0eAW3UblaLnbav7Qv2wMnIYqeSL+qj04w6g6iE\r\nGBmDIbDIM2wjsOm1bqcEooY6DYVyOJKrWrf2jvXhKr64cknTsiC7xd9JQ4Zl\r\nadVo4BBqGyhIy2dNafVekgMJE+bMz/KlMkTn4aDJB4qshTOZWUVjbYSxmAWV\r\n+mC0LtX+b2wGV7CVeGNCCts+4AarqHA8FmA=\r\n=HeSC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.26.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1666577206572_1666577259254_0.33486881779325794","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1666577249838":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1666577249838","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1666577249838","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fe47c49bb4112e9a601eaa33eb72d2e9fba22806","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1666577249838.tgz","fileCount":7,"integrity":"sha512-DqOrTXqa6gOdWfyqfptpgcx6Qo7FpKhOM4WbuGqYPuapVsi22EjLhUQDmBPu+fQFOZSmx1Yq+QTgBX4sBy0KIQ==","signatures":[{"sig":"MEUCIQCTodOIdGReS/XjY9KOqo39YjGqL7JLhPgcRgrfa4UgCQIgBWsZ30pU0NewWWHMC33N5rJFZD+Do06O37jmHdP6gDs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVfORACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGuA//Tj38vb2rQ2+guXALPvUDzjIgOH2dv/KwrY/qwlwUnvYQf9la\r\nQQgXz5WcSKhhjQ0iptdQrXIGBS65X266dPm7DYFUvNmpF3L4sr2rMZj+P3EF\r\ntcYvqi56uvjEDYKv/5lh4PLnilEvR2ZRgdJfSicLacUF2rH98SfYZW3cF5x6\r\nEM87o6s4mtj1oVtBDI20HowyAaCapYi+PGec9hzGj/So+rnZxixajM6N452J\r\n4DC7GwBWQoicSgy94PlombSwy40aqXUMefCWpoKudVBZXe+iw6cV+4Rv3rYZ\r\nCzlzSht2kSO1pKnlpHFCosyFpXPHowl6fhIsDQif10SvA8ghcHtavGSeowqH\r\n8CdMUPQBG61kAEiGc1piuyNPKE9xX6k9+r/yal172ZctDUHJPgGm4xV6ICte\r\nkWgJn6WZsbGj7hp9/4D0QxVD9ZiLlRQpYV+LtwAt/ciWAEsioJPFDTomyBYX\r\nWaociXTXx4dWfOLcRJ1x3c8OKum9mn9e3m6fYEyS4zMllgjJ+QNgeYsUWN3E\r\nHTwv+ZTj8p0sD5tEqfT2vSygPU8Aamcv5r6HHChi0vlT/XEmLCzQgiJlUv+p\r\n2cA+JWriJryFwGxR2izkm02fcH98BM85L43PDdHfqRmOmfByWRdHqBrmzadx\r\nw/YfYcgqJz+wlTUcufpek4pdYHc6r2WvBC8=\r\n=fpRL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^15.0.1","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1666577249838_1666577297625_0.4000463201692781","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1666577251684":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1666577251684","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1666577251684","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"df4d3078bc5907a46304f45915bb6be48848dd71","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1666577251684.tgz","fileCount":7,"integrity":"sha512-VxOx+U0VM9kcEXdNa9M3YVk2QxHQ9CSS6ciblEEbE+eD6qBdywDW5xLNEGaR1KP+5irkKnaZGKDecA0lnHDxqg==","signatures":[{"sig":"MEQCIBFdB0qrwB46nc4gMpKYfCPYSMR9BakCsjdXEyu+HtVdAiAPTkvEuQjNjV5zSCd5YUvOf6yDwiboG5V/qoi2SbNCoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVfOfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp65BAAlbwJo1spSHOPfVyfSgfNbUYUpRzsonniCZXATgmMtPe5JUP4\r\nLWNB1eboS2JLOdzL+CSNMT+97jWfoMQ/rT9gT5xhYhZ0NoaYOoNFCmRVlS44\r\n5i6DDXhqKkcFCUgk4NK1V2bkOXvR25kq6Hm79Tbdz+zmklasRL83VYciKbYn\r\nCE9D2LefPE/NLZXCOvVU5RPXAd5W7TBQTDFXtcD5yiwYYECmyLVTyC1GTs1m\r\nB55tdLgKeuwqoDHWn3C80ZXaHFo2jr/SjJ7jrOHGEcMhCuFvX2tRXmYN/x2D\r\n0dB5yXQztBHR2rPKCZPB1ey0yVS7kErawi/IWbQ7gheidJiO4wZA4yyH+5bk\r\nm36bnBnTPdpGUtegnXkirwwmFVKeqVW5HkkbSD4AY7pcvtKXXCHB3gUCBYoz\r\nhjOS0+71QTSuhoUIGtcuPA8HWOTthCMSsOf/EZeCu1F+LdoRl4i2PaXB+8UE\r\nZ25dsOqZHSWJXRSVaMrBx7A8wXbqLL2SWB+8caPr9hvdlcprKEwRQxWWsfB0\r\nBBwzweX4IWPxRFPUceGsszCNDnfNyCoCRWChwn0FOJ306dxmNgxIpkP+YOcR\r\nMLBdS/h1CFj5M1u6CLodRPOpJK/toRHPCgh3FrxM2qFirdRtkMjM+Q4iIIv9\r\n7D+aobDz5dJK85VGLNBnFCuPc5P45mPWDOA=\r\n=msoR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^15.0.1","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1666577251684_1666577310749_0.18720527552673616","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1667181977006":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1667181977006","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1667181977006","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"71bbda7a395e39bc774468cd7661c9f00b71b454","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1667181977006.tgz","fileCount":7,"integrity":"sha512-tclnlW8yqanKr5ySvjvcwQzI15Oszhtn2g70lojvKUOpmr1ZULU3FDjHx/8MV+5zt7KewUjH7+OCcxvZk8qzAQ==","signatures":[{"sig":"MEQCIAaAtPsOPH/MsiZT/OL1miCTOB9tVI3fa0ftNBWBHhuBAiA7Oaic3qmWZtBgKPQ7dsZO0B8rLAMZMad1CNZph++ydw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXy3CACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEsBAAl9e7I4PyKh5xq5eaqO4lvwFWrQSxvZ6wGduCuR6MFcpnGQe5\r\nSDSpGqm1dKq7/JD4MIXMSJPMqfa7YaTGx63OBp1+NDMQMZq2MR9gmTZestFN\r\nMZgbEmVZ9VDhBMU3gAksKXv2435IKCk2Cr2s+6DvaZ596s9nbqI5Uv/ib4ck\r\nbHmx0HONtsGu5C7ZLYlstfnzgk8Mw5LOEou/ZHgkkt8IcL1ipXaPsWNAzAbr\r\nxaCnGzbhvHKlrQhrLTqAa/K/dDOYTy5mS4Ib4ZHQWDcIfzXwgfm9M/Y1awlO\r\nfEv+yNARW8E2dZUeUo18StIXY3Pg1v8lF6nH13r8QJC8oMVhliiqdwsvDxrX\r\nsYqPQS6viSoFg3pGgxVzvR4YDPvPoU4FOw+fy0VYl579mOPttD2WNTYV2Dnt\r\nzO4RzrYwWkRFXgNzsXt/mZUyO4dx+WGBv64LvIL4OelJckgeR3ZhU50vEh/A\r\nscHYBJZToyF+5FPO1NJ1Cco4JClANLXttEQyk3D7DFz/yVAwoqn72l1+45kY\r\n1jN7UdTK/O3Vt5uj2vcSbAw/JlO0qm+Ass6y83L+zsI8jRb/ntaGOgs9yHq5\r\nrasH6yEcObUVBM+RXPnRChmMp86FJfHd8LE8F6oTGEWdMdQTbvn323atAPhQ\r\n1ntF14js0BSMGGPRBivpYA2LKpnMeTkP8Qc=\r\n=mwUy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.19","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1667181977006_1667182018045_0.510331039602473","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1667181980182":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1667181980182","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1667181980182","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d5aee35e1597d741fec394d1bc07dc909725cacc","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1667181980182.tgz","fileCount":7,"integrity":"sha512-x3t3tq1bEW1PMZ+apYkQpdv8n9gsspVITicHkxrCHCh22xSROwsSDJIuXmFjYDprk/dJqtSregebSu1fZ9QYAQ==","signatures":[{"sig":"MEYCIQC5VrRHCY3NJS8tEPJa7AYiWaTrWm6h9slf22FDni20HQIhANhPDcNoV1dh7PNJuJlC4+egTFbQ3CAp5KKckkWvGxU4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXy3RACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgeA//RtFdG6MB42fILsDcc9AJtdOrKMOqzgzxhKQghQxl59H0RUyW\r\nYsmmRMo+LsfIA5YkCs0tgK9C4sR8igBqXenIHD3LcoXZ9ezt+TQynrhPsfYv\r\nslumeE5EbNvfHWkXs2kGniNuOvolhTc9NVHFXnv+o4HvHwvkITvYK9gRhge8\r\nF5JxnfDVJUsvog82ZsBEYlD+4+qVgPN/WIw9gR+ujamkTQ+BggsKW7M+toOh\r\nbTIuBDSfgqHjtGRhDNSAOyNw5KTJ7L/yQs9W67j9N0wFWqT3tmgpMM770pNV\r\npyz5O9sCWfk/RMiV+koMzU9Aonqm8giNbUct4m5yOU0w/NZt31r7OZu9nh2p\r\nPAfxcaNt7+zCvsz34Ji6SxfdGGUx2aeLvu/xJholv5qjiEOrDgrPNJXJp1kR\r\nT3cTH3C3Cd2LgoAHzdp+iqLGjgvujZv1HaJXaFpFedoiYXnTgZlVbT9UBbdH\r\nwCrvsDfSKXeHv6tfEKCeJEIibP9j4q1O9Ujvdb4wS5bJ5Cj2tI3YA7PmZdKn\r\nuDtgbwcalLZo0g1t/YuNXUIa3avdRcdYk70sgkNlK0H2V16fuw8dg0+bS2es\r\na2xwd9Xyk2dMPHP1Xw72yPOOKxFW40jSXezmuv/W26h+n9EmgnBW+B7UXOgx\r\nF7zqZzSZXC8pZwFSa0de3q6XTHLM/9rllUU=\r\n=sysL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.19","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1667181980182_1667182033742_0.43985816717523774","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1667268846841":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1667268846841","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1667268846841","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"132a6349a63426392e1287c5ac02b6631b02799e","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1667268846841.tgz","fileCount":7,"integrity":"sha512-Ar96TaMi02hpiSl65q9Z3UGOxrQ9IpTDjqjiy95Q/CC0yB8YXZmGQcuIklpP/5tg/RGJq5q/U+jsdsNCPKblIw==","signatures":[{"sig":"MEYCIQDuYJTc8ukXrR6KDjbHY81YdZu5jQNTcSakGoyqUV8jJgIhAOQYH37vCqONgWHN6cBINKOKoHGU+EJzF5FrCesN0cFU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYIEdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDpg//U+fk1okM0trTTtb2cog8KuXIDRiscF7gF9BlANbZal/L3Qzd\r\nsoe/QATxb1EA2qYIHawSOW3O3Y8yY/z5mjhywBo6DgVj0sSaQVhEwkKVxJwi\r\ny8DGlENyOBsOxm2kUzdcsLIyIbCq2Mc4n47gDyR32r/lQHMVZGxiaHqoGvq1\r\ncBI0vmPVWVULr1w6/nKYiH09tC0Vp8KkerGHJgHRpj1oGLzj4w2fdDfNyg11\r\nqje06qcoEKZzRSx5TEnyJagD079558++6QAVqyt2YRqOg/H8K310HIF8wUq+\r\nTkQd1upxKzoBHy4Tf+gVyf9PQ6VzUWawNicgyA4aCzQfRDq8rISa4P1JRRkg\r\nT1wN3QYstErDLO8ndT3i4/rxdME6J3tfD42fCSPcANGdZ4ibgrA9QLWNhISN\r\n05UpuWH4nYAdpuidt+XxnWZ8+BdKYPF6nc+BtvUB4sQv5x3DQD6r6UPsx43X\r\nf5XYxM4ZP6ETe3owmVUOfPC3JqfkN7iyFEcYNWfaB8bpgKVcWeXoICyr/9rr\r\nTnJtuSXww30oaNSJ6I7DhcNymLrxdUEssvD4Q2OS8+z2baPRZJZbVMS+RTV8\r\nSxquyS2bUF2aGKjTTwomB+QBVUpy2HXtU7V+l/yMLZ+6pLWkEBUOI+aohDZJ\r\n5bNp/IPJq/OB3xTBuUsDybcaAwZx0Rsz5FM=\r\n=gnuU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1667268846841_1667268892947_0.8761327440656004","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1667268847866":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1667268847866","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1667268847866","maintainers":[{"name":"akarst","email":"alexandre.karst@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"wandroll","email":"wandrille.verlut@gmail.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"be44455e06675d1559193402336fe87b0951c3e9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1667268847866.tgz","fileCount":7,"integrity":"sha512-14Dx8xKB/ZO9roCX5MHfSwPILOwPVbbPkWzT/RWgPj9TYd9nVgXkPm3wOoerwTgyKeelm4WXLPOj8EtnFH7U3g==","signatures":[{"sig":"MEUCIDxbzi4AzOKehzJOG23/GNFwDzpzM0oZfvpyFGulSAivAiEAvTy3dS33WmMwFLvOTXldi68bh6DKBFi/hjGYSDq/bdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYIErACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfHA//Tn1dQG138ml5X0U9V9pjUkN6jH3kDVCE2owCATenPhnmT/X5\r\n7EOeIXTDYE60mMzwoxV5DY8A4knrkgKyKazxj4D+71X0He698nGBBRRTjP7f\r\nnQuB4/Vzp8DeOSsHcDkhr2dQDCVxU5yW9LlWGZuDHagFN2D8xpecFFSCcczc\r\npSoR+SnzRryo6HjTei9UK1NFSVvKlDKEO4MdVBZEHSag2vHcZKic6242LqJ5\r\nNvdGP9z3WdjXoVzH4LvZoTs0bc/IfP6DGxo5wEeUtNhi3S7z0uOBrk6H1C8B\r\nWr5rBV+VNwYikOFvRFNpN4798iBsuGeoBFZuufF6TK7fGiyCLrdM9HjUl8yq\r\n1OZiCFRmxY5ZFywsS0lNgg9sCC5ZuWyhD5E5n+Arhx42CTM69gZw1wWanVqB\r\nGDI+l24JwrPXdO2CNd6bLJpB+QJ6cgDY1Q8XPvxBUwtFXjznG2eALtKmmbmW\r\n8HqvxDAbDxxdOoop7Bi+pAgBlTWZ3OdYQRk2fcQp9Tn+5LFTpWyksEv29TPr\r\nRf3pbcEJB4RD+8jzKB7aCs+w+uJ/D5YFo3N2xKeonzOu3SBgAJ2jI266yFvH\r\nTEWTLqJ7yWz79UOg1p3f7clxY+mW03iin/F/T+Zl5Ctbk56x4a5lRiaQ7QAS\r\n0NlHUPjDGapyXIjoI6BIC9IGFpcV1wgGtwA=\r\n=ABbr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1667268847866_1667268907604_0.14138214207600375","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1667873069077":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1667873069077","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1667873069077","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"31042dc7ae38aeed4747fbc4c56bdc0b4eb3c729","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1667873069077.tgz","fileCount":7,"integrity":"sha512-m4nspehQmUIwWoxkVxrC+z3joynIo5hqA7xzYMGhWoffKwEakx6aFeyxIn4xB8pE0I/qf0YtMdMS4BfJVmCC+g==","signatures":[{"sig":"MEUCIQDkhcChJOjohbc9zD6e4zJ38NgRg+1iJivxm+32zjFzjQIgILpTV5qD8RwyAiA2n5XjjfdLbHFSX6jP87ISCU31f1g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjablXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrATQ//eb9y5BdHFJ2OaAzJf/II11t41Ohn6VjwtnasgBFZRH5Tqx/I\r\n6QvltKgUgn0u74xGBGm6sAMebhJzypqDV+nJzN1AvIAv5fWXqCBZ8KUBADln\r\nf4KmvTmRO1NUUMzfOT0lnzCVQgQSNTpNPYVd2BcyTxITaLF6WRCp3Pp70FZG\r\nkHO3H8pCqcpjDD6fUQunsOog/B++Fwz5WFWAu003eF+sus6+zYn3KN2D4d7j\r\nP55LZ0SWoHlWuj4+H+XEGYYmBR11FQGHyhHE03V7hdlSjudkDLrQlxHmvUZ6\r\n2fKjFfNtWB+inZTk9rr548u5VR1YXORcw5/RNm0yvu80iAL1+imr25Zvr2UG\r\neI8LbQRWCiSnVh5sPIFuApzI+BldODRIyynHkVe4hUmMwV2D2Wb4wMymRJPs\r\noWykknwAlWLUHVSSd5PeXmDdT+X2zhdHPu4T74z+4n9s4Hdm+ykDOh+RB7uU\r\n3iy3KfQSd6m2K+cjcidt3wWjYHiSDNBhQkq9xkrwK+nAKXtzBo8J9WR3g2Wy\r\nIkoeOlVZqjVcWdCADMtn96h7kJR/a0bk8D3ZtIaGpRds/pajqbCPWx8yUA8w\r\ntCJOrzmKt2OSA97fAjQKPwXUWfyxMof1a5UnJx+Kb2i31BO4pG9h13qz76Lh\r\nuvCfdHQkq/B2vQKhNj1j5u7X+aaR6mmG2o0=\r\n=91BK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.20","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1667873069077_1667873111798_0.035144118232517174","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1667873070683":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1667873070683","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1667873070683","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4e5bef9de4c7b0aa59db77e717038c8e489afe8f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1667873070683.tgz","fileCount":7,"integrity":"sha512-TjXSK7CaLYY+seyUOP8J1JnkACxeLupKEkL+GmG/lG8FyMaa+x2Z3TM8jBGf7WS7+OnmxL0giUtI1+YW8tgrLQ==","signatures":[{"sig":"MEUCIQDaqvQLhUbRQmwspH+IB2l6KA/y2v3Zoj2KjN60IUGUBQIgFEXTELrRI64narOIunpXP9OdFsdeUNPb2qMH+2nqxDU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjabluACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogFw/7B08gvB/3kJdvMtYm8KRBFcL4q3BnwNh5ygceHWwUzoKFdqA6\r\nJ3VuOQEVJEEN59z0erouSoPNT/UtGd6HkWHqlwzaD39IpMYmr8AeV+Mm7CU/\r\n5i8zycC98MIDfmbU1TnIY/gYeAdUwWbm5rlEQ8jhTDhbvx7IAAcP87Xy6iRX\r\naKBqI68IGk8h+xabdJNuK6BGAjg5CLV5L2gQpNUJxAqQRvmjmumtGTGay9te\r\n+N7FLnkUXxVXLokkbR5T3kk6xhVxjTIaBreMHUMQM15m3dJECfSQiEzl9dkV\r\nk0mm6BmOU63/zVois8Y3o01HZHXyV3KRvq7V1QD6igl1/MVxJg546f08LgWk\r\nOR79Y7Uuvl9S+vaYEDVr+fhnCqY75Id91WPlfj+/DyoW2BjMRCixUbpTQBhv\r\nkesPv/IgQ8pW134z3+oj6e/N/I0Fm94sOY0pi4+zfkk+2gET6t2UzY50jvQA\r\nE6KQOAWBa3zN5LxxWT0lfqzYddvdzRKPIZHcWQrO20dS+bWNa/zpOSS4iCYg\r\n6/7olPwmgJpfAyLQkhBNqTrMuPfR34EBT3LMLjJmsb2hsqIzAQsmXgJbF8qp\r\nTYJW0PtfdSw82f0jp3ZNJfik45pbu39v5ruZryud9In7Hj3eARPhHXyQP0hG\r\n3cM7x4UNAQ4EtVlzFcWZnwByzPaYWkt82Jk=\r\n=bzT7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.20","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1667873070683_1667873133924_0.9289776956277425","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1667873385041":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1667873385041","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1667873385041","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"25b07f3bec667cebaa13076a2fb65d16ded431f8","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1667873385041.tgz","fileCount":7,"integrity":"sha512-blFrOMCLnZqBpMuC/Hm+BeWd7zk6vhZS2bVwlLpXMpbElUiUCx3Zk/lYIkOucNULqkVKR+sqoxobkzRGMOF3+Q==","signatures":[{"sig":"MEYCIQCD/QZj34a8oYUQ1MdplluUoj0HYSnMotPfpCPPTIaOXQIhANJwRRPqcwBJ8oSA9kwjpN7/tLLrThaCH0sY9q1srr0U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjabqXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmosZBAAjokcZP9AwOpQIUgHd6JsOJ2AokmZZ+eyWpeMJbAY/fv8bm5W\r\ncGrwM8+ZsMJdXCHXUGxIimfgQ23eL2t80yrNpTQIiFuo6ezRL9hzj0swdPxi\r\nUQR+e0v6bU94K9A51KQU6W4yzK0Y2Euz1QWk08LBNRLo6tuNvY2JRiMYpdE0\r\nJ4Wy5BSty8gYKp2SrXOdlKChFGm7BlphYrtnU2IkHR0FG7wQDMGfCIVuQjgx\r\n2aVHnnoyNRF6ASiIHxETgeBvRYjEpCDqqkvqhIlABtS9fCNzpyUPRCHgO0Sa\r\nB1V8xSWxzEzorctIkHSkNgFHGOLX1+OH0c83Tl/rmxW3ovhcNAU98zX23dGL\r\ns5Z6vhlp7mV6aBQE8nr3uGSTrnEC32yCE5fG5+jOJ05A6NpR1rQcuZ7CjCb4\r\n0uUCDjVlYB3QnJWA4EIITmDojP0ItdZ254c+FtnOK31jK3xlEdm5FN9BhDIi\r\nXPQIgdnNblaw/w6vTcBmScXbKJQhowuKHrrMG046ZTxqactsQnWr3/NEBM4r\r\nN70EHZm5LnGYygyIeTa78g1nn083yu1IrYQMrtXLxMvTGWSnyuc8H15WaI7R\r\nCbADse+CjihSPxm6yBNsYRre2QQES9JLYqXi9wvJd0IE9aXPUTXDk7q2Q48C\r\nkQudn9M1ZCaxKcrSp8fHVUyiM1SDwB8u+vo=\r\n=Q7XG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1667873385041_1667873431538_0.6767598875553689","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1668391538952":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1668391538952","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1668391538952","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d740fdb52f2e3ad9592e4611fc7462f8f0d18a83","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1668391538952.tgz","fileCount":7,"integrity":"sha512-cKV0FjiPlrCbuS/bSt8CQ8MSxxPXMgeTYuQbvbN5keHFPuDqQWx6/N+bfvEYIG5Dafnny6YcuqnlD0p0l8YANQ==","signatures":[{"sig":"MEYCIQDMV+KIPuX/8EpeNqgMnxZVyygK3G69dEFvLp2RWMbGywIhAPLaGZgkpfbDDlMrTar0eCvCR03yXIZxJIMqLlQGgBLV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcaKjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUdA//a0XKGS5ulVp/pWgoJIAYOLuBZ1nOiaQ1pq/mzCo9JobTztIq\r\n/24Y53Z7p71q8vjLt7SBsfVomIUCr2DiRTV9eNbgq/E+Gmdyz+HRHkBvfKQi\r\nMMfGeI7FbgL/xn5S/NYHPVJOzp+acrnGaKEfOGxVzSHsQ+Sirqpr9Jr+uN32\r\nzgnQqKa38htmEasc1NeSOLToZAKmpl6MLfiG/FVBPPqh8zka5IRPQ+lfCJCH\r\nEMDVapWq+ryz5v9o9TWOOo+FKcGyCGoxuMcNgle5IRZ6Wh06ey0viF2KPnJN\r\nycwyasKS5UtlNxgtc6lVzgi0zjT8CQuwnoyvPHHeh5ongbLmXHR2KJtRynNK\r\nfdE5YcFZ0rvoS0IAo9nvvcrnLtFZWKiByQrORB/ZdVrZGbkM1gX0JWe+ebFH\r\nU15vvKX+wZJjR53hCVQ0Ll1NP4MD6wwULA3JlSm6AkYNUs9pki2uTqJ/gLQg\r\nd4AV3TwQnLmCekLOBM61JkArr+cWGVkPsjsHltZuJzNduyNCJPqu7DOqUro/\r\nxuvSe4aJK2uGjeikgqRPXUFOFDZbAzDI1UKnkz5LCcnBnS8B4rtx3hchM/le\r\n/PKKJWqj/YI0XpQ213dlssTqHWXEX6A9OoZS10F55exsRlfaZyJP+L024t+I\r\nemdHeS2Ui9AM0XfHk//090DoPcq7qRL7A48=\r\n=dGth\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.21","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1668391538952_1668391586978_0.21625535531446327","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1668391543348":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1668391543348","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1668391543348","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d2ff640ba9820e6a0832ecb863d46e6d0a65e229","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1668391543348.tgz","fileCount":7,"integrity":"sha512-pyGPGr6LjE6+PJfGidEhmhchl/Jon/VgcdcB9Hd0yySQJqXKil+Vcu4fXNEVG4UtzSS0m8UOK9B7c7esCFLIVg==","signatures":[{"sig":"MEUCIQDP0MOaI0b3tE9eil3A6yvj9xzRImpvgVx30QGVzeyKSAIgT+K2clsDneV8Fu2yHZo4b/IinAiVDrh4yfFddSohvWg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcaKrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLrw//RIDQRrOR83rFRoH4jQdBBGkDYyHhbu0zWMbKyAp5u5G6Ya3p\r\nks9d81eBQ7v9xeiru5xYEW5ApVDPWxphCCfgT6nlq1IEcgrecC7h3NEjcaBh\r\nV+v8XN+wd+IXtWl3zeLvTZgy2SG373uvY2GTMrBOacCmH4JbPfg7Dj6iCWGK\r\nziB9/AF2C0bHdRflCXnXhctXQqohi8ifkmzjPjYa3XFXqbbygceiT6B8aWRH\r\np1Pcw/7BCg1iCOw0wMP6JdGcMnaabBesEclka7t8WMThSL56r97phBhsx0a7\r\nqQvkWecNapYWFHgJ/ND7PPKLyz66l+4bTWAktTBqxM8bCAEuvmIsdr3ct2XX\r\nyw0QPthmBOLjJ7M+jI9Rgqrcq4euB9INeQZXCtCRJJmYUzav2M0U20KbTtw0\r\nbJ4zGBA2EqjKoItZAumrosvSBqsAxhJpLDxM1SiKWLamKEwBB1UNbvID8bSg\r\nc7wfyvIMQepx01GCID1zbjbXt+mZrjXn4c1Fa3ixxdve79xH85XZmwQBBX5o\r\nSWXloxyaRs89cPxZ+TwuOEYGkvKPcxjszP5hjeFWhKmJhhfDc7jwwZpl0YFe\r\nVkdbNPg9HwUkNJmnF4WjhINasKE3pKObtdpNU6VLMLn8+ymH9rtZ2LG/Eauv\r\nJwzY3VI6yMY4stIA1bUOHb4jzO/fnZwqV4Q=\r\n=jfCD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.21","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1668391543348_1668391595492_0.8689053473352977","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1668996777654":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1668996777654","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1668996777654","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"163f471cd3781d5080d72bace52957dd131494c7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1668996777654.tgz","fileCount":7,"integrity":"sha512-+ALV6Eid5JZyihORLnyKA87l2k5HKn5e14olikc9wDiAeHiak9J3JlJzjoA/cPJRiCI+V8AMK7a2k2fdBpY6Aw==","signatures":[{"sig":"MEQCIClcS55moWedO3EE8qr8ipoiog+5qOeya5dw0KTLQj1ZAiBdisFhFLG1An4tWKOusS/wgb1zt19aq/o3mfw/Ue9Nzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjet7jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqR0A//avKPY70pxRy2fLcCsKAY8Vc1k7JO9VxFZr3FHFHIFG3VpLbz\r\nRCBj1OJer6gd28fsybCpga1ZhEuQgwcM88eIFXa4wmg57xilnHpmmHt3T2Oq\r\nYeZCydpAJPW5eQEAon/j8sbTuMhvkNjlt+0Gh0HyW/6dyfeVhM6aB8xPwVih\r\nl9ZLjYx1r9QbnjsLs8N500G9WsiDgvfFOdmxigvIISf+FpxWnM1DsH0w7xIW\r\nPXnOgk6vlIaRD4WWj7F36FjukzlQw2C3ySDPEA2Fol+pLFvSe8nc/bi7pfNk\r\nLPd+KzLUwlm0qFt4DLwb+9VWJ0Sl7tnhqSR/W4mPghZgqJZB24+Q9qYAeins\r\nYz9RrwPfQdrALA+CHqiBg7qX+pEfM/VQlB91HINiltcPCQYlxvwJ+XQxQz6n\r\ncYOudqCKWeiXb8Z/oKz8VHUOPaeLctFFl0uIodfQzo3Y+A30MUdhq7+JYxHf\r\n2FCYJx0txvox7yA+HYOUWYnsnsAs5S2J2vyUkuEGQ8JdwBhTmZLNZ9Hs9pOK\r\nIrSgjRiMVug2fNrpXHNWYw96jtZM+61l2w+hYWX+xvSEilq+lVeUyzUhSU4c\r\nyjF3mp8hlwKXqNuIfozUs/OlWHuhVeNVCXquwLjlnpYiSv6i1bdU0zcjcPyf\r\n1yprbMSAkSuW01JY05RRmA+Cd2HGGuT6YGg=\r\n=3t43\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.20.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.28.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1668996777654_1668996835087_0.20050588242445855","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1670205766330":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1670205766330","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1670205766330","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"fc6d215684cb56348adafca67e35b22ac98dae85","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1670205766330.tgz","fileCount":7,"integrity":"sha512-1bOp3zT++CAPuD0TyvNVOzCS2ldHajPssTPvzVFCinne1oil5DYyBz0df1VnleuxMAgiZdYs/LlCI5wBu7tuaA==","signatures":[{"sig":"MEYCIQD3ofbBVEOjRNy3x0KhonSB9EEUeB2PXrviJbx6GYMnXQIhALz80a2vhFt/57d7sd4eOGXw1uyDjUme9zZ9+Wf6gNPi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjVF4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrOHg//YD7FzeS2soAvj0IX1duYbT0t2jfthZ0zBZJ+3qmFcpJ509wl\r\nbLuaHzScuQ4JzhrT94Cv7/rbGB9HDMHwR76/WsIA8kCrWrFdeiOL8vpRQ3vC\r\nUkbs6YmFhpTvY4iPLNbxwTndnJfDzS58fFUm8wGdiI+8JUPgT0JmQn/7C8yJ\r\n8stJVVVmSl0rxb/WKJ8IFWAhrBblkX8CM8iExXk4p2Y/9SLs9M/pruyT/w/2\r\npCiOovvq3vXdDe4rmXkXEdQnje0qnBpgjozxMnxoGNrnvdBoqxmEUXK4uGJg\r\n8B3R5lWJZ+9QyzhraZZG7ucigf9yVJGX0nsqRi9ulEGSoG/E7DwMoVnBtXmd\r\n5KlmXO1ja2DJoFMzEgv5G4ABQHmB9TLIQCaiQt8XNQC3mc9TTkmWXK68UYL4\r\nn/87RtBJb9zLb0lBgOxXkT8hKW/XwDiFUep6zinAxeByZhYTkP83zGziWHCk\r\nUKV0m9JI/r2zl0/el+Hra56n2+LZ+T/IjsnNgCsiCDCccBW7gcW837srVHKj\r\nYfVMeKFW6Wq3IqPoc5JCHsFoOFJ1NBnjd4/6gfZxDCbDDQ+EePaR9Je6f2EP\r\noDFUOpS4mDwwSqTKpD3ejx+c37K2uUao7ZkvvcDt7e1/8XUeFr20O3aMBLSU\r\n7YtuN8IIOOvXagGdFnHk2cpQ++d+r7Z6Gpk=\r\n=PITL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.29.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1670205766330_1670205816034_0.46417927594816755","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1670810710873":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1670810710873","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1670810710873","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"ae10a5d7c831bf1ad41039a90802030c6019e52b","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1670810710873.tgz","fileCount":7,"integrity":"sha512-z/8gjY8OuJ3GY3a5NoII7R/7hqdyIzRCYqp6+Krj80N1y4Vuap2NpozQaQoMYRDWcxXwI/X09DLbHwXI3v0k5w==","signatures":[{"sig":"MEQCIG4Ash+pRgrcIOlCTAvZX+6AvlsSTMpxexDrQHBOHFDLAiB/7ZXE1doL1Ez8GiwlA36Yl/FMJUQNqUsTPgndmLxB8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjloyFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFWQ//Q1tzROldt1Q7EzolsXDzurqKKXo5A/iNvll4SU9owbq9WLqY\r\nwa49UzlRqYBG4QQbHAKoiGKmy7amU37dXz4R4y10Pu8sWqWkHrsXtKltwMJQ\r\n9gp78lt7xUJoEcAXOd8I4tV4iTmfRJouGs7HchrM05wBdQrdDanR/DKSHV+f\r\nOmDzaNTf9NAN5GyoaAt6TQMrPztuqx+QRkNyP0ezHMPJQB7THsxC2iK4O12+\r\nJPY4IVTc0ddKH71fSsbCjvgkH1xYDmM1KoTRGxGjuKVq4ugG6cK561Ef73RL\r\nAxbGKXQah7+uPZXYfVAavT/F+WMR/O5Kk07LRGomBHEw+nok1/d2HZbeur2C\r\nSMLh7FKYE24QPiVITUUBxel8dxAxTTlOlddH6xCXlTSzHcvVUZT36KT5QRjZ\r\nUl+d1Uyy1dqYhdqrcAXKm5o3YMk8tQbdprOfqZ4rXq7k3bjWyTlgEPZTGYxi\r\nvr+GLc+V7DGp3hCtv50LObOUC4Z7mH7ITa1Lp2vtYZS56DHpfhIhVBkF6Bma\r\nXwpUUeZXnTriGmE2bvIMAK1mO50678PdiKvGgcnH1bUTj2uZ/1TiruA03egU\r\n5Yv44r/DEQ5gPfMnR7vbj5/wSEOPeS9PefxGkrBKMgOEWrQdpdOZ+cGdelpW\r\n74LuambOThJ0ApXboqejFmukdn+Jwm6vosk=\r\n=zjgq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.22","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1670810710873_1670810757209_0.2238528578519694","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1670810716185":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1670810716185","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1670810716185","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c83873c81697dd5d1d4aac51d8da43a83af22255","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1670810716185.tgz","fileCount":7,"integrity":"sha512-N4Ojiwdiz0ZbhE6etN4FyaBZwHYAjslOS5QxhpjWsnw+IMv1gANZY4egWAdIn1aFoVWqRmdj9ss6QQvFKyPnUw==","signatures":[{"sig":"MEQCIFFc1Gq6AhXsb07FjvouqRwt28ECGE57b/10FTBFmIthAiBoktU0tmiJqyB5R1N7rPyhKB8lBa3/YXwaKx6k4awgAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjloyPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJiQ//X7LzxdGEUh1yMzbrOsmPGDwd9E/b9fO9GZeedoqq+M0pSBgZ\r\nZtP8Br8cDXHglBrLQRuCT7kAoig17b+FzcMLj6UAzvMP1ldbzNmY79HnTJjc\r\nMiZA88rbCVh66A8bO49nVUN003mpycU9yNw1irsKHgzaUZJ5t027BWoUeOif\r\nMw15kln+A8pqvQ0wvCXUirotw93TDqdRgNkcOXXiybn2MzS4xVGahWcHY4vz\r\nkQuzlAz45/cOwUOSn/HbyMwznef9l/8XVnQd7fP/2pqBnM6uTqyiZ0YvAZrS\r\nUO98G/+MJnsHx8Tzjq9pExc/VVeiYYVSsMQpwWIKJ01Hf8juCu+XXnRjWTLF\r\nT5gLLyMDMUECjWvvVoNpdlVtFJtQWQyqVY6AOnpoy4wAfIw+JPyOjYrukFFZ\r\nEYnnG3793T7q7MrP9Wnc0kNKoOw/w7TMzpAq4EkE4SvLD3NpAKjRR/vCVGJy\r\n0SJWXQlbazb3IKaV8Vy7/5vdOyrXKujUtD6yoHUMWQoPT+uX1QtoIIvUFpfk\r\nDd5ZGAvnmVGyeWSD8OlPwjEmhZ0Q4ygzGd5ksoJYHe/c54wrqfTCozbwkQHh\r\nMuaydNXtnKVBOp3UgfpxN3CVkjY3lWIDO94nbuEhMMQNHLkkVyvsMTgXz6Ro\r\nXUnNkw4OUu8WoA5HPdsB/RW9eAe6DbIHKGM=\r\n=zlRy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.22","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1670810716185_1670810767102_0.3644206254877709","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1671415508831":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1671415508831","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1671415508831","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"803b2924e25ae7ad90ca054434b996c8a6c0d874","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1671415508831.tgz","fileCount":7,"integrity":"sha512-ILllcPBCLvWqupSWcaRd9ITZrqeiEx8jdSxalpNtTz9Q4fq7mKuRQRCKRBpDn8z8w/b/lW9zToWyqF+kKatJEg==","signatures":[{"sig":"MEQCIGsZv5Dlt/CaGB14744T4/zNAfc9iT0COZ7mD6C/rWDBAiBtXsExdp1OVMVt21dZ+CkKsfApLGf3D3DIrBkXjMxUxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjn8cIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMNA//V6LUoAM7zl9xJMapCrjuckE1JDFhzVf3aZQtK2ej6PHxBfgE\r\n2+5SaTmONk0aJJGa/JzbLfl7XV3WMRnEXCn9kdpUiKOwsu8UUlOptB3X5xy0\r\nRJvoli4vkRG9aQ06mWUXG2JM8JBf48K9ZVgSqLYfVtrsX6AhlxkpDoYffnVN\r\nH3T0Gqxp+oMY00n5h6ni0lvvSV+KHhO6pEwLCu6RaA0UqamVAy+A818hxE3c\r\nipm0UYiNmlcVUoZr90c/6r0JacdgIxiNt3OvY9Ic2WBRECMmxN59+WFSdNX0\r\n9EzTrwWewXJO66FJ5hTL2+3hP99oz/eGGeigSXx6urB4vSjbMZEXhDed/WNA\r\nvyZX3lf5MmZY/7gKz/yG014j5eAJC2C/VkRQJrB6uNcLetx+kLScoQbyFshx\r\nFB7EJoUJ3/LkABeeN1iqrSOfKYsjAY9TOIYF0n25VWsLx5JRXIxsD8D48mBg\r\n0Q8Gx00dv6c+zvCMwj38J7TQqsCmeitZlIWeO82//xdPaIpQdK8silU2/csY\r\nvsieeHC0VfBiYPZb1SxNLvv6EI5BdkPjptAr7sxGys8a17pHE20F7gz1y3PG\r\n1maZRfW4dWVJvtvx2A4i6B3F5O3NPMDsHzpVDuH154x7xEU0xKi+M4xbvxRX\r\nAuJ6sfrFQXalwt0wwaIPW32p+CwDiRIrdm8=\r\n=ZmW+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.30.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1671415508831_1671415560074_0.6145993636048879","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1671415505895":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1671415505895","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1671415505895","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"1241e6887a9af7d12b5e07ab0b4aa8566e025ebf","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1671415505895.tgz","fileCount":7,"integrity":"sha512-y94CuY/dwGB+dh3TjzPFbLjXUtv5tjblwn/LBEpLEs7PFByueONRbkLLDiNvh3ENBVithEgJGr3tzq0Qa/F7SA==","signatures":[{"sig":"MEYCIQD0J6E9Gyq0XWmWXwRoxCPjFfpCm6jgAlwTf15JGeKEwQIhAJC0V+kV/4uL5RxGC6OfXP94AnYsrlhX4bhofkVdvvMl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjn8cUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTLA//ePQLP1eDFnxlXGaJU7U30pp+uJRuadhaQE6lalIXbR/g1B/E\r\nMKGu+YECUWMN5qduVhzZ/c/Ue8mIBNtxpDaX6N7+lo8wDU2c5rWDER9A/+LV\r\nNApyhryWvz0cgyM7VPnhkPrpF7WrLXRnf2XWfjiGC4Dn4zjb1J7My8gE99Yk\r\n8JXlbNCQMu2NhslofAhyDj3toSVbgbdXdDPaL9dJWxNQjONHmevhiXzjkBuG\r\nAco/fbNfj7f7uDsVeWb3QO9ZE9c1UKsO4EuA8rMwtwPGc1UxzhurwMH3FQb1\r\nM92BtQUnu51kOmtaWHwp5kke3Q+lP+lEIN0S881GX5K+CHPL/Fpugp9J3bkX\r\n2ZTvso9RwLiryWUERF+JiWWA5jlpQcOkFzY/ogvXvCNIBW1B3wEmyAGyJfmm\r\nPapjA1lVievGHCEQORC+TuEWQpyJ4INUnoqn92vAgbRwqeqkeLe+zPJpYBXp\r\nXOwk7OQ63OP9KgrULjkrBw5+jZ29GDMwK5KFsyNF74qwkVcovb1bIWDoinxc\r\nRssobegr0GG+AZLS6/krZ0ZA5iQDArrMRPiR3mj2T3pApmWnZuVwSrw3N0QH\r\nsOHnDfebqoqGiF/utcw5110ISLQzGg6/VsUxaDyiEB6eIJpsA0VxuFosaEZg\r\nYHTeu3HTmkuSoSG/MBjl+TyZJVJtFzeX52k=\r\n=l01j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.30.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1671415505895_1671415572076_0.4574154469989311","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1671415532548":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1671415532548","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1671415532548","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"26a08e9357f7331cd176e814204101a9b84f5bdd","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1671415532548.tgz","fileCount":7,"integrity":"sha512-Xz0GuUNpx5lZ5FtCN4t+QLulSnu9sE7lTXTG5+8uZNEvKUIKXduJLdzJtRaBbsu36PTzvypZvyW//BQzgRCxgw==","signatures":[{"sig":"MEYCIQD98Yo4tZf6NNJUDJjZsnK0pgE668SnWcYthh3TX0P1qgIhAMuH9qTXi+OT+5OMUgINo+37FZ8HC6L/JgzsdOdvs1Cr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjn8ccACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoREw/+JzFgYtd7TKltYJ6YyWWqkJt3fb/wZJdY1zO+UJxfIiLFrd+l\r\nfyyLYjp4mk6QtEOFJP/3DMGZPcenK0NBp/X6cQPT98Qv1Ok8TQodue7xX0AP\r\nQZKWGyQODukFBeOwESiqN8tWjbwkaeccqk1lUW0IgMuaQfJobGDV6CvUUedE\r\nc3f+V8O9mzHZIP61zrGN7he7VFMyoJ77gQ3Ow1C1NB7z/BLf/2qHGw2PaPLo\r\nh9ba6EwTLNbudzc7K6wvs24wimm2WkgjB7tixseXpfIwCUqhdaCMRz1c/CF0\r\nzClvTqrDwoPS2m2k8Kf4QOXtsWfWMQo81SagWMGLreLn4qS5n6VlnL8SRT/N\r\n+hGyzhDk66CAtXuECtlZMnNS0UbIYxgs5rXrMA01FhM81sGUjZGvOU7BaMS+\r\nxD2xBN0Ay+LCojjmD4vS/7NSJZx2iMXAiGXpNPXQY9SAxLvrAOX7ch0qk0pe\r\ni+Qantsh7ckIk2Nmp2w4enkmvlSCKad4NxnKjLOWiNstGLOTvP8sZZx4Rk8g\r\n1dxxepJy/ANyl7Xtluodsv+oQTZAVTrCln4qAciHI1RnNtp7lWNiML3juic0\r\npKle4FFQZwx5upzB6qM3Bok5WryIdCgdHLHf0TDWKcNotHNYRwyDkssd9nxA\r\nTHo7bCnqA0rcB68KyEXDH9GUdsdRyPZP5dY=\r\n=OflG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.23","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1671415532548_1671415579843_0.8558338626716979","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1672608200112":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1672608200112","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1672608200112","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"5f6803f5092193aeacf09abecd7a200e2efa6768","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1672608200112.tgz","fileCount":7,"integrity":"sha512-kt5sQMZBVcxQm4NRV5P8OGkEnsboQDtIk0LOk3frWGbyodJ6cGwS71mM88hGfcfDzUozvYVJszUSHfFYFN+/Dw==","signatures":[{"sig":"MEQCIFmAaQ2fMTZdA54KrZHYpUjqzPMFwS+MVceCqO5JtKvOAiBsya4/hdx/wTjqRnF8f9BjC76utABc7007q8csJue43g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsfoEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoJ7w//XrL+JKjWMclaE7Xvx+7537QZKfNVNlkYOxf4uc8MN7U9AnOM\r\nU1Sjt6IgJlNYko4iC0F0bVKAdq25mJnT3lHJBmeLPF9IjmxFcetRJWrJKOMt\r\nvN/UapvvKWDy4urg+/2oP0Fu3asp6PwMTm5jVuymT3BdVNkyn2+augh/Yu0X\r\nUwBcehOZZaW4/IOSKv3q6RyHASIAmVucjZGkzFP61zaqWE8nA5JPnPDeKYOP\r\ntqDrlkvxiMeRx959Ob5X3HorCDtRDiB8dSSKEEEtKtrTap+mje79UyRBFnlF\r\nCet9AmQew+caBQfVqXxDH15krJqI0lTdx/qHBTm7RXdOEjCR6kNki9lI3B7S\r\nNWRI2RTFZlMV29oTiJynroyBnrEctf6TqfM1zRd45c99Bo7GAqjpe+kgNt4h\r\naqv3RGTmlGCYRkOGghJN8XdG1X8Uohy0yFIpSPlsd6UmrDCDYaDChUZRIxk0\r\nQIKfEKGNN69IofhzevNm3pBBiNRrwvSKg4Ges5hWLqXgI/BuRY4Eo0HMJqKn\r\npvt6ronOF5eil0b7h7+0p5GGnYrCNgnxM27lXF0ScDX19y8a47r6d4Axzkwz\r\n9EVSUuTCWCg9G+9HMCvBChiECpGdCN9vr/oIe+CJw0Lsg2AJRpWvc2itQR2F\r\nM0lJhbkL4caOAxG2uATUOjzdSPkOHIy60EU=\r\n=aN2i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1672608200112_1672608260090_0.7497215556851389","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1672608204519":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1672608204519","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1672608204519","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"940838d60fdc05287a5a2a4379aa0a20d5acb958","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1672608204519.tgz","fileCount":7,"integrity":"sha512-9YySr7y0F4kpz1jutpzj9/pIu9xdyqx6cOHwAC9DSaJUT+ArN9SuOON/UvMR7CEchCaVYbSC8rjj5zn5yjVQxA==","signatures":[{"sig":"MEUCIQCa05cWHz7eUlrxCMqsojzIoD2dOwh8Oqqu+X+qNJHTnwIgbyE4cYEb0dVapguL5wAHQJEF5EYw+A7z2xH8H7ttm88=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsfo0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/Ww//Zd8+scaT1ghzJNi3wC23Q/PxEUuGJMSCN2W90vmPNESQJUfj\r\nelKzT4v/nlBom0q5msilFH+zp4UmLpoHJq1vyN2phCpoe9X4zyfoTGt89g6m\r\ndUo3+3yUv9TeBHMKc5SBad125pxxNucGbbBsEQ9nRQcZgdYWQyq440M0rTrj\r\nnMDRKrJUR9hQycUbFIHx4jXja6L9NfF5TYBXTg5JyWB/GuxQhdCT91bNb6dG\r\nIvpwK/96tcjZn8Tx6vPDJXzsFQP4NKK/Yv2HrqZAw8xUjscZKHL4CAdh5wtM\r\ne1A2DSERFib13NV5jf2BvGxjPg55nlo6vX/Oh0r/+5Fa2Vj9OxrjgU7w+aWu\r\ndN9UeRC34zUfCRSdK2q43HKo5D4NzQB///38Dku7N3tFHENM7FQwjigaSoo2\r\njSuW+d7VXEF1xaMW/z8xszpcOh8LzQckpExBuw/Hz2C6BYE9FrSNYkVOK4KJ\r\nEDn51KAIdSmHcMgS6dM6n1qIx5nSsAaqiMaQVZ7JfNqS1imj9LJ2Nr1u+pzS\r\nbrOXRhinYTc5Or2SlVq0zNeoNeiE3UrsxBgs34Vg5+pIN4l4b5L9k+EKp55T\r\necD84f8ai0qKGP7hrz9DzFEMz89EKHgAuVgdYRBuT1fxiexfZhwIbV6Smo0X\r\nKozxLUMr0WGylwyaO5CS1XxxOJ2tyACWi8w=\r\n=LYaS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1672608204519_1672608307960_0.5299702820670062","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1672625013680":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1672625013680","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1672625013680","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6cd4bdf6bae56cbb0fc34b99675ad95e6b5092ab","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1672625013680.tgz","fileCount":7,"integrity":"sha512-wRGeaNI9xRLp7unVQfOhV3Tsg3on9ceApnjIiV4U0r95NxSkcR7iimIpSMwSfUtjeUenhvqk363pT1L3IXaiDg==","signatures":[{"sig":"MEQCIFTuCUFtTgjI6SR3PlFD7EKEg4H3nKHRm8HE0qYXchbnAiAdly46e1oo92Bkjm88asiOxjWEZb0H4+RLC8BqWA2xTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsjugACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqVQ/9F75jDNwYPFKEX3QM+WT2H4p+OhdN8Kx+w4vcc/nZyCF9cbQv\r\nfw3IILXaUY4bhOTqxueVTNAJgZQ/Dv+tVP95I852g8HNmac9AxhNhLywpx95\r\n/lBSAwqkbarxSCDkshveJy+JAXvDqnr/Xo8h52vx9Z1N9cQsTS8pGUxZwZHJ\r\ngUEdDjSI9Be7jNPew9mG3tyPdMdgrZuXyY4QPWmaN81kQggu6R0i0US896Ac\r\nFfBXKSOMzKp9SjFIaYjPBV8baMZau8XSu8O70j2kIhtLFmxvQid+cch+oFE7\r\n5+dJtB0RixOdUshGsKbM65nQPVVrOZdjCkMBKwlgVBIrw/fqrWEaLD/UYCdw\r\nV1NlozN0icGwJmaJ880OwfBJ0hWtZAghk3Cj4Ta+fwmBfM8f4Nn7qL8UyhPM\r\npsCch1ZfwfU7Mh5GQ8FTELh4srTSEvWvCxx1QTEhuCTNQdEACMH2pNqThE/z\r\nDdRd/CzlF53tv9juP2X2ekdgOwhp44CFqTtEB/7lWR2euGJGShv90DsCGX6n\r\n1SfuxLR86Dq7pHydJG/RenWZe1dK7vN/8RLgDIaO7pDjLVNHrPeOoVPkUabt\r\nneLvkftkpeJb3IRjy3NkCPxFEPxsYc9jOUURT6y6RemVRHJZ9+aj+O0VKbNR\r\no340ZG/CCOhlNIIC1WGV5IyHyOQ1B2zXRBI=\r\n=Dwy2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.31.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1672625013680_1672625055814_0.7477260936782923","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1673120776179":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1673120776179","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1673120776179","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"26146b1a6eafd97a930b4210e6c197c7207dca9a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1673120776179.tgz","fileCount":7,"integrity":"sha512-0jag1WtFNc4n/WBOJVZtsIWe1Q9+xLDif4pU24fMqpqDIcCBVyxjksL9PRFmhyL7Q4BJ0ltxOAzBKuJiDlhzqw==","signatures":[{"sig":"MEYCIQCFDVyA8kW3XPH3dl53D/cqeZwRKcdo+qxQMTcMd6sBuQIhANYWnq00HI0K3v4+9bg2H3u+D4I3fRyGdzgK2y3nbE/H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjucxBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3Qw//RopD4cfc42MtSCPMXf8T4Pq20IMQnWGjTcNRUvwCep1zqlPJ\r\nKKsFdnhfkd1tUyJDVZp1maRPsVT5NtHCXnmPUMt8URN8qKclODMU+Vb/9EQl\r\n3DCfCGj+EpvKOsVEnLTVY58KguUsDFRSZGZvoF1r2eZUiUzaEX17Nff0QZ9C\r\nM0cr8uQXBDfCiglE6fttyG/MWzKh+T9ifbW25ol7b/dfTxtVswQ4LF3u1o58\r\nEmVFa16otqre1/dgsGcJDsjjGVw/dwCWZ+hfKTe5zJ8qgZpP8mZQFVooRhWo\r\nSwLzlocZXomiQNPI009FBh0HUdRPC7PFDU5kKm1aXkNOIMUmsUr7ZeyXsFWN\r\nK6zFbTTUi218BQRJBLf6m0Pb7Xgvck9tXMqL/IwpiSwtxTTUkUIJ6fLsZi2E\r\nAwSAtA45wnPrcWyuxiKS5GOomfVQfpalfEeCqvd9JBmyDvS638Iz5SOWfGik\r\nxIX1ZzaEGwNzHugvcEyu8xGX/bhb7JfVT5EhWivb4zQX//sJfphrI2sZvteu\r\nec7zyEnMd6Zxfplgai5bRcPh411lk7O5+WRAufiQIzxXdujLjCFZVcPdLwpH\r\nlZVvqjZ8uN9/tkUm5yhGEkvkT71p3tClKXZTJOPWKdxFgzLbQ3jLYZ1Ii6OT\r\niL9L9+b8pswElMBXgqkObOZpAZIhulcFjHI=\r\n=9OOt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1673120776179_1673120833293_0.5344055843344495","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1673120778147":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1673120778147","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1673120778147","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"036a4a9e6d46f0971b555db36d4d59aa9bfbf9de","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1673120778147.tgz","fileCount":7,"integrity":"sha512-QyyBVeQJ6l9aWF3ubSPyIOgZiTFZDZxkyq25dX+NWC0LDMkNhE+VPhLHK4xM3UZ0muQOQXFAwHbc8vuuxl7RnA==","signatures":[{"sig":"MEQCIGWlQV1oNoRSB4VKN0Y9t2yKlaMFRig0Vv+xpcVNj5jXAiAUeCvrv7FEdXRCIgHqlqTr61ENPrrAbwJEiK0pNLSLTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjucxzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpECA//YbOa8sAMV64AnS2bGYKubdCSR1Hv837pN1m0mTFMGdBAX/LG\r\n16RoegQgLV4jj2XJUIsmYelxsLx/GQrQEYixbCy6gF4imVJpA+moqD4BG73i\r\nKuWdw0Joo9aa9IaRp7MU9iCWxAmMxyaIudhR6cRrMREL5THB0VP2Ymg47lbo\r\nNqD3F9jefe7piT4vkYcMuLD+j71HOIkA1zaG5q/GBS0cmUfVwZumW+eCARD1\r\ndxQ/klKixGKXoculuqwh5MCnry3CYV/FbL1Evvy6Ujfo0/5gfe1wwc7Gv0oK\r\nckgw0VWOXuhD1vYUGI19nUxREKLVh4uM9A1dAUSTnrvjSDMONLERpLVEJVHd\r\nIa84ukcJf+pZVQ1gAd1h5/MEn+FlNUsU4wK6MulUyIl4WW3gR9qTcU46rG1b\r\nFCdtaJHtDI1+crSTTwtuNQWx9ZwMuPtEGJ6431DVM/n7ORL3qImqBRkx5QGV\r\nwssIgzhHqF3nc+bsUmj5gB6zdu46/2n8Kk/odoyzgoKA8W7qcs/zFcrlpGMC\r\n6qhBc8ZK8F7mBHymr5Vwnzz/yrECHkoh2rSLulRSH3tbQz7dMX/ANhF0h2ej\r\nrXzMkk+vzzcMO6j1ybKrh8zKYyN2NykAz9gagCUMPuSEBoXEt1YjKITyjWZn\r\nVlY1wESccz4tFEtxaek0Hgk7UEiPROmw0Hw=\r\n=z1uo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1673120778147_1673120883639_0.3289183870205057","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1673229790610":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1673229790610","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1673229790610","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"6766b8b64ed08d73e1021c5ca0529b31ae8f53a9","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1673229790610.tgz","fileCount":7,"integrity":"sha512-OXhSdiQw4+MccxlrNoofIdwpd/McGnHPwZ7/x5frfhGXUSg9LRfV7MXfMQgL9Vh4K5Q5IPKg5bNFEfGcltD5pg==","signatures":[{"sig":"MEYCIQD+goTnjqVfBjwBphB2vbbGpeP2seCQs7Z1uOY+i8bj9QIhAIJjyXap6QFfwcGUQM6PnUWjKwho6te/PrlsoiyOYjLv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJju3YTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOuA//Y4szBhEtGBmvgSLdPSpD6UbB1lRbg/JXQMtNT7TRtg+sek4U\r\nHNgld5khSYmIm+4m1vmeEVVKbm9KMipQuZALmHUb+BbDENwfKUbGGqFDJmqy\r\nA9MIM6ixE0wa1ISjyQnOdKzcHkE1L6bsaGHOhGyOKy13omFuKVPcCwGA2cHk\r\ncClW5q95+9tFGI5fZ3GhhGJihIR13wfx3kdP3n4rbkA3SIZHOY/aCVB9Apmh\r\nNaH+VmXmdSZnxjzD0C+my741czSE/tumKjAyIMEmYoMNGSnpdfrXSaDuW+32\r\nLkRnHzHZgWGh3alDyALpdNvK5LULwiNwh2zuQfMTZa4dKgnC3n4lBGKgBAwk\r\nYgTv7ubDQt9uFHMU0vb6ZpFarp17P1vlsgCcdb2MayEH1CthTGqiW/kadqCo\r\nRtfAqX2rt02rvcBfLSFDeDUW3eZeQQiXjsqEjY4L8tWsB99FjSS8HIUjw0XK\r\nnVQ0zxezB2OjELMqZY72/ajRBHTz82OyGI1yJEhB8dkzMDkG592QcJ09zFNU\r\nQOYtB3EPiOf3+rJ2zR1LNLPW7eQTo2exBe6J1jjBxU9SkrHe+xyHXwKV9ugz\r\nkUx+lcWgI2D1e21rZ5m0yFXyoAiIzXLvB8buOMt+x2Jkf35c0QbdYcev48r8\r\nudn9lonQ9ufUDmbZcyO4do8BgKqdbwagTjc=\r\n=9mqM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.1","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.24","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1673229790610_1673229842921_0.9335595633064588","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1673836263018":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1673836263018","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1673836263018","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"e159a6f24f5ee34ed77883205808b4b7cea79369","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1673836263018.tgz","fileCount":7,"integrity":"sha512-Wy5WBY7PFAMKKfExIZ7g08RVxZAh7xPqZJUYPSEbR33ws/VzrELpRP+JLObrMNz9++HwHSqgNSKS8Q2CcL9T4Q==","signatures":[{"sig":"MEUCIFIRTzh3sla1U1Y914ROp3O718ry55Xe1g/TaOuq+kPOAiEA9PJcjBkiCCKokyU4WMccaGO3BCwFX93FzwUWLNhIfd4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxLcRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFig/9HlADbjeNnpho2cCZsZyabKnuK1cFaIzbzKKIMibjIR8NPhxQ\r\nPKv2i9tj2SaiDBnLm5NJmX4pwLTvdEl4JtscGOfkcAi+Fxd5XjavlO0iTDYx\r\n1mzmK1GH5BPjRgQVrK3Ieum0/2xc9A520ZSCJfJEMrp1CkhJudfZ7DQREll7\r\nK4XXYgSJFnFOdiMAsCg3LmwLYOQiUUe9iWpLyDrADWlYLsNJG0/DDeLiQ/JR\r\nXHwXdi+EvzC54gV4IwQ0zkdEPlXcVfVbmGH9dLbnnMGND+xr9jtORFkioJRl\r\nZ+m/Ik80vUZQrpemRHKtAhs5rtGg4FH5//e1NjV5Z5h3mSEO6GNVGMBRPMO8\r\nhDY0/Z+Hqe3fV02Gm5XdHPllBrScsBmWDm7IaoNktvX7CZ+qbuMshUVcrrIB\r\n8EKCOmORtP4WLCBZ/KB7EdiBwLMnchCFeymwWHpluhlXNKVNthq4JBIPuMQJ\r\nd5QCN50uGizTW39s1/Y2yU8Htg/zvkJeNuB0oEbTXUujOSlXMv2pkb7ldtSB\r\npr0hGm/L2DwTF/aaHSQtc179PGAEZBF1//PUra5B4tVk2pII67hWd/aewfr/\r\n/yKHnWRly0rb4IT2qOaf8ODq+zhnLJQvuLfcuaYpRDOoo574YO66Qtidl18P\r\nG/5BhDsA+dW2m58TIzhewoxYCXogm+qCjwk=\r\n=RvkQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.32.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1673836263018_1673836305698_0.14739462506209278","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1674785018712":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1674785018712","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1674785018712","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"431422bed35667e2b31e69b468d68cbf3976c99f","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1674785018712.tgz","fileCount":7,"integrity":"sha512-/yZoACG5Ms2np8ALCIg4YHpxvqLLhzehyecJTLbssWwJc/t5kahT89NKb/iB1NX4WFJaNdZw2y+c1XxmsRJbyA==","signatures":[{"sig":"MEUCIQDfHofZeaFChryKQrHOOcL/VTTtLDWIpJhKvf6dC10A/AIgbkT36ooAMCLv2ohD+WafX6HqdzlPfTtFx/0uyoqElDI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0zEjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcDhAAgtcqbNC/wCtD8P2R6CTgezwCyjux+ZcuoP2KnHLt+JZzc3q/\r\nMJBWXwgOeDkJ0jnWBPWKNYqTaRl7YFTh9Vr2eV6SRVFH5Li9H2a6en9h9IAh\r\n24qI5xA0oUnePf22qTjsxhVLV/iMJC3iCysWaQ9SFRrvkEqQWZyUwqY5nlFA\r\nNUlnDw4fRj5nLG5pVsTkLq+/Z6IjApeNUNdPRpzFr4mjYQ/esXagxgLhKciV\r\nfmyF+CxMnz1DTpnBz8Qyrsri2FolZZVC4QecpG33wp/qXsZkyD/5P5zZ8FWb\r\n90ErW+cOMPl2o40/vpIOwXt02d4Jw/xOd9KPdMNBE/gFu1d/UDE2/ZGr1/yp\r\nx+kBVw2SrV8mKr+Sbf/GQ7q7kdyl8vqbYfRtt4KzBPIMstYHQl+htx+lFM7m\r\n7fpjXEr9Ns5AkuJMTtGWvnZdPfcF54n9TCzC16QVrjRQ89Hx/LpzHQ/0MYkl\r\nyvolQ1dZ5+47l/Eq/rUrRBnDzFl3QwERxq4Kdt3QGcoyeWuOBFtA8qBKoTJc\r\nYrlcTzRQcVaOWNWUtdnrQK1jO1wvA4sGOhAqfjBiUtDiMom9E00CdmTo42Wq\r\nVLhn8D+34CtuCPsGqlXIYqBr8sn15oc8k/lwIMjt+tQULV5oQnE92xL0w9JU\r\n72PeAxt2ALcrHN38WZocg/3Et66nH/rg/Ic=\r\n=iqnW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1674785018712_1674785059263_0.03289051729564707","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1674785018983":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1674785018983","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1674785018983","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"a70e28150fc1597c21082e4ba62bb250a5131c76","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1674785018983.tgz","fileCount":7,"integrity":"sha512-hDBZtrhey13DYFsgvTReKiUfoxIw5lIhi35oqRZ6//jVOpzDfsqHYO94OyO+Cs/j+w2Otm4maqKrduYE4KyJrQ==","signatures":[{"sig":"MEUCIQC8NIGAbV7G+GfYPR3PaX/bFWh4MpcM8naS4cAGjVi/NQIgcZCrGt5RvN+IpdzCjz3Eeu2iYt9Uf1xoCKRYYbzXhGc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0zEvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8hRAAi9Eo5rUtrqmlUw+82RPjz7rHUrxIJpoWBhshoDnUuTDHICIE\r\nSE2XgmRL47tkgFPflgUliN/nq/iJ3tMJD+vDAchdTGlfjBP3by0b/boW/EJJ\r\nqru2WgTdeeKWZHprqs8lzmapB5eTvEQX2iS/MqZVYGUKDqmO1RvC3w+776Md\r\n4pRBt9aukIHziGoUJy2CL+T4emXC20u3h9TDj7gszt6pxb8bKbhnDkNvG4bg\r\nh50LprJjDro+dzfbD+6MKXjBJJL7uTmNw/T4SgxYy+MZsvqIq88eojA4q+Cn\r\njjkib07kVBU+DivOvIyxlBnHzMBAMuZxT8p2nd4FVu8TLg3pGDRRX5zBJiT4\r\nvHVUS0507wmbBrA9Be6PGOj3OpDANvDQjc7B4oHglDLNuQYNmeq1Y+M3KHlN\r\nTmOvg6GLOuTSjvMEqx31JTTp6kImFkma8+zMMJmHkMiD+EQC4M8blqrNutP4\r\n6bEDSqanCCJJgxpViAy5ThZC7MMT7qkXWoTv9P2G3Z9WiQBDL3rfT84QWE3B\r\nd/wku19VlQMSjYXL8c5dbP0SjXWKsoisOz51847Z3lpfK0ZPTUjTVK6yP/Ok\r\nawLXLF+D+kGxM3fKk+lVevI1HDi7MjBdj1HyAxny8DxzgFeEH0RW9NfrFnGK\r\n04EumN/mcGPemT0XRIrpKr79KP533Y0uqQU=\r\n=yKoP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1674785018983_1674785071034_0.9567368932143268","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1675044768134":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1675044768134","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1675044768134","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"14d8f1ce1e9355095666d35c3e9133b7bcf362ae","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1675044768134.tgz","fileCount":7,"integrity":"sha512-JbDMJDQ7zYIWOLi5P2EHVJxc755jcstVoiGIBtYX2k2c48F9a4YCbMJgC9URi8qz6lQ5xArxeib6ensD5zsznA==","signatures":[{"sig":"MEUCIHOqRSYvonr+yRLuGGdmsIesK0hZVFSzNHt0ik2+QRCRAiEAxPVTjBBXvOIEeutucMpFiDnWwTN3vkB1YyfpcGe6IN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1yfSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1VRAAmfHifXxYJL9cjM4aT2aCOwgVtIYyBJASBnxWAqg10/QwOwpi\r\nFjvGDhpc4ktqT87pgng4eimopGrbJ1z97J0LOlkTjq8BbrmL+UQIMGraZYxe\r\nNqT5ka9wmvJy6aFWdyToYFC6yzUo11QM4nXRUUz4hYI0PL/KBFwBQZxJ+1pJ\r\nfcBs0r2EwnPOyFHztoOyy5ihzhIFsCGSNdGWDbmnKKSXftHOxzaSYpTR/5ND\r\nL7D4A5H63kT2hIugDCbo3bF5iSeTHu+y+vHE1lG5rWFe5uuEc4yqjnGSB/+a\r\nwu5hacqInm80gCBY1dMKySPmPF07CDIEwq3ZrxdP1mLTTP8QHeDdyeLRXDw+\r\nE32yB/J7dDK7zF5lhiyWnUiGb3W4hvUzw+E4y+JzwGrV5ZWA1j3Uofn1cCb3\r\n9rgxC5IK7XyxE/jwWxHxAlEYuEmzMpum77uJ+4Xa6wR9xnEONnvqxKOuLwuh\r\nDZsoHKdE/80KpcXMt6tXIswKVSEexBBbJBhnaCv9SM6YKAmHSn2Zl7vSDHS6\r\nnAbZF1uFBPh7G1zg7kZMsTgmO2FVGuYao5eBHveWtzabrGEedC3Rs4VYqWIw\r\nR98PjdhlxE5cVUOKZLEIucVZBaJ9ZCP2FvgatLKOTmqzvsE8Wl5z+DTj3tL5\r\njzfz/SrcqX0IQ1fMF/+O/na731443EGAVag=\r\n=phJ7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.33.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1675044768134_1675044818820_0.3934551192508493","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1676258282852":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1676258282852","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1676258282852","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"8f3f2b2068b7b034c15fcf7fa6ed4df308371680","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1676258282852.tgz","fileCount":7,"integrity":"sha512-6iLzn8FepS6PDLb9ZJNaOHxU3cb1/0F6Eky/B06BLxvBj0t0Gr//rKt8uMukPxoXplACH53mmCogQPHmmbgQfQ==","signatures":[{"sig":"MEQCIFvxx/gnGLgUDOUaL06zijtdZWm+j1kYOe623OGFnjrsAiAzdZr6+Vf6KxjjlUfKX14rV+G8ehNUxXzYQOhsQIUFWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6awVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPeA/9HCWtYvQZU4iL/4X/ySEKnHZSOEvinXAVVPmOCoKdXX2ETUnk\r\nMe9du77sAaSvZKatO5QTwZJUM0fxbDcuKkz1r4P0QD5QVb2665dAOcI8NTYv\r\n3uUD3BEhhjzxVX5RmUsP/SVMGX6E6FNbPntWwGbyR7J94Cn8ReyGXygoDrGy\r\nJpMarx/rv+KiJHB1vvbxqlD7wW5IubZ4J2h10GAnSWHAs5DVfSS+nXWHfgF3\r\nO4olfsH9hxKxFHz4Jy1hUFCC7D1fneRh6NC+HapKBZ6Nw36Qi9W2LIeiuJCc\r\nv3u55LL9XEPZIezqBDLOApb8SFFI3fy4gf7yIVNUjL2Kod67QXWcRmxQbfBN\r\nSfUYaI+aqttU1+h2iNM+CcW5p6olOR03sfJ1Eg6pZqkIBuJD8zPf4PLHxjzW\r\nbDNlXyARpEqip3F8dMyiYz3hCvS+Zt4ygEoM8HiiCaqO5BxXElQJjc5zOfEw\r\nidzSEAKISsIp8Zzq4l8+FvDxawWHiupT/9CyGnGZnaqxZdJ4nEqNHhrNaUoy\r\nx/28GlYLec2lOMCYcNixekCTxcp5W5xES20I95hIBG8dOXNSUn8gLueloYjz\r\nUHNzYODxUEit/91dWDobwUSAjcew74CwDOGn1UO4ga+7zrlPGi3e4+wnN94V\r\nkq4ciqzmNOPV8PBoYb1r7pcvfFkFRl3MHMc=\r\n=sfJr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.25","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1676258282852_1676258325138_0.8703430220439416","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1676258284097":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1676258284097","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1676258284097","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"699c85bc272afaf4e070b69e035cb271ef0295ca","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1676258284097.tgz","fileCount":7,"integrity":"sha512-byA9SKhmeDLgQgrXsBgCEkcNd4FTww1EprNAAh7Lds58Iel7cwl58BiLcmk3A12KjzO4dNtYDIUuP8DLoASUKA==","signatures":[{"sig":"MEUCIQDbVl0RzGcGzzx+ZT3m2SF8HFjahj0FeaAXeAVVIV0D+wIgfdWMedhsi6E4qA/Gt8bwwboqy5krmgSFUsP2YgoeIzQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6awgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpv8xAAnSFhwXeEaByjwNnGtkhmhOkjGUv0pzkHKr/qPPrPJDfPjz8t\r\nfO3VyB9hbMsYe15R8KSYKRxx4YmhpknTji1NI/ttbinTdpdVvpXEfB8VuU9O\r\neTgR2Z6JT/+ICJZ/mFW0H1Vt81HI3AVZKDv6aZ34mUImXslwQLFnVm/KV+z/\r\nZxDVNbPLEOCp/02sjrW7oX6nopKQA+nk5x2s3erMtfPI0xXUn+LIuPnpmrWp\r\nH/0fdm+QdmWoqwtYK3sAH75VASUA+R30n2KLvUCof/d9kN5NjXlo+9iSf4Lr\r\njz9i5Z9eHa6N8BeljxU6NedjyFEwvcljQlFJ/4LE6vY4mr7JkT8I1X44GsBj\r\nqvpb+msZ9EMwjteeCvHShF29wmZHEbxtAllrQZu3RNAnlqW42iQMYeOw3ywd\r\nlcljbZ8qh9OMpwIZ7aNc9ONSZHpGr+JwxkOQW5Q69kDxxpO7JilH5h9znvGP\r\nQM9GvPZfAJ6dyxajMGLnqdUjIO3XM77TWbq3HExthFft1o9EsJoOBzCnCdDu\r\nLYx7qIZx0ipcWPduPmGdx9kBU9QCI9FTegzcd4XmjDDCQT0i2GxhRjxcLOGC\r\nkNAUgFGPZQcMcl34nEenzEnw9sQ2aSbklf16PpsBoT6MsQokWrmL+Wor/F2x\r\n/rd2VJURyRV3oKws5+fefDu18mRDkykMz0w=\r\n=aazr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.25","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1676258284097_1676258335919_0.0569226957118425","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1676258313114":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1676258313114","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1676258313114","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"4cbe433d57fd3b53343d7e01c0a64e063d1dbb9a","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1676258313114.tgz","fileCount":7,"integrity":"sha512-x08ZW7SKbAk9hwIkYtXS0VRKCoyFVbcnLtwOfabTbSYgdbxBZmGKYdUFDqAwusxECqkzu542HskDTpDGj9Q+yQ==","signatures":[{"sig":"MEUCIQChDu/vb1EkbtY36yMYnOonm1ohBqjH162/ua5wYU+RhgIgUFs+Uh4wyH6BECNmHsx/E0+trG6PLrLf7+ArVfqvSeg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6awzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3uQ//fiWlbH1MnK37Br1/wNoe/rcc5jxDtOW1X43/tJr9v+rhpD1o\r\n1hBkseQ80NL2hWlkuGNSFGRJ3kRAQ4HK+RDRSSUnJaSjPSFMjmZivITbwJfO\r\nriCj+G/KZKSTqG1/ow7yChleMZl2Xoz6bqAz9WkR7i6oNbX7664zGfC2nsNL\r\n61BPmv+Je+ls1k0Tr2xk0LCMAibfgq4Ok3Kh+PkNk/Ve9UyBLsz1PjpjRBNk\r\ntTfnQs8YrFqs/xMHoew/cWbdiUGdZVbnHuIf5eJTMFmr64pdgS1HtqKsPMvp\r\n3ZlhRvXL1Ues+Lsl5mQuhcYdsG5pAeh7pYZP6QnCE221s2dtVoPc9momOgSq\r\nN7xXG64Ii9R7xpwHLDXvXt0gCgowvNw8tOIpfEektf8eJ/2wSL6XPCksclfK\r\nviLt7Vn+wGVbXFU0QBNRDhXBrQCJoBFvCKoaAOslWAptlLYEy7S9mhyklFT4\r\n3bvo7kXnNRcP+BkZcj/9vz/7RsXbnbyM2HLkVOaBHppwByMRTx+C1+KdxuAX\r\nVHPlF7ZJqxOjHozB1rE3Ks6JZgJmKqFTq/fdJZdf3+2m39IhDlvuEqiVwUpb\r\nDolcXI2AXxhIBXU/p38mbsUk9SAcuTzhNhEXNGVkkCsg/1yZ4LEyT2+IBnY8\r\nYXRcgAELRxmIu/cqwh7c0AyQgEdjYsFvFjQ=\r\n=JOGZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.17","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.2","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.34.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1676258313114_1676258355610_0.42600910825050087","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1677467460741":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1677467460741","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1677467460741","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d9116185f9a33761587f3680564c2e94eacd7cf7","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1677467460741.tgz","fileCount":7,"integrity":"sha512-HK833wUdj2u/nGcX/80caJ+3zOQ0My0LJPoUmDXHn3MWkjysw1+YEINgdmXB4X8waUUk9WJIhCcy5htXjNyCrw==","signatures":[{"sig":"MEUCIHlY8e78zUQupmPBziLre4wlVRgx2OzM7yeQUWW4ihQnAiEA+WLF3u35S5AslXAWCiqYlXdIb0h9hUtbsa9nSwYPTA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/B9tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvDg/+PBeQwVJdWtDsD1LDfE4jwy5xoIm5ghBxpOPgqjQGbDHfSZ4P\r\nWUYqY44u0BriYw7C5AbdrBQ3VE7/dIgjGnSXP9WRZpc+SefkUmpzosme75U1\r\nxIFb1nfDUgJ3e2UIT3tkOX1B6QNv48QpNh2YOE7UiUBXuTFeIJqyfMB476Kx\r\nittTHhcCaw7j5Fp7H7Ddjc1CBqT07E2U6dD8ou2VVFwbYDvpUGGhSK191iJE\r\nllA85Gq3cyr0GKocH6ZnUb640WH3EHiEhPrRdPeMTqU1SmrH4ltS1qrh7+QY\r\nQci/zIYB1Zw5H2fKHyKj1IEbK5UJ4ulbZ9AZ19LJul7vifmjPkoJd885dvUh\r\nZ1T7TEM1t0KtvcQWuJceP99bVslavj4PrWPW+sziXZGjjgrefyq0kuZmWsRA\r\nh2orMhtkPtYUHGuvR21AqjPxRg+UvFrUXiJx3UMZPjGuVznLVtqJQfEd5JQF\r\nNgLMzScPrf40S69BknWoN6j0qdn76gSqy8H7b7hET91ZpqlhRdW7GoKMcgEe\r\nrPMd1bDXTg4UeNVdEFlM4h+tPF4RDmdDRJzv0OJCPMaKe9EWA4tBGTg25Gas\r\n0fhicijchDarJa/nrXU8+/Osc0Y4sSLQhzbeWTGJe76EOKGujeh+w2vmmgWR\r\nvH0CupXEdQmDt2aw7NxB35DBWAHRzAbnhz4=\r\n=hN9f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.35.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1677467460741_1677467501690_0.16439316038404916","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1677467462786":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1677467462786","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1677467462786","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"b787c320d575324ab8232f8e225cca6ceff844ef","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1677467462786.tgz","fileCount":7,"integrity":"sha512-nFHk2eU10U1jer6yv9rF+WlfDR7YGeerWsm00OKAVDh/3CelCnNhnhQ8il/vLbvrGmQJ0AZV9hGQFUMSsqZuBw==","signatures":[{"sig":"MEYCIQD0lXw3CGPMLcAhxTvIM5ZsmKa3FmSdWxx65nKw/OqTgAIhALj3zG88goBXqs7nYPxce+8G0qbCGI02O/iKbuWVsoFn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/B93ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOdA/9EFoQYMafALGhTyETBfuh9Yevkuor6LX3KMSRvZSdcliEphnS\r\nU9hZ3HF69dgGnDbnSMQkRrIeAlJAMoS3M8hyt7QAoleHHoSLuEnA2YZGlt0R\r\nZcYV0I5e9iyXwyZorLpkZ6TDRVnf5vPvwTreByaA2ClAWTvnuuV46cF7lQFA\r\nosqPB7sUP025TyNLBvPI3gOHoMjgQzF+MqSkkdLNqNcxAjZXPmHrlIThzmfl\r\nYfG7cfF+jrc6yinFO4zJbwc17KuojqHulPpzLRNlCXJTc8TUXzI1ijxDnMaT\r\nMeyrKOCmR+9GA3P40PC/UIVGCzmigmBhh4KGzOAtWk3lvkG25xwQt2qv/pRN\r\nBhsw+9YOy79nvRU1zlxA9aLV/Q55pjd5pNNoY8+ZPVmEmInGm01p0uL0uryF\r\nQpKQTsC59a23eE3pDZN0y2t/F5ilLaCR+CJF50uH/mtpoOGGJEfmo091QJuf\r\nsPJxrSSe6pG2FLFbp6HhLoD8m8YgKgxC/M9WJh0fr25iKI+MTNGgndB/7r9h\r\nufXZC7mYcbODaUBMBu3ODKn4bJWwxs4J4tu8AbGE7M1TuXTCz6oxc7wNETZj\r\nOSxoMOUVi197/rp52YzguZDVNn9sbgcAc24KUTgF322Xs5EbIVdp4UGRci3R\r\nh/0QI1t4MmGZVeK1A6N959xozPcfmfvThRc=\r\n=+H0C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.35.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1677467462786_1677467511310_0.9338275390002164","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1677467538586":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1677467538586","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1677467538586","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"207c6701997481034311a31ed26ddd9e5524e71d","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1677467538586.tgz","fileCount":7,"integrity":"sha512-gCqz4LGDBnGsQiWDnhwWmI+mwb2LtnQGqGhTrxfJ080ZhyHu2xD0V1hSumO/nh9k5E18C/Q6YK70Q+Jrap93+w==","signatures":[{"sig":"MEUCIFIp1hOXgvCQ0Q2yPWeiYJZJh7Xwc+09fQtOP+PlF4RXAiEA5jH1w+oUNo8QTOD75/kdbUdtoj+CO8ZnZfEDbIEdVvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/B+/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwuQ/9H0NFodCzWeELO7Ly3xq7YW3y6/GDk437loeYsZQP1wjGWubW\r\n7JixHAegVIwPrIgHcjeEp/AnfnEX/OH7bcqWucvE7L1MoriweDTADQxZ0HIt\r\n9oZDQfhpYb+OSyYCyn9ItcEVeDfkmk7XdwKjx05xI+QHnlLXX50Du37+1iD0\r\nVX0TTEP3sF0LIJI3j9g+l9fpMok6B7TSQZehWVsqFVm2tg4xQ3Lad01J7dna\r\nMtNbYQefQZJq4C5mBB0QgvCLR2mcR/92yb21kfxpU1kUSQjXYlLb7Mn5Uhrx\r\nh+Nd3p2WL9VfztoMT2zWZ5k6Pz8WRXnvYTo/AmPz7uUzYLda+GlU+LmpsVLB\r\nWQUQgXWWj22b28fT7XJSPPNbnSK+Gxfc2yF/5Swm6wPXrPFNTRyq/IdwydFb\r\nGDQq/WGd1kRYOUGhlNrON8iDHy45LgR+7v3w7WLryqnWN03oWcG88Pdrg3x2\r\nPWKo3ES8gugGsLA/wiQsTe80c/pZ52e9zzyDIvQGjLImwWSuX94/uQDFKSD2\r\nDsgBJ7Wr+2A6yZf294WZmsflAxh1imH9gEo2NG25owkZ0WcFvU9cK/8wc7ER\r\nlClKS7+ddcwR3DJbg2C/sjmrC/PXYVGjqV2a+v6p15dfZ/Xw7frbAfdgsXge\r\n4pdTULdYVSfb1Cq0FPzutj8HXa6MmKiAnfs=\r\n=Zref\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.26","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1677467538586_1677467583686_0.08417463798701141","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1677988596546":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1677988596546","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1677988596546","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"57c15f3895b963a92cc20d18c757156cdedf62a1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1677988596546.tgz","fileCount":7,"integrity":"sha512-Lqx5mjkcrJieeBIC4OBb3ASzrugGlT5PIyAq7eNd9i1cdxrZx0CImCrLHQDPR1yEn7BcpAnkIGf0OdSFw/75IA==","signatures":[{"sig":"MEYCIQCOHiSNhy/2v/c/pHF5nM5cEy3kB3DXdkG4gD727DiITQIhAOgemj10fOJorCN8hKJoBSu3aY+Q6718SwUpWt3O5nSG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBBMgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPAw/5ABRKJY6EpemkFsYPr90ZGDQwsJ4uuhzQFcXW1N0FKk2QzyOy\r\nM6uIQ/C0OwrLw0xFTNcwLorO4fu96hARhFCqajOtoal8CcjN58Y127PWI+xt\r\njPpT7Iene1HxlF/H+l1eRTWomnLmRwfYNO48KU5d+65ttfSk1Uy2Wj0OUvPv\r\nfr2pRlUYxyViPrvVf8EWdRowRI70RcfMY9Z7eLbqQdX+rZ/h5pGT6sdaqH+f\r\nwnuemu/gHhmibH+HaBIY9/+craXd2O8IY4A73yUCmx+L+n8m4Mo4lROK27Oz\r\nSz1GpW3v/4SxHpJzKc4lLfdJbqpfUDiRxTOgj8Su5TPzL/uf6IzwaTJJadsi\r\nyeLAXd/mYXlaYANcWw6zhF6mmmKB+1XvGJKMUG7wIydYqeod5YTo34D+jQz9\r\ngdj34SolG6hkizRLyzi3uW30cvrqfK2oSGKeTmGTYruj9F6k+uOExWk23+4A\r\nZUYmUnc1XIqkU/Tq/YZ1TwPXMTubSpFmGZtDu+FSE4dCTmsKzcgRqJG1WubN\r\nwtM8KkUyWgaHHyA+4iicLSPU9h4SvVcmn0Tc0Nl3uLIgEGI5y3CS2Njkcvuk\r\nhyvItZw//w+k9YKnxKJ/WlpJt+wgTfxYITqud7n8nfFoJKgCTt9V4fPM47J0\r\nSz1O/QZ+ad4MaFCeYtt4cbVPcnypQ1dXb2E=\r\n=Q1s5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1677988596546_1677988640258_0.5487720737564272","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1677988599455":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1677988599455","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1677988599455","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"d9a4d70d66eb86ca8f4534380ed330cde0698eea","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1677988599455.tgz","fileCount":7,"integrity":"sha512-Ay3uWGb/D8zzX8c5Vx0RIL7PJ0dXQ6dO6JmgBf2GB7mmAKmcQIfuecY/Yhx+U3WSVc3SjyuB3lArP+4I0yFppQ==","signatures":[{"sig":"MEQCIA2ZP9EfuSaaAtyLCL8RQgUaQMVe877rpznpLGEu+azPAiAUFIVJEAUcvJ7wNo2s6wcK+gO8qI/rxgW20Je9yqaJhg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBBMpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKAg/+KEOL+otZ38Dq3/mi9+UsJQVkbj+D3V7xdxVBNNq3k6mZeyzN\r\nq+8v4gPKM1Tr7QyETRADmuC4iy4cJY9rojIxqYlhvzuauzHT9adfdiPGEwQ4\r\nYAxL8CpKZM1kLB0gZ04498jPgrOzstuWkhDIKQDdnykoPYMOQ2ZyRmNRLUv4\r\nQrE76WbIJkkE/xlesMT3Iezeyy+4zngcTNRiXDTDCcpNrhoc1gYQo2T8O5fS\r\ntBUCybSdnLnJl5m7HD6E1yjSRqfpv4a19VVomI/bXiVluGQE+RR7x6xX+olu\r\nA4X+Ge0grjvDoq7dpZNPF+WV2ruW7o/Dk8wf9XM/+5SNepSPoic44wYCiEJA\r\nis56o9XcWvYYDuNX5CxUWRNnyDn4ZTls0VRKCfJ/AVKIonSrPLzNoHmVeuM0\r\nw/vOqiA/DtrmQziQSkxFb62n4HgbPiAuqf17qDp/8Sg0BaHbyCF6GrmzE20+\r\neHi22uWkE5B37k5DsZ2s5OrBKZlgMIxD87Ss0tuY7C3CoIoZu69y87DMHclX\r\n4+5dwfS7gTDzH74UNfq+UzKR5LjUFcxSGvngB0MzMzq0gMu/BMyMUbp5sDQe\r\nUMUshWfL/2jblyTCV3L7vdB75p0fV0OSzS+GR7NTPlUlJSc3y/JGx/n3iK+/\r\nC8s6rhDDTLhBAJ4zQUegMZsDUM0zSc9y2vs=\r\n=bNck\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1677988599455_1677988649367_0.8453746973433793","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1678676369290":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1678676369290","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1678676369290","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"050b75f5b4365416f9f60cc6c217f8b8502ebff2","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1678676369290.tgz","fileCount":7,"integrity":"sha512-aTDVDOpRq0kOXkd6f9Tx7NjkipZtCgh1vW995LhNysPifPI+2DQ8IgGK3BZo6I7xKrhfQWn6pq16XzmarIIhGw==","signatures":[{"sig":"MEUCIFJaNnrHu7R8g5bkP/axKagQ0iXlKSPXQbS0HAzJ+OmeAiEAth7m7de4GnHv3NQtsiyVH82XkkTPkgGbjC8aM9ITJyA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDpG8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmquEQ//Qgw6fz1C3Y4i+FBaDd6qitxYUgO8wgSLKGoHiJSOv3zHrlVy\r\nOjxfU/pobugzuFQDlZffnHI+8anK2AXpl8RxN1A5zqc1zyfFCqNO6whX2KZB\r\nyfozniZUNqFqKr6qp3prZOmhuaa3rgVZR6f01NfxKj7oLmYwq5x65EQ3yl68\r\neHs6zIpFnoLkphbjGrmrYnOk+nBUwuELqpYh8Do3B0xiQgvqKaYY2on2sDnS\r\nxQlc2artsB/KjyF2KdRCSv94CkG+c7+pTyVTne/usulw8GYTokeijUGJGxTA\r\n/1NBqnxgovBPuAkani7gFwzPy1hURlBl/1nIexeBZTzdIctqT/CwwMBR74FY\r\nASV/m12Al8XGFDPoeweWWTYw8wyGmDm8SuT9fH6sgx9XNSJyhfDTRENeJOGd\r\n4M0WJgnRvbJ5wClsR1N/zH+7LtDC72TWIWJT4TWAoBbQdKdwU7jIecyPFETk\r\nvuSQTm3jgK1Lr19WBg2GHCxJYxcBTh87z6lLzwkxcLWmUwOcU8PN16gB5CDW\r\n8s8+T954v4+HQ+AYUmlZWK6AtG9DSOG/OjQ7snZ9etv9md4SA4lp4T3zRSao\r\nwhkS7jTetJHgNYXAo/q3y5XmwWOXOiRMXEc91wAYscII5w+TLaE140XGToEC\r\naFmqeBQdLB7nFP/6GV/VHAuE6sykeYquE/g=\r\n=rQ9F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.36.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1678676369290_1678676411814_0.740554999102726","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1679021949372":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1679021949372","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1679021949372","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"22043cc342ca2b728126ef0914019f53760a31ad","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1679021949372.tgz","fileCount":7,"integrity":"sha512-4+rIrknWqBz906Y0fJDuPMNh/PfPeP1p9zi+PnxCfB4xK3P1dDPGK1PFxtsXQQ3qPsFK40VohICZN/1/1XA2vA==","signatures":[{"sig":"MEUCIQDSOScdcM/7pwba6AZApJENyLR7pZ/Wn9tQcmBJhOMplAIgevzM+3HUcNos5c3GCWnN1SGZYvnaEkWgcf+JcQsB1lc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkE9eyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5cw/+JIUIdXIhori8BzNcQGtC4bCeTAoIWDwFl4emXliM5LDzaydc\r\neyYBR3ObmpRtWHbtqhjNgu2NoM5JiZSWSA82Ha+hmrF6Zsaqe68ckJVb6L6x\r\nWNSrPyCOk2YydlNoNEpR4rENOjxZI4R+AvLJ550x5UFGwoipMjGr6yuegWU/\r\nR8WN+cSLd1nlKGNWXRoJJjXCKq4yTL74BzNQZrrqxhZQuF6U96dqYnL1KPq+\r\nrkpKA5TCqR9JDxstIOBG842Ke+gNbuHYfn4dG2KqD5CWRoKUX8IIj5dgmxH8\r\nd99iodJk1T2gGH/iWjaWpBcAw45BnzBt+dwojS/zTKaz/lSZEO6M1BTwB24w\r\nG6DdVADEiE6YSTLsPFt5dJBx4OrWUDL+iWnOasNpLlXNk7TYHHWz4iEXvqTJ\r\ntuLLStYLvxfyyNxtkkXQNViN2GlzHsNA4klClhODhus+qnvIWgziDSVw2sUU\r\nMTbWniBtaPF5j5GHMipX+Q9xxO94yD1NI3xOVh9aGP0zVmKUVv1pTfciDjav\r\nOusOfEz4/b64GP7cGTND+mgkR7Ccrwil+TIpBEeRxVmzl+vxo8aU/BB9lXGc\r\nAzWLCIlgSzapPorheflgiwdKUyUXt1PQB1p6k6tUbfnT3QGSf9qHMz9tE93L\r\nIJgXEQ38DOxXCvtGt8tXnl/2W2AbRXDiXLo=\r\n=Odfr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.27","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1679021949372_1679022002357_0.828793817174466","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1679021951344":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1679021951344","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1679021951344","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"46dd9001162cb2742256007ae311545c185d4749","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1679021951344.tgz","fileCount":7,"integrity":"sha512-ofyU3X1+GAfZneNpMN1AAr6qjc8DTrI4vrHUoaV/fNaRjuzf93WUau3DvfItitaYjW3VCeHZhLJ9LQ5H7vyXnQ==","signatures":[{"sig":"MEUCIGQTPr9A0z6Y+mqL8cLWYLoHLKXicVbPJ637G5SMG0D4AiEA8Nd7Y/TVPjITYLrH5kiJ3Wtg7O6eNZwxp/0o9sYz49U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkE9e6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/Lw//TCmHhQcnFc8eT+8xbb++XltGPrNR7xNdb63any034jMcGP0H\r\nGFLyQNZ8DXB6ihjsliKhrHgx6M/DQVYob+H1hvMpLqAVNkZHyCsaaBhSNd3r\r\ncXiGZKlH/17ymS+zsrt90Tv1A2cwuqgFfxlvnkqmzX9MCJgphwxeBHjC5R5O\r\nCrmRNEQpFGwDo7TEVNlgSsCFOHDHCP/82me8Inuw4GhNThvnV0bE/ewX5FUh\r\nbA1w76UmsCm7DHbJqkkJjgm3/pr+9BC7eExKFVKgQRLj05hqvhjBRMe+/5W7\r\n5i3ozCsN2XzpsNW+v+uZx328rLh6get3V3dxRXDDEzH1gen4GXzt6nLUCJ3x\r\nJSRqOLoWhb12HE53oUANePko5gDlx4VMCQ7nRKDUcrlJ3U/ux4/giPOoS4X3\r\n88/T5nr3M2iAXisbKA+3RtlF0UcwR+7zEolKtFLrqbrjVBGjDI5PWU3yE8Jl\r\ndcgFf32zPYKOrZ5MAIVVjpELUbEekwFBoORwFdNWsPeJk6M40lzJ34pg/lxr\r\nWWhlAq4MV63s3QDzvOMTHrlE6FovXZ4+2/UIat5VDCwbD2T7+brpxEWjqGQC\r\ngqJruAoXRjHEbNuXK7DA/dUGuv22W99ik6Y0fwVYhHXUzKjVIZx/mMRE8OGR\r\n8wRlpw40H2HSA9S6E4SkRHLVQWGORCCpbhg=\r\n=u4zs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.27","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1679021951344_1679022010232_0.029373124946693085","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1679281084597":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1679281084597","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1679281084597","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"c89885287811e479af01adc945ed768151238da1","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1679281084597.tgz","fileCount":7,"integrity":"sha512-wlerSzQFvGzfadfoBSrw3b9CUtOx3Ku6EgjcpH3xGrAnNZumeBi6ZbdsiAMkxJr8ByCZ8yoSgi4uWqvLeR51CA==","signatures":[{"sig":"MEUCIQD/AzGT6jlep/Hgd5MX9UjqLrVbWP5r1twCx+d2iAKZiQIgazEd8U+pliClHdu2Jc6360eEWKcjzEVRMc6LKrkWOjo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkF8voACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9Gw/9Hn9DOi+TwbP+g2xHuvmLo166o1UXtodVtEa2uFm9tYBkNsiT\r\n3jnjcgciL388o1/h3DC9pm8sH5UAiPPE6Ab16fSult1wpFuax5HipoJ2ld8D\r\naSnEPR1lXJOiFLdhqKtLrnxHvrv+FFXQCc3VDUweoauSoHBpaMeCSDQIHMtZ\r\nidlfFNCpwOcNTDWk5NBkKCvkSNYd1x4ToyZj9eCu7+w5pBoQlTWLR/Rb4uOi\r\nu4cg4ICsyijOwZZ8HQg5qMqFz0av4iVi5XF41cywe19Ff7s8eHVsCti5KX1b\r\nP9yxP1BL7W8mt5+vbH7+jtVMbPnZiIQNxHYNYg2mzbgjF/h6v7h+SJ3DX+UR\r\nIxKVb5f/XwJgtEo0Q9abIgp3QGtCo41JxFKh7yZ4wSABDvukm5z2YXEei/ac\r\nqlXF5zfATzHWiJmACc1QvrfDCvWgnLKY/hFHoKF5YMJ0xHHOMyH2DwlnzgaB\r\n6AATMIAklfUgxPrQTAmFpJSyFg9RKa7wo7U6mgpTe/I7wUNKPfu4uEgQLFDF\r\nqXBJUsf1mtaYNfk07h2R0JVdAUx0hmy2un7EyhhGnwyS5Gd8YwjPuPpPr0UG\r\nAmXxn1NmewGRI5YoW+Iy/65nEPeyfcripmbrfGPqgarcC8edJ4vgUkBQx+BL\r\n6HDzk+wF6kNg6jl1iAGBYQeEmoRWTdEz+Q8=\r\n=e64j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^7.27.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.23.28","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1679281084597_1679281128491_0.8215029936648783","host":"s3://npm-registry-packages"}},"1.1.4-canary-08d62d2-1680058818827":{"name":"@iadvize-oss/store-react","version":"1.1.4-canary-08d62d2-1680058818827","keywords":["iAdvize"],"author":{"name":"iAdvize developers"},"license":"MIT","_id":"@iadvize-oss/store-react@1.1.4-canary-08d62d2-1680058818827","maintainers":[{"name":"etiennerd","email":"rouillard.etienne@gmail.com"},{"name":"jules.trehorel","email":"jules.trehorel@iadvize.com"},{"name":"cffparisot","email":"cecile.parisot@iadvize.com"},{"name":"davidiadvize","email":"david.bonnemaison@iadvize.com"},{"name":"ltaloc","email":"loic.taloc@iadvize.com"},{"name":"mguihal.iadvize","email":"maxime.guihal@iadvize.com"},{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},{"name":"euphocat","email":"nicolas.baptiste@gmail.com"}],"homepage":"https://github.com/iadvize/store-library#readme","bugs":{"url":"https://github.com/iadvize/store-library/issues"},"dist":{"shasum":"46d57a89d814cb6eec56f3bedf9659d2bc52d5eb","tarball":"https://registry.npmjs.org/@iadvize-oss/store-react/-/store-react-1.1.4-canary-08d62d2-1680058818827.tgz","fileCount":7,"integrity":"sha512-K8XcfWOTrK3mkrkaweY0I7Oln0Xh321ITP1f+MICjDLADpZ5FwQYoK394+ikOKkJxzStRY1ieHbNnNqGQoFxqg==","signatures":[{"sig":"MEUCIG5GBIE59JMrFxUd52QmVI+WQaIBzNINBLO/ECDSYD/9AiEA2mEZ5RVvqzv89Byu5Jr8MTSv3AXr8IbqidKbANQo7YM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkI6nuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIvg//RitCY3xO3VlYkGdDRrlHVmSQqj7A5zk7YVqjmhPxJxNoaeL9\r\ndZM3ms8ttAh3TPdHVkDzI3JVrADz+4YLfb2sv1Fl7B+nY4zwYhf4fieCuxBd\r\nf+A/HFIDFeL8I7Tz3lHTgmEBiw+gyASNLXJh8F/A7GrTvfkhGcJrOr5DlRiD\r\nTczXSFT3bCGCWRou08HbfON4dcarmbJjXOTyMx05xqCFNQoNY3I21ih0pNgE\r\nifqxleF+JRLcdvnkQU6xXGBksrt74mTWrXbZL4DtClZZx6Fqvsx3t3bisthr\r\nUteR3GewMVNypepfswhLELpdhREqxjuficGz6GFuz8/2RExVvMx/uXTatjtq\r\nvWzyrT4JOrvsEb326MVimR1AVX16SxKE/eGKcMyncrKCjGKw+mQLjVYSv+MG\r\nyGNQhd+AqRnN3YIed3zNxMTwj1/3QDxVy3gZRiCkL7ZfryG5nOmQwpMFmFgn\r\nYsLI9JdRHkkZYxVnHpeKN/1dMjMXp5qEm4Jml5uW0Xirg3tSoVrPCZPD3tDF\r\nRi1QNkhtt9tnsKKGrIDtSqQuC38HH8tPs1Hs5jizAbeUFaOeh6jpsiS5jR91\r\nrG6HVOhzjE07p6jHTMcUmuaeFbnA9al5u3+qpR59k4igbfOHXxcil+jTRlhY\r\nsEcbYbhTXpW02bcdr9oXXilizeru04FU07g=\r\n=4q/Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"esm/index.js","readme":"@iadvize/store-react\n====================\n\nThis the React binding library for `@iadvize/store`, a lightweight Javascript\nstore library.\n\n[📖 Documentation](https://iadvize.github.io/store-library/packages/store-react/)\n\n# Installation \n\n```\nnpm add react @iadvize-oss/store @iadvize-oss/store-react\n```\n\n`react` and `@iadvize-oss/store` are peer dependencies\n\n# Usage\n\nIt's easy to use `@iadvize/store` with React thanks to hooks exposed by\n`@iadvize/store-react`.\n\n## `useState`\n\nHook to get store's state. Will subscribe to change and cause rerender.\n\n```\nuseState<State>(store: Store<State>, options?: Options<State>) => State\n```\n\n**Params**\n\n- `store: Store<State>` - The store\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nfunction Component() {\n  const state = useState(store);\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `createStateHook`\n\nUse `createStateHook` to create a `useState` hook specific to a store.\n\n```\ncreateStateHook<State>(getStore: () => Store<State>): (options?: Options<State>) => State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => 2)(); \n\nconst useState = createStateHook(() => store);\n\nfunction Component() {\n  const state = useState();\n\n  return <p>{state}</p>; // Will return <p>2</p>\n}\n```\n\n## `useSelector`\n\nHook to get store's state and apply a selector on it. Will subscribe to change\nand cause rerender.\n\n```\nuseSelector<State, SubState>(\n  selector: (state: State) => SubState,\n  store: Store<State>,\n  options: Options<SubState> = {},\n): SubState\n```\n\n**Params**\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `store: Store<State>` - The store.\n\n- `options: Options<SubState>` - Optional. See `Options` below.\n\n**Returns**\n\n`SubState` - The result of `selector` over state \n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value, store);\n\n  return <p>{subState}</p> // Will return <p>2</p>\n}\n```\n\n## `createSelectorHook`\n\nUse `createSelectorHook` to create a `useSelector` hook specific to a store.\n\n```\ncreateSelectorHook<State>(getStore: () => Store<State>): (\n  selector: (state: State) => SubState,\n  options?: Options<State>,\n): State\n```\n\n**Params**\n\n- `getStore: () => Store<State>` - A function returning the store.\n\n- `selector: (state: State) => SubState` - Selector over state.\n\n- `options: Options<State>` - Optional. See `Options` below.\n\n**Returns**\n\n`State` - The full store state\n\n**Example**\n\n```typescript\nconst store = Store.create(() => ({ value: 2 }))();\n\nconst useSelector = createSelectorHook(store);\n\nfunction Component() {\n  const subState = useSelector(({ value }) => value);\n\n  return <p>{subState}</p>; // Will return <p>2</p>\n}\n```\n\n## `Options<State>`\n\n```typescript\ntype Options<State> = Partial<{\n  equals: (currentState: State, nextState: State) => boolean;\n}>;\n```\n\nWhen the stores change, `useSelector` and `useState` hooks only force a\nre-render if the hook result is different than the last result.\n\nYou can provide your own `equals` function that should return true if\n`currentState` is the same as `nextState`. Default is strict equality (`===`).\n\nProviding a shallow equality function is a common pattern when the\n`useSelector` or `useState` hooks return a new object object every time, like in\nthis example:\n\n```typescript\nimport { shallowEqual } from 'somelib';\n\ntype Todo = {\n  done: boolean;\n  label: string;\n};\n\ntype State = Todo[];\n\nconst store: Store<State> = ...;\n\nfunction pendingDoneSelector(state: state) { // returns a new object every time\n  return {\n    pending: state.filter(({ done }) => !done),\n    done: state.filter(({ done }) => done),\n  };\n}\n\nfunction Component() {\n  // with the shallowEqual function, the selector will not force a re-render\n  // when pendingDoneSelector returned object content doesn't change, even if\n  // it's not strictly the same reference\n  const state = useSelector(pendingDoneSelector, store, { equals: shallowEqual });\n\n  return ...\n}\n```\n","private":false,"scripts":{"docs":"typedoc src/index.ts","build":"rm -rf dist esm && rollup -c","lint:js":"eslint . --ext .js,.jsx,.ts,.tsx,.d.ts --cache","test:js":"jest --coverage"},"_npmUser":{"name":"iadvize-bot","email":"npm-iadvize-oss@iadvize.com"},"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"_npmVersion":"6.14.18","description":"React binding for @iadvize-oss/store","directories":{},"sideEffects":false,"_nodeVersion":"14.21.3","dependencies":{"fp-ts":"^2.10.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","react":"^17.0.2","tslib":"^2.2.0","eslint":"^8.37.0","rollup":"^2.50.5","ts-jest":"^27.0.2","typedoc":"^0.21.0","typescript":"4.3.5","@types/jest":"^26.0.23","@iadvize-oss/store":"^1.1.1","react-test-renderer":"^17.0.2","rollup-plugin-terser":"^7.0.2","@rollup/plugin-commonjs":"^19.0.0","rollup-plugin-multi-input":"^1.3.1","rollup-plugin-typescript2":"^0.30.0","@iadvize-oss/eslint-config":"^2.2.0","@rollup/plugin-node-resolve":"^13.0.0","@testing-library/react-hooks":"^7.0.0","@iadvize-oss/eslint-config-jest":"^1.2.1"},"peerDependencies":{"react":"^16.14.0 || ^17.0.0","@iadvize-oss/store":"*"},"_npmOperationalInternal":{"tmp":"tmp/store-react_1.1.4-canary-08d62d2-1680058818827_1680058862416_0.1491880187257617","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-07-03T19:33:07.205Z","modified":"2025-10-22T09:22:17.452Z","0.0.0-canary-ed1b139-1593804726082":"2020-07-03T19:33:07.551Z","0.1.0":"2020-07-03T19:37:35.278Z","0.1.0-canary-9c7bc07-1593857074870":"2020-07-04T10:05:21.801Z","0.1.0-canary-83648eb-1593858863121":"2020-07-04T10:38:09.702Z","0.1.1-beta.0":"2020-07-04T10:41:24.111Z","0.1.1-beta.0-canary-e8b03b1-1593861451378":"2020-07-04T11:18:26.153Z","0.1.1-beta.0-canary-e8b03b1-1593861450278":"2020-07-04T11:18:40.465Z","0.1.1-beta.0-canary-220b3ff-1593927129615":"2020-07-05T05:32:57.942Z","0.1.1-beta.0-canary-220b3ff-1593927131093":"2020-07-05T05:33:06.974Z","0.1.1-beta.0-canary-a330f80-1594063522415":"2020-07-06T19:26:21.084Z","0.1.1-beta.0-canary-a330f80-1594063521862":"2020-07-06T19:26:28.099Z","0.1.1-beta.0-canary-87b3c83-1594069928335":"2020-07-06T21:12:59.827Z","0.1.1-beta.0-canary-87b3c83-1594069928529":"2020-07-06T21:13:03.882Z","0.1.1-beta.0-canary-788c0d2-1594136120056":"2020-07-07T15:36:08.277Z","0.1.1-beta.0-canary-788c0d2-1594136117240":"2020-07-07T15:36:25.077Z","0.1.1-beta.0-canary-f24e23c-1594150961210":"2020-07-07T19:43:33.112Z","0.1.1-beta.0-canary-f24e23c-1594150963381":"2020-07-07T19:43:41.078Z","0.1.1-beta.0-canary-a320990-1594151277286":"2020-07-07T19:48:52.427Z","0.1.1-beta.0-canary-c67202f-1594151474211":"2020-07-07T19:52:02.786Z","0.1.1-beta.0-canary-6ac0479-1594332969955":"2020-07-09T22:17:14.570Z","0.1.1-beta.0-canary-a9f7155-1594587847970":"2020-07-12T21:05:10.844Z","0.1.1-beta.0-canary-a9f7155-1594587848734":"2020-07-12T21:05:24.704Z","0.1.1-beta.0-canary-9e7c1c2-1594594073995":"2020-07-12T22:48:47.203Z","0.1.1-beta.0-canary-bf081c2-1594637333145":"2020-07-13T10:49:49.826Z","0.1.1-beta.0-canary-bf081c2-1594637332560":"2020-07-13T10:49:58.723Z","0.1.1-beta.0-canary-8fadab0-1594683878157":"2020-07-13T23:45:30.462Z","0.1.1-beta.0-canary-8fadab0-1594683874718":"2020-07-13T23:45:47.198Z","0.1.1-beta.0-canary-35c15ec-1594684448055":"2020-07-13T23:54:56.154Z","0.1.1-beta.0-canary-35c15ec-1594684448165":"2020-07-13T23:55:00.538Z","0.1.1-beta.0-canary-219ae75-1594712071383":"2020-07-14T07:35:32.842Z","0.1.1-beta.0-canary-0df3fad-1594712288859":"2020-07-14T07:39:00.856Z","0.1.1-beta.0-canary-e707588-1594851490230":"2020-07-15T22:19:06.190Z","0.1.1-beta.0-canary-e707588-1594851489384":"2020-07-15T22:19:16.451Z","0.1.1-beta.0-canary-e707588-1594851494417":"2020-07-15T22:19:21.174Z","0.1.1-beta.0-canary-ee99206-1594929166597":"2020-07-16T19:53:45.621Z","0.1.1-beta.0-canary-ee99206-1594929160744":"2020-07-16T19:54:01.302Z","0.1.1-beta.0-canary-74aaf2e-1594963764192":"2020-07-17T05:30:09.598Z","0.1.1-beta.0-canary-74aaf2e-1594963764968":"2020-07-17T05:30:24.878Z","0.1.1-beta.0-canary-687982a-1595047573946":"2020-07-18T04:47:05.444Z","0.1.1-beta.0-canary-687982a-1595047574980":"2020-07-18T04:47:12.386Z","0.1.1-beta.0-canary-6719245-1595052611845":"2020-07-18T06:11:05.378Z","0.1.1-beta.0-canary-49d093f-1595087830249":"2020-07-18T15:57:56.161Z","0.1.1-beta.0-canary-49d093f-1595087831358":"2020-07-18T15:58:03.857Z","0.1.1-beta.0-canary-946dd6f-1595099943103":"2020-07-18T19:19:47.786Z","0.1.1-beta.0-canary-946dd6f-1595099945070":"2020-07-18T19:19:55.580Z","0.1.1-beta.0-canary-9a907b3-1595100304446":"2020-07-18T19:26:04.650Z","0.1.1-beta.0-canary-9a907b3-1595100298936":"2020-07-18T19:26:28.690Z","0.1.1-beta.0-canary-cdd721a-1595100650802":"2020-07-18T19:31:40.301Z","0.1.1-beta.0-canary-fe480e3-1595100805685":"2020-07-18T19:34:12.110Z","0.1.1-beta.0-canary-49657eb-1595101034703":"2020-07-18T19:38:03.455Z","0.1.1-beta.0-canary-e895a3f-1595343763826":"2020-07-21T15:03:35.465Z","0.1.1-beta.0-canary-e895a3f-1595343763478":"2020-07-21T15:03:40.967Z","0.1.1-beta.0-canary-7b827c5-1595349564001":"2020-07-21T16:40:12.231Z","0.1.1-beta.0-canary-a4d9871-1595395428098":"2020-07-22T05:24:32.144Z","0.1.1-beta.0-canary-a4d9871-1595395428990":"2020-07-22T05:24:40.832Z","0.1.1-beta.0-canary-4fcc0a5-1595399873269":"2020-07-22T06:38:55.865Z","0.1.1-beta.0-canary-ab812f9-1595400544875":"2020-07-22T06:49:51.175Z","0.1.1-beta.1":"2020-07-22T06:59:05.333Z","0.1.1-beta.1-canary-268faad-1595427111575":"2020-07-22T14:12:44.352Z","0.1.1-beta.1-canary-268faad-1595427108054":"2020-07-22T14:13:03.562Z","0.1.1-beta.1-canary-b048df6-1595498106720":"2020-07-23T09:55:52.752Z","0.1.1-beta.1-canary-b048df6-1595498111113":"2020-07-23T09:56:11.696Z","0.1.1-beta.1-canary-cb85473-1595522811002":"2020-07-23T16:47:42.207Z","0.1.1-beta.1-canary-cb85473-1595522818808":"2020-07-23T16:47:46.919Z","0.1.1-beta.1-canary-cb85473-1595522813637":"2020-07-23T16:47:59.392Z","0.1.1-beta.1-canary-882545e-1595523519771":"2020-07-23T16:59:40.426Z","0.1.1-beta.1-canary-9b1cbdf-1595530788594":"2020-07-23T19:00:42.027Z","0.1.1-beta.1-canary-9b1cbdf-1595530784056":"2020-07-23T19:01:49.939Z","0.1.1-beta.1-canary-a4a5e05-1595536792160":"2020-07-23T20:40:42.085Z","0.1.1-beta.1-canary-26b96f0-1595804048643":"2020-07-26T22:54:55.571Z","0.1.1-beta.1-canary-26b96f0-1595804050942":"2020-07-26T22:54:59.612Z","0.1.1-beta.1-canary-0b2d17c-1595927595601":"2020-07-28T09:14:15.528Z","0.1.1-beta.1-canary-0b2d17c-1595927601745":"2020-07-28T09:14:32.940Z","0.1.1-beta.1-canary-1e2f23e-1596105936555":"2020-07-30T10:46:29.782Z","0.1.1-beta.1-canary-1e2f23e-1596105937714":"2020-07-30T10:46:45.149Z","0.1.1-beta.1-canary-ea3b198-1596106571393":"2020-07-30T10:56:55.909Z","0.1.1-beta.1-canary-1633b0f-1596109345438":"2020-07-30T11:43:19.888Z","0.1.1-beta.1-canary-1633b0f-1596109355406":"2020-07-30T11:43:45.757Z","0.1.1-beta.1-canary-ee695ef-1596109897315":"2020-07-30T11:52:22.482Z","0.1.1-beta.1-canary-cd259ee-1596173664887":"2020-07-31T05:35:12.127Z","0.1.1-beta.1-canary-cd259ee-1596173666470":"2020-07-31T05:35:20.546Z","0.1.1-beta.1-canary-48be87b-1596193300833":"2020-07-31T11:02:34.433Z","0.1.1-beta.1-canary-48be87b-1596193302906":"2020-07-31T11:03:33.495Z","0.1.1-beta.1-canary-1d8aa8d-1596238649617":"2020-07-31T23:38:29.278Z","0.1.1-beta.1-canary-1d8aa8d-1596238645069":"2020-07-31T23:38:36.623Z","0.1.1-beta.1-canary-013b024-1596406652561":"2020-08-02T22:18:22.705Z","0.1.1-beta.1-canary-d123c5b-1596492928367":"2020-08-03T22:16:12.771Z","0.1.1-beta.1-canary-9aa48e6-1596561585819":"2020-08-04T17:20:32.002Z","0.1.1-beta.1-canary-9aa48e6-1596561585173":"2020-08-04T17:20:39.469Z","0.1.1-beta.1-canary-b8c1436-1596665708970":"2020-08-05T22:15:54.076Z","0.1.1-beta.1-canary-1dd6b58-1596674114085":"2020-08-06T00:36:07.994Z","0.1.1-beta.1-canary-1dd6b58-1596674112399":"2020-08-06T00:36:25.521Z","0.1.1-beta.1-canary-93a0e35-1596752056694":"2020-08-06T22:15:06.869Z","0.1.1-beta.1-canary-b784ec4-1596756885858":"2020-08-06T23:35:28.544Z","0.1.1-beta.1-canary-b784ec4-1596756891650":"2020-08-06T23:35:39.691Z","0.1.1-beta.1-canary-d3cc6be-1596828307719":"2020-08-07T19:25:54.559Z","0.1.1-beta.1-canary-d3cc6be-1596828310662":"2020-08-07T19:26:12.631Z","0.1.1-beta.1-canary-2be6722-1596831524324":"2020-08-07T20:19:38.806Z","0.1.1-beta.1-canary-2be6722-1596831524356":"2020-08-07T20:19:54.428Z","0.1.1-beta.1-canary-a341533-1596934262852":"2020-08-09T00:52:08.481Z","0.1.1-beta.1-canary-a341533-1596934265181":"2020-08-09T00:52:12.322Z","0.1.1-beta.1-canary-b71e0c0-1596978463563":"2020-08-09T13:08:39.475Z","0.1.1-beta.1-canary-b71e0c0-1596978466303":"2020-08-09T13:08:47.806Z","0.1.1-beta.1-canary-350c199-1597013725192":"2020-08-09T22:56:09.765Z","0.1.1-beta.1-canary-c5537e2-1597013741274":"2020-08-09T22:56:29.379Z","0.1.1-beta.1-canary-26dc72f-1597044205387":"2020-08-10T07:24:28.040Z","0.1.1-beta.1-canary-f28ef59-1597044217360":"2020-08-10T07:24:36.290Z","0.1.1-beta.1-canary-2674a71-1597044242498":"2020-08-10T07:24:54.470Z","0.1.1-beta.1-canary-d5eddf5-1597044403901":"2020-08-10T07:27:48.354Z","0.1.1-beta.1-canary-4e267c4-1597044440190":"2020-08-10T07:28:10.841Z","0.1.1-beta.1-canary-0cccbaa-1597044443293":"2020-08-10T07:28:24.088Z","0.1.1-beta.1-canary-39d837b-1597044562123":"2020-08-10T07:30:20.799Z","0.1.1-beta.1-canary-8699630-1597044578217":"2020-08-10T07:30:32.186Z","0.1.1-beta.1-canary-48ea93c-1597044579585":"2020-08-10T07:30:46.275Z","0.1.1-beta.1-canary-c3dd476-1597044773499":"2020-08-10T07:34:02.149Z","0.1.1-beta.1-canary-2cd0c51-1597044809515":"2020-08-10T07:34:19.113Z","0.1.1-beta.1-canary-86f0b75-1597044974749":"2020-08-10T07:37:02.746Z","0.1.1-beta.1-canary-0005a1b-1597044988055":"2020-08-10T07:37:34.502Z","0.1.1-beta.1-canary-cd63221-1597045164274":"2020-08-10T07:40:07.898Z","0.1.1-beta.1-canary-65bd2a2-1597045171786":"2020-08-10T07:40:42.781Z","0.1.1-beta.1-canary-abc2b41-1597045386761":"2020-08-10T07:43:56.025Z","0.1.1-beta.1-canary-061de1e-1597095764112":"2020-08-10T21:43:43.291Z","0.1.1-beta.1-canary-061de1e-1597095763946":"2020-08-10T21:44:05.390Z","0.1.1-beta.1-canary-0b8a3cf-1597181239052":"2020-08-11T21:28:05.403Z","0.1.1-beta.1-canary-0b8a3cf-1597181240320":"2020-08-11T21:28:20.438Z","0.1.1-beta.1-canary-bacc685-1597288656522":"2020-08-13T03:18:23.060Z","0.1.1-beta.1-canary-bacc685-1597288656453":"2020-08-13T03:18:41.860Z","0.1.1-beta.1-canary-5084a75-1597361127931":"2020-08-13T23:26:11.815Z","0.1.1-beta.1-canary-5084a75-1597361125762":"2020-08-13T23:26:27.223Z","0.1.1-beta.1-canary-4af82d8-1597369491859":"2020-08-14T01:45:46.621Z","0.1.1-beta.1-canary-4af82d8-1597369493904":"2020-08-14T01:46:04.360Z","0.1.1-beta.1-canary-dfb04cf-1597388968821":"2020-08-14T07:10:17.264Z","0.1.1-beta.1-canary-e40839f-1597389143397":"2020-08-14T07:13:13.727Z","0.1.1-beta.1-canary-aed1a3c-1597400312928":"2020-08-14T10:19:50.661Z","0.1.1-beta.1-canary-aed1a3c-1597400310359":"2020-08-14T10:20:30.709Z","0.1.1-beta.1-canary-732d4e4-1597449686868":"2020-08-15T00:02:13.166Z","0.1.1-beta.1-canary-732d4e4-1597449692034":"2020-08-15T00:02:23.751Z","0.1.1-beta.1-canary-38da98f-1597457626327":"2020-08-15T02:14:33.186Z","0.1.1-beta.1-canary-38da98f-1597457773395":"2020-08-15T02:17:17.909Z","0.1.1-beta.1-canary-d158b76-1597467256217":"2020-08-15T04:55:02.465Z","0.1.1-beta.1-canary-d158b76-1597467256157":"2020-08-15T04:55:10.418Z","0.1.1-beta.1-canary-1427c1f-1597553668258":"2020-08-16T04:55:11.295Z","0.1.1-beta.1-canary-1427c1f-1597553666776":"2020-08-16T04:55:28.344Z","0.1.1-beta.1-canary-f9d50eb-1597557860138":"2020-08-16T06:05:20.824Z","0.1.1-beta.1-canary-f9d50eb-1597557955744":"2020-08-16T06:06:54.419Z","0.1.1-beta.1-canary-c50c149-1597607686255":"2020-08-16T19:55:37.472Z","0.1.1-beta.1-canary-c50c149-1597607688237":"2020-08-16T19:55:47.361Z","0.1.1-beta.1-canary-b9d2578-1598079215202":"2020-08-22T06:54:19.792Z","0.1.1-beta.1-canary-b9d2578-1598079215488":"2020-08-22T06:54:34.623Z","0.1.1-beta.1-canary-3045e69-1598101829116":"2020-08-22T13:11:37.433Z","0.1.1-beta.1-canary-3045e69-1598101873920":"2020-08-22T13:12:12.901Z","0.1.1-beta.1-canary-3f0e2dd-1598223404321":"2020-08-23T22:57:27.308Z","0.1.1-beta.1-canary-fa383a0-1598343690696":"2020-08-25T08:22:22.164Z","0.1.1-beta.1-canary-fa383a0-1598343690906":"2020-08-25T08:22:37.962Z","0.1.1-beta.1-canary-f685de9-1598508857621":"2020-08-27T06:15:05.004Z","0.1.1-beta.1-canary-f685de9-1598508857310":"2020-08-27T06:15:12.313Z","0.1.1-beta.1-canary-43998c9-1598510988546":"2020-08-27T06:50:33.748Z","0.1.1-beta.1-canary-43998c9-1598510985256":"2020-08-27T06:50:40.098Z","0.1.1-beta.1-canary-1f873e9-1598592514728":"2020-08-28T05:29:22.539Z","0.1.1-beta.1-canary-1f873e9-1598592511062":"2020-08-28T05:29:38.211Z","0.1.1-beta.1-canary-16aa897-1598596093522":"2020-08-28T06:29:06.296Z","0.1.1-beta.1-canary-ba2da21-1598708175439":"2020-08-29T13:37:05.974Z","0.1.1-beta.1-canary-ba2da21-1598708177538":"2020-08-29T13:37:21.006Z","0.1.1-beta.1-canary-4b7dcc5-1598710293118":"2020-08-29T14:12:35.305Z","0.1.1-beta.1-canary-4b7dcc5-1598710296407":"2020-08-29T14:12:54.552Z","0.1.1-beta.1-canary-a3dfd86-1598712177076":"2020-08-29T14:43:50.073Z","0.1.1-beta.1-canary-a3dfd86-1598712177957":"2020-08-29T14:43:53.612Z","0.1.1-beta.1-canary-3a9d2e6-1598814032056":"2020-08-30T19:01:33.764Z","0.1.1-beta.1-canary-e3b2932-1598814029047":"2020-08-30T19:02:03.266Z","0.1.1-beta.1-canary-18404d6-1598814233958":"2020-08-30T19:04:44.717Z","0.1.1-beta.1-canary-5fdf004-1598814249187":"2020-08-30T19:05:02.822Z","0.1.1-beta.1-canary-6de811d-1598814435697":"2020-08-30T19:08:10.112Z","0.1.1-beta.1-canary-4c9751b-1598814444759":"2020-08-30T19:08:25.237Z","0.1.1-beta.1-canary-a96ac93-1598814662053":"2020-08-30T19:11:56.198Z","0.1.1-beta.1-canary-4242507-1598814660948":"2020-08-30T19:12:11.550Z","0.1.1-beta.1-canary-67a6538-1598814827908":"2020-08-30T19:14:47.666Z","0.1.1-beta.1-canary-f852ff8-1598814843668":"2020-08-30T19:15:05.453Z","0.1.1-beta.1-canary-6ab5d46-1598815061481":"2020-08-30T19:18:37.912Z","0.1.1-beta.1-canary-1dcd34c-1598815075787":"2020-08-30T19:18:57.699Z","0.1.1-beta.1-canary-6366fa9-1598815259024":"2020-08-30T19:21:50.756Z","0.1.1-beta.1-canary-b8ce41c-1598968813430":"2020-09-01T14:01:13.226Z","0.1.1-beta.1-canary-b8ce41c-1598968814600":"2020-09-01T14:01:22.987Z","0.1.1-beta.1-canary-a065ba4-1598973280681":"2020-09-01T15:15:38.652Z","0.1.1-beta.1-canary-a065ba4-1598973288208":"2020-09-01T15:16:03.963Z","0.1.1-beta.1-canary-3066bf1-1599031361406":"2020-09-02T07:23:36.940Z","0.1.1-beta.1-canary-3066bf1-1599031365370":"2020-09-02T07:24:41.208Z","0.1.1-beta.1-canary-ce99c2e-1599067153489":"2020-09-02T17:20:02.684Z","0.1.1-beta.1-canary-ce99c2e-1599067155258":"2020-09-02T17:20:14.062Z","0.1.1-beta.1-canary-3fe43a9-1599115250298":"2020-09-03T06:41:41.678Z","0.1.1-beta.1-canary-43d07cf-1599145637997":"2020-09-03T15:08:19.364Z","0.1.1-beta.1-canary-43d07cf-1599145638821":"2020-09-03T15:08:34.208Z","0.1.1-beta.1-canary-be587f7-1599330137416":"2020-09-05T18:23:08.309Z","0.1.1-beta.1-canary-be587f7-1599330137922":"2020-09-05T18:23:27.515Z","0.1.1-beta.1-canary-5998537-1599333670260":"2020-09-05T19:22:03.879Z","0.1.1-beta.1-canary-abd1303-1599333851160":"2020-09-05T19:24:58.141Z","0.1.1-beta.1-canary-063771b-1599339551758":"2020-09-05T21:00:00.462Z","0.1.1-beta.1-canary-063771b-1599339550060":"2020-09-05T21:00:29.018Z","0.1.1-beta.1-canary-d650c61-1599936651650":"2020-09-12T18:51:54.584Z","0.1.1-beta.1-canary-d650c61-1599936652982":"2020-09-12T18:51:58.374Z","0.1.1-beta.1-canary-f3c8e41-1600038354755":"2020-09-13T23:06:41.866Z","0.1.1-beta.1-canary-c911391-1600064326008":"2020-09-14T06:19:31.280Z","0.1.1-beta.1-canary-62203e3-1600263179094":"2020-09-16T13:33:55.658Z","0.1.1-beta.1-canary-62203e3-1600263178311":"2020-09-16T13:34:10.308Z","0.1.1-beta.1-canary-9f7ae79-1600263288658":"2020-09-16T13:35:49.471Z","0.1.1-beta.2":"2020-09-16T13:40:40.611Z","0.1.1-beta.2-canary-c476d40-1600350369469":"2020-09-17T13:46:58.194Z","0.1.1-beta.2-canary-c476d40-1600350369731":"2020-09-17T13:47:14.549Z","0.1.1-beta.2-canary-751e816-1600526184721":"2020-09-19T14:37:19.623Z","0.1.1-beta.2-canary-751e816-1600526181882":"2020-09-19T14:37:35.347Z","0.1.1-beta.2-canary-feacef1-1600532261431":"2020-09-19T16:18:29.724Z","0.1.1-beta.2-canary-0546646-1600599532970":"2020-09-20T10:59:40.931Z","0.1.1-beta.2-canary-0546646-1600599536071":"2020-09-20T10:59:56.185Z","0.1.1-beta.2-canary-1c6984e-1600643212102":"2020-09-20T23:07:56.675Z","0.1.1-beta.2-canary-4234edd-1600653937185":"2020-09-21T02:06:36.793Z","0.1.1-beta.2-canary-4234edd-1600653939689":"2020-09-21T02:06:51.315Z","0.1.1-beta.2-canary-5ad7f27-1600670418859":"2020-09-21T06:41:15.621Z","0.1.1-beta.2-canary-03233c3-1600670609175":"2020-09-21T06:44:20.669Z","0.1.1-beta.2-canary-7856a9a-1600677620466":"2020-09-21T08:41:21.083Z","0.1.1-beta.2-canary-7856a9a-1600677622997":"2020-09-21T08:41:31.102Z","0.1.1-beta.2-canary-fe68f73-1600851494194":"2020-09-23T08:59:11.077Z","0.1.1-beta.2-canary-fe68f73-1600851488654":"2020-09-23T08:59:27.381Z","0.1.1-beta.2-canary-4590b9d-1601098144869":"2020-09-26T05:29:52.719Z","0.1.1-beta.2-canary-4590b9d-1601098178605":"2020-09-26T05:30:38.124Z","0.1.1-beta.2-canary-84b1de3-1601158585303":"2020-09-26T22:17:17.784Z","0.1.1-beta.2-canary-84b1de3-1601158587080":"2020-09-26T22:17:26.904Z","0.1.1-beta.2-canary-0d53374-1601223880112":"2020-09-27T16:25:35.611Z","0.1.1-beta.2-canary-ded541c-1601224095454":"2020-09-27T16:29:02.419Z","0.1.1-beta.2-canary-44c8e71-1601351193815":"2020-09-29T03:47:18.734Z","0.1.1-beta.2-canary-44c8e71-1601351192886":"2020-09-29T03:47:33.291Z","0.1.1-beta.2-canary-d38b46e-1601460820199":"2020-09-30T10:14:38.616Z","0.1.1-beta.2-canary-d38b46e-1601460822878":"2020-09-30T10:14:54.382Z","0.1.1-beta.2-canary-915a674-1601948324889":"2020-10-06T01:39:35.906Z","0.1.1-beta.2-canary-915a674-1601948323816":"2020-10-06T01:39:51.172Z","0.1.1-beta.2-canary-8d54663-1602072932516":"2020-10-07T12:16:29.161Z","0.1.1-beta.2-canary-8d54663-1602072932537":"2020-10-07T12:16:44.812Z","0.1.1-beta.2-canary-aa8ac9d-1602073408052":"2020-10-07T12:24:27.397Z","0.1.1-beta.2-canary-56e9547-1602074706867":"2020-10-07T12:46:13.926Z","0.1.1-beta.3":"2020-10-07T12:49:29.564Z","0.1.1-beta.3-canary-73b6e46-1602085156961":"2020-10-07T15:40:16.948Z","0.1.1-beta.3-canary-73b6e46-1602085156348":"2020-10-07T15:40:31.276Z","0.1.1-beta.3-canary-6d96f99-1602101765926":"2020-10-07T20:17:09.550Z","0.1.1-beta.3-canary-6d96f99-1602101769196":"2020-10-07T20:17:29.646Z","0.1.1-beta.3-canary-98208df-1602116174194":"2020-10-08T00:17:18.860Z","0.1.1-beta.3-canary-dd72d9e-1602241818417":"2020-10-09T11:11:18.040Z","0.1.1-beta.3-canary-dd72d9e-1602241814455":"2020-10-09T11:11:33.828Z","0.1.1-beta.3-canary-ca49ec3-1602417970933":"2020-10-11T12:07:06.904Z","0.1.1-beta.3-canary-ca49ec3-1602417975162":"2020-10-11T12:07:24.190Z","0.1.1-beta.3-canary-f1d0e3e-1602424101500":"2020-10-11T13:49:18.894Z","0.1.1-beta.3-canary-f1d0e3e-1602424105587":"2020-10-11T13:49:29.533Z","0.1.1-beta.3-canary-f0875fa-1602439535491":"2020-10-11T18:06:26.154Z","0.1.1-beta.3-canary-f0875fa-1602439534490":"2020-10-11T18:06:35.030Z","0.1.1-beta.3-canary-9e36b69-1602572823804":"2020-10-13T07:07:56.524Z","0.1.1-beta.3-canary-9e36b69-1602572825586":"2020-10-13T07:08:14.905Z","0.1.1-beta.3-canary-a9ee258-1602694618057":"2020-10-14T16:57:50.212Z","0.1.1-beta.3-canary-a9ee258-1602694618957":"2020-10-14T16:58:06.245Z","0.1.1-beta.3-canary-3eae580-1602713709909":"2020-10-14T22:15:56.437Z","0.1.1-beta.3-canary-78cd9e1-1602797373398":"2020-10-15T21:30:36.432Z","0.1.1-beta.3-canary-78cd9e1-1602797374727":"2020-10-15T21:30:41.597Z","0.1.1-beta.3-canary-1f22ad0-1602798006274":"2020-10-15T21:40:58.190Z","0.1.1-beta.3-canary-1f22ad0-1602798007027":"2020-10-15T21:41:06.500Z","0.1.1-beta.3-canary-4d8d840-1602813797186":"2020-10-16T02:04:04.738Z","0.1.1-beta.3-canary-4d8d840-1602813800435":"2020-10-16T02:04:16.821Z","0.1.1-beta.3-canary-8b79721-1602829845850":"2020-10-16T06:31:41.203Z","0.1.1-beta.3-canary-07463af-1602919018085":"2020-10-17T07:17:49.909Z","0.1.1-beta.3-canary-07463af-1602919016614":"2020-10-17T07:17:57.064Z","0.1.1-beta.3-canary-7d155d4-1603034415391":"2020-10-18T15:21:14.460Z","0.1.1-beta.3-canary-7d155d4-1603034417197":"2020-10-18T15:21:29.322Z","0.1.1-beta.3-canary-322e40a-1603059290368":"2020-10-18T22:15:44.862Z","0.1.1-beta.3-canary-19aaa33-1603093538558":"2020-10-19T07:46:43.073Z","0.1.1-beta.3-canary-aae989f-1603177524207":"2020-10-20T07:06:14.637Z","0.1.1-beta.3-canary-09ad371-1603177526176":"2020-10-20T07:06:26.612Z","0.1.1-beta.3-canary-079e0ed-1603293609542":"2020-10-21T15:21:05.655Z","0.1.1-beta.3-canary-079e0ed-1603293610805":"2020-10-21T15:21:23.707Z","0.1.1-beta.3-canary-ce1667f-1603337857087":"2020-10-22T03:38:26.341Z","0.1.1-beta.3-canary-ce1667f-1603337860474":"2020-10-22T03:38:31.992Z","0.1.1-beta.3-canary-f301ea0-1603355725855":"2020-10-22T08:36:23.110Z","0.1.1-beta.3-canary-f301ea0-1603355729974":"2020-10-22T08:36:31.123Z","0.1.1-beta.3-canary-e1963ab-1603548376304":"2020-10-24T14:07:12.117Z","0.1.1-beta.3-canary-e1963ab-1603548379847":"2020-10-24T14:07:34.703Z","0.1.1-beta.3-canary-50878b7-1603615864263":"2020-10-25T08:51:52.330Z","0.1.1-beta.3-canary-50878b7-1603615866420":"2020-10-25T08:52:06.505Z","0.1.1-beta.3-canary-f7c8397-1603635414441":"2020-10-25T14:17:51.137Z","0.1.1-beta.3-canary-f7c8397-1603635421089":"2020-10-25T14:18:02.875Z","0.1.1-beta.3-canary-0be0d59-1603645565239":"2020-10-25T17:07:02.407Z","0.1.1-beta.3-canary-0be0d59-1603645565945":"2020-10-25T17:07:11.148Z","0.1.1-beta.3-canary-ba957e5-1603830469662":"2020-10-27T20:28:41.129Z","0.1.1-beta.3-canary-ba957e5-1603830468750":"2020-10-27T20:28:59.098Z","0.1.1-beta.3-canary-66d97a7-1603838861183":"2020-10-27T22:48:32.745Z","0.1.1-beta.3-canary-66d97a7-1603838863279":"2020-10-27T22:48:49.976Z","0.1.1-beta.3-canary-a819648-1603843155073":"2020-10-28T00:00:05.017Z","0.1.1-beta.3-canary-a819648-1603843151765":"2020-10-28T00:00:22.143Z","0.1.1-beta.3-canary-bfdf0cf-1603845337670":"2020-10-28T00:36:27.173Z","0.1.1-beta.3-canary-bfdf0cf-1603845337491":"2020-10-28T00:36:47.067Z","0.1.1-beta.3-canary-b455a99-1603850840897":"2020-10-28T02:08:18.758Z","0.1.1-beta.3-canary-efcae37-1603850841005":"2020-10-28T02:08:29.096Z","0.1.1-beta.3-canary-c85f0bd-1603908818474":"2020-10-28T18:14:37.840Z","0.1.1-beta.3-canary-9b1698c-1603952768991":"2020-10-29T06:27:04.856Z","0.1.1-beta.3-canary-1132fb7-1604048527125":"2020-10-30T09:03:06.896Z","0.1.1-beta.3-canary-1132fb7-1604048539714":"2020-10-30T09:03:11.977Z","0.1.1-beta.3-canary-d7ad718-1604068305968":"2020-10-30T14:32:35.015Z","0.1.1-beta.3-canary-7fa3f70-1604107111035":"2020-10-31T01:19:23.231Z","0.1.1-beta.3-canary-7fa3f70-1604107114981":"2020-10-31T01:19:33.238Z","0.1.1-beta.3-canary-6624ff9-1604213899725":"2020-11-01T06:59:09.567Z","0.1.1-beta.3-canary-6624ff9-1604213898724":"2020-11-01T07:00:12.739Z","0.1.1-beta.3-canary-cd85727-1604256862404":"2020-11-01T18:55:28.333Z","0.1.1-beta.3-canary-09800f0-1604257056997":"2020-11-01T18:58:31.529Z","0.1.1-beta.3-canary-b8a75b2-1604309931014":"2020-11-02T09:39:49.382Z","0.1.1-beta.3-canary-b8a75b2-1604309930013":"2020-11-02T09:40:03.366Z","0.1.1-beta.3-canary-87aac47-1604310672410":"2020-11-02T09:52:01.020Z","0.1.1-beta.3-canary-60eedea-1604310743790":"2020-11-02T09:53:16.861Z","0.1.1-beta.3-canary-60eedea-1604310743687":"2020-11-02T09:53:24.615Z","0.1.1-beta.3-canary-725263b-1604310805191":"2020-11-02T09:54:22.101Z","0.1.1-beta.3-canary-1537ca8-1604310961496":"2020-11-02T09:57:03.701Z","0.1.1-beta.3-canary-1537ca8-1604311013444":"2020-11-02T09:57:40.290Z","0.1.1-beta.3-canary-af8f0cf-1604310993262":"2020-11-02T09:58:00.996Z","0.1.1-beta.3-canary-52535f1-1604313874176":"2020-11-02T10:45:25.580Z","0.1.1-beta.3-canary-95b3418-1604313919761":"2020-11-02T10:46:11.012Z","0.1.1-beta.3-canary-0a2930e-1604314072754":"2020-11-02T10:48:45.731Z","0.1.1-beta.3-canary-06a235f-1604314279687":"2020-11-02T10:52:15.187Z","0.1.1-beta.3-canary-0ad8a62-1604317628227":"2020-11-02T11:48:17.500Z","0.1.1-beta.3-canary-8e268cc-1604321039598":"2020-11-02T12:45:04.081Z","0.1.1-beta.3-canary-8c18963-1604321244252":"2020-11-02T12:48:55.017Z","0.1.1-beta.3-canary-0168b68-1604322617885":"2020-11-02T13:11:20.353Z","0.1.1-beta.3-canary-0168b68-1604322645045":"2020-11-02T13:11:48.756Z","0.1.1-beta.3-canary-cf71b27-1604324151350":"2020-11-02T13:36:53.963Z","0.1.1-beta.3-canary-9bb5d30-1604480403924":"2020-11-04T09:00:51.712Z","0.1.1-beta.3-canary-9bb5d30-1604480405847":"2020-11-04T09:01:13.397Z","0.1.1-beta.3-canary-7d772d6-1604714927143":"2020-11-07T02:09:36.098Z","0.1.1-beta.3-canary-7d772d6-1604714929053":"2020-11-07T02:09:43.580Z","0.1.1-beta.3-canary-c6ec0fa-1604843770174":"2020-11-08T13:56:58.218Z","0.1.1-beta.3-canary-4ce6ba1-1604843774715":"2020-11-08T13:57:06.156Z","0.1.1-beta.3-canary-1c84794-1604845646431":"2020-11-08T14:28:19.185Z","0.1.1-beta.3-canary-1c84794-1604845647127":"2020-11-08T14:28:34.514Z","0.1.1-beta.3-canary-8d9d9a9-1604847187726":"2020-11-08T14:53:57.885Z","0.1.1-beta.3-canary-8d9d9a9-1604847184758":"2020-11-08T14:54:14.018Z","1.0.0":"2020-11-08T14:58:12.837Z","1.0.0-canary-843925c-1604849639292":"2020-11-08T15:34:48.464Z","1.0.0-canary-a80f982-1604849641806":"2020-11-08T15:35:04.111Z","1.0.0-canary-b339242-1605296671879":"2020-11-13T19:45:23.972Z","1.0.0-canary-b339242-1605296673805":"2020-11-13T19:45:50.341Z","1.0.0-canary-f0d7a47-1605363899098":"2020-11-14T14:25:48.963Z","1.0.0-canary-f0d7a47-1605363896517":"2020-11-14T14:25:57.362Z","1.0.0-canary-bc2044a-1605689043919":"2020-11-18T08:44:58.226Z","1.0.0-canary-b7225e9-1605912888030":"2020-11-20T22:55:38.642Z","1.0.0-canary-e5bd7d2-1606127962817":"2020-11-23T10:40:20.020Z","1.0.0-canary-b42218a-1606630076978":"2020-11-29T06:08:46.056Z","1.0.0-canary-b42218a-1606630078909":"2020-11-29T06:08:56.702Z","1.0.0-canary-725cb88-1606761735673":"2020-11-30T18:43:05.021Z","1.0.0-canary-2fd2ed7-1606761937987":"2020-11-30T18:46:36.078Z","1.0.0-canary-d8f466c-1606808728114":"2020-12-01T07:46:16.626Z","1.0.0-canary-32342cc-1606808931963":"2020-12-01T07:49:48.064Z","1.0.0-canary-f54d0d0-1606809112127":"2020-12-01T07:52:40.261Z","1.0.0-canary-39cd78e-1606839802418":"2020-12-01T16:24:26.812Z","1.0.0-canary-39cd78e-1606839805125":"2020-12-01T16:24:33.210Z","1.0.0-canary-28d80f1-1606853046740":"2020-12-01T20:46:34.554Z","1.0.0-canary-28d80f1-1606853052863":"2020-12-01T20:46:59.653Z","1.0.0-canary-571490e-1606864551369":"2020-12-01T23:16:45.191Z","1.0.0-canary-479bf76-1606984128438":"2020-12-03T08:29:50.849Z","1.0.0-canary-523e336-1607102289272":"2020-12-04T17:19:51.738Z","1.0.0-canary-523e336-1607102342070":"2020-12-04T17:21:36.329Z","1.0.0-canary-523e336-1607102292005":"2020-12-04T17:28:12.305Z","1.0.0-canary-8d85896-1607112455445":"2020-12-04T20:08:24.147Z","1.0.0-canary-56964c8-1607112615299":"2020-12-04T20:11:03.496Z","1.0.0-canary-9df56b3-1607112633377":"2020-12-04T20:11:24.961Z","1.0.0-canary-535ca2c-1607112746114":"2020-12-04T20:13:16.210Z","1.0.0-canary-35ee376-1607156448975":"2020-12-05T08:21:43.849Z","1.0.0-canary-35ee376-1607156451117":"2020-12-05T08:21:54.004Z","1.0.0-canary-d3ffc32-1607234663453":"2020-12-06T06:05:11.991Z","1.0.0-canary-d3ffc32-1607234665033":"2020-12-06T06:05:28.557Z","1.0.0-canary-263fcdf-1607255882096":"2020-12-06T11:58:53.203Z","1.0.0-canary-364ca1e-1607342433339":"2020-12-07T12:01:30.446Z","1.0.0-canary-364ca1e-1607342434099":"2020-12-07T12:01:39.063Z","1.0.0-canary-8915322-1607405148678":"2020-12-08T05:26:38.139Z","1.0.0-canary-8915322-1607405148731":"2020-12-08T05:26:47.600Z","1.0.0-canary-afdf59d-1607421066497":"2020-12-08T09:51:56.495Z","1.0.0-canary-f83405c-1607421073163":"2020-12-08T09:52:01.472Z","1.0.0-canary-9236731-1607461537065":"2020-12-08T21:06:26.658Z","1.0.0-canary-9236731-1607461531131":"2020-12-08T21:06:53.348Z","1.0.0-canary-023c726-1607640079386":"2020-12-10T22:42:09.241Z","1.0.0-canary-5575454-1607642142770":"2020-12-10T23:16:50.739Z","1.0.0-canary-ad8fa57-1607945188531":"2020-12-14T11:27:18.787Z","1.0.0-canary-ad8fa57-1607945189853":"2020-12-14T11:27:24.475Z","1.0.0-canary-86c7591-1607945545179":"2020-12-14T11:33:19.256Z","1.0.0-canary-c83a784-1607957983914":"2020-12-14T15:00:51.507Z","1.0.0-canary-09d8d6b-1607958461576":"2020-12-14T15:08:49.030Z","1.0.0-canary-09d8d6b-1607958472748":"2020-12-14T15:09:48.880Z","1.0.0-canary-867ec35-1608328915928":"2020-12-18T22:03:06.196Z","1.0.0-canary-867ec35-1608328929041":"2020-12-18T22:03:16.422Z","1.0.0-canary-760f15e-1608570313820":"2020-12-21T17:06:02.177Z","1.0.0-canary-760f15e-1608570312493":"2020-12-21T17:06:10.154Z","1.0.0-canary-ba58f34-1608765290728":"2020-12-23T23:15:35.905Z","1.0.0-canary-c1882ac-1609165025425":"2020-12-28T14:17:52.323Z","1.0.0-canary-d6c63a8-1609181407613":"2020-12-28T18:50:56.874Z","1.0.0-canary-799f0bc-1609219587922":"2020-12-29T05:27:20.832Z","1.0.0-canary-cc071ee-1609244699563":"2020-12-29T12:25:47.970Z","1.0.0-canary-048ef93-1609264799433":"2020-12-29T18:00:47.075Z","1.0.0-canary-6504eb1-1609272427153":"2020-12-29T20:08:15.448Z","1.0.0-canary-6504eb1-1609272426551":"2020-12-29T20:08:21.582Z","1.0.0-canary-2dd06aa-1609286731488":"2020-12-30T00:06:31.908Z","1.0.0-canary-2dd06aa-1609286730461":"2020-12-30T00:07:15.069Z","1.0.0-canary-53aff9f-1609363176044":"2020-12-30T21:20:27.769Z","1.0.0-canary-53aff9f-1609363170397":"2020-12-30T21:20:32.874Z","1.0.0-canary-3dfa82a-1609465249555":"2021-01-01T01:41:45.758Z","1.0.0-canary-3dfa82a-1609465246292":"2021-01-01T01:42:50.722Z","1.0.0-canary-2512319-1609492812645":"2021-01-01T09:21:04.620Z","1.0.0-canary-e0de39d-1609541251073":"2021-01-01T22:49:15.723Z","1.0.0-canary-e0de39d-1609541253072":"2021-01-01T22:49:22.988Z","1.0.0-canary-c129060-1609557148393":"2021-01-02T03:13:20.845Z","1.0.0-canary-ee815f3-1609557259226":"2021-01-02T03:15:08.507Z","1.0.0-canary-53858a0-1609564086398":"2021-01-02T05:08:50.881Z","1.0.0-canary-53858a0-1609564087425":"2021-01-02T05:09:04.280Z","1.0.0-canary-d6c9d41-1609638938212":"2021-01-03T01:56:36.009Z","1.0.0-canary-b8cd76f-1609715645960":"2021-01-03T23:15:16.434Z","1.0.0-canary-6b3bf07-1609715680124":"2021-01-03T23:15:29.334Z","1.0.0-canary-2ce770e-1609715742062":"2021-01-03T23:16:32.748Z","1.0.0-canary-98b25c9-1609715775092":"2021-01-03T23:17:21.172Z","1.0.0-canary-c651600-1609791576723":"2021-01-04T20:20:27.052Z","1.0.0-canary-7585be6-1609802233679":"2021-01-04T23:18:10.380Z","1.0.0-canary-d109a0d-1609802276216":"2021-01-04T23:18:44.851Z","1.0.0-canary-13f9ca8-1609802332453":"2021-01-04T23:19:40.099Z","1.0.0-canary-1044180-1609802378323":"2021-01-04T23:20:31.568Z","1.0.0-canary-732f569-1609806760086":"2021-01-05T00:33:35.846Z","1.0.0-canary-570fdb6-1609854267160":"2021-01-05T13:45:14.469Z","1.0.0-canary-4bccb0c-1609888903687":"2021-01-05T23:22:28.089Z","1.0.0-canary-b40630e-1609910531404":"2021-01-06T05:23:02.760Z","1.0.0-canary-b40630e-1609910533619":"2021-01-06T05:23:09.625Z","1.0.0-canary-004f0db-1609975105269":"2021-01-06T23:19:12.708Z","1.0.0-canary-53b6522-1609975279524":"2021-01-06T23:22:06.828Z","1.0.0-canary-8329033-1609991895410":"2021-01-07T03:59:03.144Z","1.0.0-canary-2928128-1610061468253":"2021-01-07T23:18:58.536Z","1.0.0-canary-7c1570e-1610061514938":"2021-01-07T23:19:33.866Z","1.0.0-canary-9102e2c-1610061559640":"2021-01-07T23:20:13.053Z","1.0.0-canary-c1f351f-1610061746486":"2021-01-07T23:23:16.808Z","1.0.0-canary-46c80ee-1610223969730":"2021-01-09T20:27:03.244Z","1.0.0-canary-db524fb-1610320476073":"2021-01-10T23:15:26.889Z","1.0.0-canary-4601cf6-1610320521129":"2021-01-10T23:16:08.818Z","1.0.0-canary-048f0e7-1610320577619":"2021-01-10T23:17:12.129Z","1.0.0-canary-6e7de51-1610320592530":"2021-01-10T23:17:26.108Z","1.0.0-canary-9207c75-1610406979579":"2021-01-11T23:17:13.560Z","1.0.0-canary-92de13f-1610406985968":"2021-01-11T23:17:24.576Z","1.0.0-canary-e7e71be-1610407103851":"2021-01-11T23:19:14.218Z","1.0.0-canary-20c4445-1610444372008":"2021-01-12T09:40:21.852Z","1.0.0-canary-2dca6a9-1610444441721":"2021-01-12T09:41:31.126Z","1.0.0-canary-f327627-1610444611341":"2021-01-12T09:44:21.253Z","1.0.0-canary-7fd5a7d-1610444678023":"2021-01-12T09:45:26.598Z","1.0.0-canary-0db4fe0-1610445544406":"2021-01-12T09:59:56.812Z","1.0.0-canary-08d822e-1610445610400":"2021-01-12T10:01:00.129Z","1.0.0-canary-08df268-1610445787910":"2021-01-12T10:03:59.855Z","1.0.0-canary-3446c0a-1610446098321":"2021-01-12T10:09:06.605Z","1.0.0-canary-04c96b1-1610446459171":"2021-01-12T10:15:05.977Z","1.0.0-canary-64dc224-1610446779627":"2021-01-12T10:20:36.785Z","1.0.0-canary-f4e6106-1610447177989":"2021-01-12T10:27:02.758Z","1.0.0-canary-fd32dbc-1610447477999":"2021-01-12T10:32:05.471Z","1.0.0-canary-930f7eb-1610447701917":"2021-01-12T10:36:00.072Z","1.0.0-canary-dbb7a5e-1610452394649":"2021-01-12T11:54:05.636Z","1.0.0-canary-6b50ec7-1610498594918":"2021-01-13T00:44:07.847Z","1.0.0-canary-d682922-1610575405261":"2021-01-13T22:04:13.013Z","1.0.0-canary-d682922-1610575437253":"2021-01-13T22:04:53.093Z","1.0.0-canary-b423708-1610580061236":"2021-01-13T23:21:48.426Z","1.0.0-canary-ca2ecb8-1610666283695":"2021-01-14T23:18:50.704Z","1.0.0-canary-2c8451e-1610710689963":"2021-01-15T11:38:55.287Z","1.0.0-canary-1f3a86b-1610752730555":"2021-01-15T23:19:38.874Z","1.0.0-canary-1f3a86b-1610752735485":"2021-01-15T23:19:45.715Z","1.0.0-canary-9da9277-1610778972162":"2021-01-16T06:37:01.646Z","1.0.0-canary-9da9277-1610778974200":"2021-01-16T06:37:12.166Z","1.0.0-canary-60ae86f-1610820733913":"2021-01-16T18:13:04.629Z","1.0.0-canary-60ae86f-1610820735862":"2021-01-16T18:13:12.263Z","1.0.0-canary-84a0624-1610850967550":"2021-01-17T02:37:00.686Z","1.0.0-canary-9ebf8bf-1610850981307":"2021-01-17T02:37:12.606Z","1.0.0-canary-f5c692e-1610925997071":"2021-01-17T23:27:29.708Z","1.0.0-canary-21655d0-1610925998846":"2021-01-17T23:27:36.965Z","1.0.0-canary-3968069-1610926049305":"2021-01-17T23:28:17.286Z","1.0.0-canary-a56d4cf-1610962470251":"2021-01-18T09:35:19.196Z","1.0.0-canary-85f4817-1610962497886":"2021-01-18T09:35:46.094Z","1.0.0-canary-7491e08-1610963473682":"2021-01-18T09:52:09.546Z","1.0.0-canary-bda15b5-1610963486067":"2021-01-18T09:52:30.681Z","1.0.0-canary-8841631-1610964870265":"2021-01-18T10:15:21.678Z","1.0.0-canary-63caebe-1611046544433":"2021-01-19T08:56:38.351Z","1.0.0-canary-5cf5594-1611145515330":"2021-01-20T12:26:10.789Z","1.0.0-canary-7df7296-1611147638919":"2021-01-20T13:01:25.157Z","1.0.0-canary-434fab4-1611270960407":"2021-01-21T23:16:53.931Z","1.0.0-canary-be17ffe-1611312120665":"2021-01-22T10:42:46.209Z","1.0.0-canary-78107d5-1611333164314":"2021-01-22T16:33:38.222Z","1.0.0-canary-78107d5-1611333166732":"2021-01-22T16:33:48.444Z","1.0.0-canary-f145574-1611433260321":"2021-01-23T20:21:48.234Z","1.0.0-canary-f145574-1611433263779":"2021-01-23T20:22:51.949Z","1.0.0-canary-d2403e4-1611478568646":"2021-01-24T08:56:54.424Z","1.0.0-canary-a70d686-1611517253537":"2021-01-24T19:41:47.514Z","1.0.0-canary-a70d686-1611517253226":"2021-01-24T19:41:57.378Z","1.0.0-canary-01eee21-1611571665816":"2021-01-25T10:48:40.695Z","1.0.0-canary-c2e20f4-1611586330171":"2021-01-25T14:53:05.200Z","1.0.0-canary-1890b09-1611591136751":"2021-01-25T16:13:22.942Z","1.0.0-canary-1890b09-1611591137036":"2021-01-25T16:13:36.975Z","1.0.0-canary-accde03-1611789349345":"2021-01-27T23:16:37.486Z","1.0.0-canary-36141cd-1611789349673":"2021-01-27T23:16:47.115Z","1.0.0-canary-eef32ae-1611843835215":"2021-01-28T14:24:49.829Z","1.0.0-canary-eef32ae-1611843840915":"2021-01-28T14:25:07.770Z","1.0.0-canary-d87cde6-1611875751780":"2021-01-28T23:16:43.520Z","1.0.0-canary-1aeeefa-1611928474176":"2021-01-29T13:55:32.223Z","1.0.0-canary-1aeeefa-1611928477131":"2021-01-29T13:55:45.084Z","1.0.0-canary-0cc87fb-1611930463979":"2021-01-29T14:28:41.395Z","1.0.0-canary-4cb16ba-1611930846040":"2021-01-29T14:34:58.988Z","1.0.0-canary-4cb16ba-1611930851770":"2021-01-29T14:35:12.574Z","1.0.0-canary-d722f99-1612125105907":"2021-01-31T20:32:33.086Z","1.0.0-canary-d722f99-1612125109860":"2021-01-31T20:32:38.225Z","1.0.0-canary-d2235ea-1612171178213":"2021-02-01T09:20:35.888Z","1.0.0-canary-134a838-1612171616029":"2021-02-01T09:27:50.911Z","1.0.0-canary-8dcca79-1612177184435":"2021-02-01T11:00:32.519Z","1.0.0-canary-f03d3ae-1612221388931":"2021-02-01T23:17:19.489Z","1.0.0-canary-2140b85-1612221401306":"2021-02-01T23:17:32.246Z","1.0.0-canary-fa19ada-1612255212267":"2021-02-02T08:41:13.756Z","1.0.0-canary-7ac5529-1612262929719":"2021-02-02T10:49:39.623Z","1.0.0-canary-de0a30c-1612282289651":"2021-02-02T16:12:16.921Z","1.0.0-canary-b03e253-1612355587521":"2021-02-03T12:34:02.265Z","1.0.0-canary-b03e253-1612357205782":"2021-02-03T13:01:03.573Z","1.0.0-canary-780e726-1612378043379":"2021-02-03T18:48:13.172Z","1.0.0-canary-95d6bf2-1612443124753":"2021-02-04T12:53:09.706Z","1.0.0-canary-18ade9e-1612514200035":"2021-02-05T08:37:39.910Z","1.0.0-canary-18ade9e-1612514199364":"2021-02-05T08:37:47.699Z","1.0.0-canary-1e28cb2-1612528685314":"2021-02-05T12:38:48.233Z","1.0.0-canary-aa084c8-1612548389374":"2021-02-05T18:07:23.517Z","1.0.0-canary-aa084c8-1612548391303":"2021-02-05T18:07:34.763Z","1.0.0-canary-14f86bc-1612628825786":"2021-02-06T16:27:57.225Z","1.0.0-canary-2de2123-1612652128822":"2021-02-06T22:56:26.872Z","1.0.0-canary-550d17e-1612739844135":"2021-02-07T23:18:15.554Z","1.0.0-canary-5d18bd5-1612873605615":"2021-02-09T12:27:39.576Z","1.0.0-canary-5d18bd5-1612873607596":"2021-02-09T12:27:46.249Z","1.0.0-canary-5a16d3d-1612876353841":"2021-02-09T13:13:31.213Z","1.0.0-canary-a4f58aa-1612897614628":"2021-02-09T19:07:47.554Z","1.0.0-canary-9d20744-1612990082151":"2021-02-10T20:48:51.986Z","1.0.0-canary-9d20744-1612990087243":"2021-02-10T20:48:59.953Z","1.0.0-canary-f5a408a-1613014658357":"2021-02-11T03:38:36.323Z","1.0.0-canary-b668d75-1613061816105":"2021-02-11T16:44:31.557Z","1.0.0-canary-838824c-1613146069775":"2021-02-12T16:08:47.573Z","1.0.0-canary-208ed24-1613170029349":"2021-02-12T22:47:56.984Z","1.0.0-canary-208ed24-1613170028742":"2021-02-12T22:48:02.439Z","1.0.0-canary-957f7a9-1613313154485":"2021-02-14T14:33:31.782Z","1.0.0-canary-4883d55-1613344498745":"2021-02-14T23:15:57.714Z","1.0.0-canary-4d6726c-1613344513477":"2021-02-14T23:16:08.323Z","1.0.0-canary-b32711b-1613360737468":"2021-02-15T03:46:35.865Z","1.0.0-canary-31d233c-1613382979870":"2021-02-15T09:57:15.180Z","1.0.0-canary-04cbbda-1613383596461":"2021-02-15T10:07:37.636Z","1.0.0-canary-37d0747-1613385597440":"2021-02-15T10:40:47.323Z","1.0.0-canary-37d0747-1613385595470":"2021-02-15T10:40:57.386Z","1.0.0-canary-850cb9a-1613393362701":"2021-02-15T12:50:21.373Z","1.0.0-canary-b08805a-1613394614953":"2021-02-15T13:11:14.080Z","1.0.0-canary-e9345f1-1613666335352":"2021-02-18T16:39:57.685Z","1.0.0-canary-7b489dc-1613791367490":"2021-02-20T03:23:40.858Z","1.0.0-canary-c5fa988-1613865690742":"2021-02-21T00:03:21.314Z","1.0.0-canary-c5fa988-1613865692044":"2021-02-21T00:03:56.890Z","1.0.0-canary-f621381-1613949368391":"2021-02-21T23:16:57.628Z","1.0.0-canary-a756664-1613984643925":"2021-02-22T09:04:54.429Z","1.0.0-canary-d715ff6-1614002165868":"2021-02-22T13:56:57.998Z","1.0.0-canary-420ea6c-1614005038212":"2021-02-22T14:44:56.748Z","1.0.0-canary-79dcde4-1614005036115":"2021-02-22T14:45:05.831Z","1.0.0-canary-318b0dc-1614008904760":"2021-02-22T15:49:24.312Z","1.0.0-canary-2e16716-1614008935320":"2021-02-22T15:49:50.618Z","1.0.0-canary-f4cedf8-1614009445956":"2021-02-22T15:58:25.413Z","1.0.0-canary-8603ff8-1614013722243":"2021-02-22T17:09:32.580Z","1.0.0-canary-8603ff8-1614013725107":"2021-02-22T17:09:39.528Z","1.0.0-canary-5e9fb96-1614014614894":"2021-02-22T17:24:38.702Z","1.0.0-canary-c552337-1614014676798":"2021-02-22T17:25:54.172Z","1.0.0-canary-d890774-1614014874449":"2021-02-22T17:28:54.807Z","1.0.0-canary-f3705fe-1614014925909":"2021-02-22T17:29:56.589Z","1.0.0-canary-fe721a8-1614015002988":"2021-02-22T17:31:46.310Z","1.1.0":"2021-02-22T17:36:31.705Z","1.1.0-canary-98a6906-1614015740106":"2021-02-22T17:43:19.592Z","1.1.0-canary-c6cfcd6-1614035936644":"2021-02-22T23:19:46.575Z","1.1.0-canary-0af420f-1614036928606":"2021-02-22T23:36:17.639Z","1.1.0-canary-0af420f-1614036924607":"2021-02-22T23:36:47.138Z","1.1.0-canary-0b6d23f-1614045907774":"2021-02-23T02:06:00.006Z","1.1.0-canary-2f183bd-1614070283089":"2021-02-23T08:52:18.737Z","1.1.0-canary-018f668-1614071013109":"2021-02-23T09:04:24.494Z","1.1.0-canary-3b21d78-1614074936725":"2021-02-23T10:09:50.693Z","1.1.0-canary-3b21d78-1614074940615":"2021-02-23T10:10:03.658Z","1.1.0-canary-b17bacc-1614116862946":"2021-02-23T21:48:45.378Z","1.1.0-canary-3c381cd-1614118874440":"2021-02-23T22:22:04.092Z","1.1.0-canary-3c381cd-1614118876070":"2021-02-23T22:23:14.422Z","1.1.0-canary-9a689a0-1614122203954":"2021-02-23T23:17:39.183Z","1.1.0-canary-d789012-1614122379913":"2021-02-23T23:20:34.522Z","1.1.0-canary-96b23eb-1614182698292":"2021-02-24T16:06:24.118Z","1.1.0-canary-5c23158-1614257077015":"2021-02-25T12:45:30.123Z","1.1.0-canary-bdf22bf-1614257830159":"2021-02-25T12:57:54.623Z","1.1.0-canary-6092749-1614261232496":"2021-02-25T13:55:18.405Z","1.1.0-canary-920ebbc-1614350804481":"2021-02-26T14:48:12.683Z","1.1.0-canary-7758fbb-1614356293086":"2021-02-26T16:19:06.978Z","1.1.0-canary-c93691e-1614463857896":"2021-02-27T22:11:49.913Z","1.1.0-canary-9f9b5ea-1614554876843":"2021-02-28T23:28:46.343Z","1.1.0-canary-a01048c-1614554889137":"2021-02-28T23:28:58.660Z","1.1.0-canary-60663c1-1614628206720":"2021-03-01T19:50:58.343Z","1.1.0-canary-60663c1-1614628206977":"2021-03-01T19:51:03.869Z","1.1.0-canary-9b7f1c8-1614813349429":"2021-03-03T23:16:37.285Z","1.1.0-canary-416e712-1614835116050":"2021-03-04T05:19:29.071Z","1.1.0-canary-21cc770-1614847064638":"2021-03-04T08:38:36.501Z","1.1.0-canary-f4553bc-1614849582842":"2021-03-04T09:20:47.510Z","1.1.0-canary-e8f7c22-1614851454877":"2021-03-04T09:51:57.452Z","1.1.0-canary-42bbed5-1614897523709":"2021-03-04T22:39:32.481Z","1.1.0-canary-8a83dbb-1614955155462":"2021-03-05T14:40:02.488Z","1.1.0-canary-b5fb06b-1615048062850":"2021-03-06T16:28:29.999Z","1.1.0-canary-b5fb06b-1615048062652":"2021-03-06T16:28:40.975Z","1.1.0-canary-c878001-1615245573585":"2021-03-08T23:20:27.137Z","1.1.0-canary-b73973e-1615279750099":"2021-03-09T08:50:04.349Z","1.1.0-canary-3fc277e-1615300490879":"2021-03-09T14:35:50.549Z","1.1.0-canary-0ae88e6-1615440304312":"2021-03-11T05:25:56.504Z","1.1.0-canary-ffce347-1615560021004":"2021-03-12T14:41:23.255Z","1.1.0-canary-ffce347-1615560022117":"2021-03-12T14:41:29.315Z","1.1.0-canary-d34952a-1615586262722":"2021-03-12T21:58:36.741Z","1.1.0-canary-7a36b2e-1615693923979":"2021-03-14T03:53:00.504Z","1.1.0-canary-7a36b2e-1615693926558":"2021-03-14T03:54:07.201Z","1.1.0-canary-f17a854-1615752336676":"2021-03-14T20:06:25.952Z","1.1.0-canary-f17a854-1615752335519":"2021-03-14T20:06:38.463Z","1.1.0-canary-3c7141d-1615798716909":"2021-03-15T08:59:49.950Z","1.1.0-canary-25a3713-1615798861773":"2021-03-15T09:02:07.270Z","1.1.0-canary-6d8c760-1615799406776":"2021-03-15T09:11:08.235Z","1.1.0-canary-e031434-1615883675717":"2021-03-16T08:35:23.749Z","1.1.0-canary-5dd6f72-1615887635370":"2021-03-16T09:41:25.184Z","1.1.0-canary-da200de-1615905113712":"2021-03-16T14:32:58.694Z","1.1.0-canary-5f7567e-1615907906665":"2021-03-16T15:19:35.744Z","1.1.0-canary-1839fd6-1615988003103":"2021-03-17T13:34:28.335Z","1.1.0-canary-9a3c7f1-1615996985811":"2021-03-17T16:04:02.755Z","1.1.0-canary-859549d-1616045401236":"2021-03-18T05:30:53.021Z","1.1.0-canary-859549d-1616045403325":"2021-03-18T05:31:04.704Z","1.1.0-canary-f75f883-1616057079475":"2021-03-18T08:45:28.092Z","1.1.0-canary-9ec51b0-1616057148996":"2021-03-18T08:46:42.164Z","1.1.0-canary-f772aa2-1616057265803":"2021-03-18T08:48:42.344Z","1.1.0-canary-2cc937d-1616057331977":"2021-03-18T08:49:45.493Z","1.1.0-canary-f3f4e49-1616063690360":"2021-03-18T10:35:39.166Z","1.1.0-canary-4529301-1616109363464":"2021-03-18T23:16:57.799Z","1.1.0-canary-c374704-1616142305436":"2021-03-19T08:25:55.227Z","1.1.0-canary-34663c3-1616151437487":"2021-03-19T10:58:10.436Z","1.1.0-canary-5c59ff2-1616220421709":"2021-03-20T06:08:07.667Z","1.1.0-canary-5c59ff2-1616220423752":"2021-03-20T06:09:03.641Z","1.1.0-canary-c431d44-1616369058581":"2021-03-21T23:25:09.537Z","1.1.0-canary-6e66927-1616376502420":"2021-03-22T01:29:20.850Z","1.1.0-canary-6e66927-1616376505153":"2021-03-22T01:29:34.183Z","1.1.0-canary-2b0f548-1616393921516":"2021-03-22T06:19:32.269Z","1.1.0-canary-aee7ee9-1616404804013":"2021-03-22T09:20:56.318Z","1.1.0-canary-9017604-1616424915014":"2021-03-22T14:56:10.924Z","1.1.0-canary-9017604-1616424917138":"2021-03-22T14:56:46.256Z","1.1.0-canary-390d82c-1616451190163":"2021-03-22T22:13:58.982Z","1.1.0-canary-f5364de-1616517308630":"2021-03-23T16:36:02.756Z","1.1.0-canary-0560fcc-1616596804815":"2021-03-24T14:41:08.726Z","1.1.0-canary-0560fcc-1616596802445":"2021-03-24T14:41:38.017Z","1.1.0-canary-9be6221-1616627771881":"2021-03-24T23:17:04.365Z","1.1.0-canary-d078dbe-1616643404419":"2021-03-25T03:37:47.591Z","1.1.0-canary-f9cbd8b-1616663743293":"2021-03-25T09:16:31.421Z","1.1.0-canary-219b058-1616695721684":"2021-03-25T18:09:38.599Z","1.1.0-canary-35d81f6-1616714116642":"2021-03-25T23:16:07.539Z","1.1.0-canary-80cbd69-1616756205429":"2021-03-26T10:57:34.622Z","1.1.0-canary-da9f811-1616784483112":"2021-03-26T18:49:04.620Z","1.1.0-canary-56b620a-1616784622969":"2021-03-26T18:51:28.166Z","1.1.0-canary-56b620a-1616784622853":"2021-03-26T18:52:16.959Z","1.1.0-canary-18151ce-1616793452077":"2021-03-26T21:18:36.154Z","1.1.0-canary-18151ce-1616793463870":"2021-03-26T21:18:50.160Z","1.1.0-canary-d9e4605-1616823828583":"2021-03-27T05:44:44.518Z","1.1.0-canary-d9e4605-1616823830303":"2021-03-27T05:44:52.607Z","1.1.0-canary-1f6441a-1616912679614":"2021-03-28T06:25:33.353Z","1.1.0-canary-1f6441a-1616912684647":"2021-03-28T06:25:44.931Z","1.1.0-canary-d9e0a3f-1616973229653":"2021-03-28T23:14:42.620Z","1.1.0-canary-3115ce2-1617003687103":"2021-03-29T07:42:20.057Z","1.1.0-canary-9512afe-1617008611021":"2021-03-29T09:04:26.154Z","1.1.0-canary-2737ad9-1617008831209":"2021-03-29T09:08:14.053Z","1.1.0-canary-b000a98-1617031399886":"2021-03-29T15:24:16.765Z","1.1.0-canary-b000a98-1617031418337":"2021-03-29T15:24:39.390Z","1.1.0-canary-0f185cc-1617046645359":"2021-03-29T19:38:13.717Z","1.1.0-canary-0f185cc-1617046645781":"2021-03-29T19:38:24.509Z","1.1.0-canary-237f4b3-1617105290057":"2021-03-30T11:55:56.159Z","1.1.0-canary-859fdb8-1617480979946":"2021-04-03T20:17:20.694Z","1.1.0-canary-8f3e3d5-1617578043426":"2021-04-04T23:15:06.198Z","1.1.0-canary-33f11d5-1617647139795":"2021-04-05T18:26:39.524Z","1.1.0-canary-f16d3d2-1617698458777":"2021-04-06T08:41:44.595Z","1.1.0-canary-f5ed39b-1617821864885":"2021-04-07T18:58:38.668Z","1.1.0-canary-89de927-1617920152491":"2021-04-08T22:16:47.780Z","1.1.0-canary-b4ecdb3-1617945939700":"2021-04-09T05:26:28.473Z","1.1.0-canary-b4ecdb3-1617945941787":"2021-04-09T05:26:37.079Z","1.1.0-canary-6448d73-1618006524391":"2021-04-09T22:16:18.209Z","1.1.0-canary-6448d73-1618006533832":"2021-04-09T22:16:34.279Z","1.1.0-canary-d54f916-1618031918917":"2021-04-10T05:19:47.635Z","1.1.0-canary-d54f916-1618031917553":"2021-04-10T05:19:54.641Z","1.1.0-canary-206f710-1618179827866":"2021-04-11T22:24:34.837Z","1.1.0-canary-ee1dda0-1618292061614":"2021-04-13T05:35:19.053Z","1.1.0-canary-ee1dda0-1618292072515":"2021-04-13T05:35:32.102Z","1.1.0-canary-832ae77-1618352157518":"2021-04-13T22:17:03.455Z","1.1.0-canary-01c3644-1618395596223":"2021-04-14T10:20:51.805Z","1.1.0-canary-01c3644-1618395597586":"2021-04-14T10:21:00.655Z","1.1.0-canary-9095bbb-1618482688248":"2021-04-15T10:32:17.589Z","1.1.0-canary-9095bbb-1618482685870":"2021-04-15T10:32:30.067Z","1.1.0-canary-5698f8e-1619009741851":"2021-04-21T12:56:40.257Z","1.1.0-canary-1c03250-1619009801215":"2021-04-21T12:57:38.759Z","1.1.0-canary-16bdce8-1619101969398":"2021-04-22T14:33:50.976Z","1.1.0-canary-6d3a96e-1619122571399":"2021-04-22T20:17:06.192Z","1.1.0-canary-d7aa894-1619129646690":"2021-04-22T22:15:06.496Z","1.1.0-canary-e473a70-1619129653664":"2021-04-22T22:15:16.668Z","1.1.0-canary-cc1305d-1619146252703":"2021-04-23T02:52:02.833Z","1.1.0-canary-6d0578d-1619163397056":"2021-04-23T07:37:27.758Z","1.1.0-canary-9d6a729-1619164505487":"2021-04-23T07:55:56.691Z","1.1.0-canary-77721ae-1619168673125":"2021-04-23T09:05:35.696Z","1.1.0-canary-3e037d0-1619218053802":"2021-04-23T22:48:40.415Z","1.1.0-canary-3e037d0-1619218051222":"2021-04-23T22:48:50.689Z","1.1.0-canary-8cf8aec-1619392975010":"2021-04-25T23:23:50.143Z","1.1.0-canary-346ce6b-1619423010743":"2021-04-26T07:44:21.450Z","1.1.0-canary-b064934-1619552681430":"2021-04-27T19:45:35.715Z","1.1.0-canary-b064934-1619552682690":"2021-04-28T13:01:41.038Z","1.1.0-canary-0800860-1619615551516":"2021-04-28T13:13:26.035Z","1.1.0-canary-2b7e365-1619674768808":"2021-04-29T05:40:27.059Z","1.1.0-canary-d57c0d1-1619682849414":"2021-04-29T07:55:06.796Z","1.1.0-canary-c0c05e5-1620027971511":"2021-05-03T07:47:11.675Z","1.1.0-canary-3da750a-1620105661732":"2021-05-04T05:21:55.663Z","1.1.0-canary-3da750a-1620105668153":"2021-05-04T05:22:04.883Z","1.1.0-canary-5c18c8f-1620137387334":"2021-05-04T14:10:57.487Z","1.1.0-canary-5c18c8f-1620137386037":"2021-05-04T14:11:14.539Z","1.1.0-canary-44c789e-1620137505277":"2021-05-04T14:12:40.580Z","1.1.0-canary-44c789e-1620137510028":"2021-05-04T14:12:48.283Z","1.1.0-canary-8debc30-1620166551034":"2021-05-04T22:16:46.442Z","1.1.0-canary-7b44cec-1620166555026":"2021-05-04T22:16:55.019Z","1.1.0-canary-a08ba9b-1620200955525":"2021-05-05T07:50:11.087Z","1.1.0-canary-419efd5-1620207260494":"2021-05-05T09:35:18.766Z","1.1.0-canary-564c44f-1620252852112":"2021-05-05T22:15:04.054Z","1.1.0-canary-6418651-1620293397770":"2021-05-06T09:30:47.946Z","1.1.0-canary-1a9d664-1620396387059":"2021-05-07T14:07:28.326Z","1.1.0-canary-1a9d664-1620396388861":"2021-05-07T14:08:28.956Z","1.1.0-canary-a4f06ff-1620399645072":"2021-05-07T15:01:51.680Z","1.1.0-canary-8e5518a-1620442273487":"2021-05-08T02:52:08.708Z","1.1.0-canary-48e3e67-1620599074633":"2021-05-09T22:25:27.069Z","1.1.0-canary-33bb5ca-1620633625996":"2021-05-10T08:01:29.056Z","1.1.0-canary-1a1e884-1621054556320":"2021-05-15T04:57:11.704Z","1.1.0-canary-1a1e884-1621054557530":"2021-05-15T04:57:50.502Z","1.1.0-canary-9897994-1621206636962":"2021-05-16T23:11:28.142Z","1.1.0-canary-76ab417-1621237140062":"2021-05-17T07:39:47.419Z","1.1.0-canary-6c16679-1621454096439":"2021-05-19T19:55:53.683Z","1.1.0-canary-6c16679-1621454100384":"2021-05-19T19:56:07.552Z","1.1.0-canary-99c2cf1-1621548856740":"2021-05-20T22:15:09.411Z","1.1.0-canary-1b401c1-1621646866553":"2021-05-22T01:28:44.844Z","1.1.0-canary-1b401c1-1621646873563":"2021-05-22T01:29:00.276Z","1.1.0-canary-4ad9dd1-1621747560654":"2021-05-23T05:26:50.974Z","1.1.0-canary-0b5af2a-1621812201422":"2021-05-23T23:24:15.912Z","1.1.0-canary-8180b90-1621843204320":"2021-05-24T08:00:50.305Z","1.1.0-canary-6abc543-1621846255279":"2021-05-24T08:51:49.239Z","1.1.0-canary-4765b49-1621897113803":"2021-05-24T22:59:20.775Z","1.1.0-canary-4765b49-1621897117809":"2021-05-24T22:59:35.618Z","1.1.0-canary-9c25e5b-1621928750906":"2021-05-25T07:46:39.239Z","1.1.0-canary-bfc00d6-1621933747039":"2021-05-25T09:09:55.493Z","1.1.0-canary-c20b7b2-1621937818610":"2021-05-25T10:17:48.793Z","1.1.0-canary-b8e430b-1621940610396":"2021-05-25T11:04:41.792Z","1.1.0-canary-1248e3f-1621958927080":"2021-05-25T16:09:45.436Z","1.1.0-canary-f3c5b88-1621960368938":"2021-05-25T16:33:42.695Z","1.1.0-canary-462d438-1621981219492":"2021-05-25T22:21:11.813Z","1.1.0-canary-1693d37-1622019003871":"2021-05-26T08:50:57.035Z","1.1.0-canary-d9a2d90-1622050591966":"2021-05-26T17:37:28.924Z","1.1.0-canary-d9a2d90-1622050597707":"2021-05-26T17:37:34.555Z","1.1.0-canary-15ecfd8-1622070646121":"2021-05-26T23:11:34.599Z","1.1.0-canary-15ecfd8-1622070645055":"2021-05-26T23:11:40.863Z","1.1.0-canary-4a8d6c2-1622108084943":"2021-05-27T09:36:06.411Z","1.1.0-canary-4a8d6c2-1622108088041":"2021-05-27T09:36:52.966Z","1.1.0-canary-769cd86-1622114990127":"2021-05-27T11:30:54.900Z","1.1.0-canary-4a6cefa-1622194836799":"2021-05-28T09:41:41.297Z","1.1.0-canary-133b5dc-1622214069469":"2021-05-28T15:02:02.790Z","1.1.0-canary-834045c-1622263617865":"2021-05-29T04:47:49.543Z","1.1.0-canary-834045c-1622263620329":"2021-05-29T04:47:56.922Z","1.1.0-canary-ccfedc4-1622292694988":"2021-05-29T12:52:28.146Z","1.1.0-canary-c299acf-1622312686306":"2021-05-29T18:25:43.868Z","1.1.0-canary-a877b25-1622401403811":"2021-05-30T19:04:14.618Z","1.1.0-canary-a877b25-1622401401565":"2021-05-30T19:04:22.148Z","1.1.0-canary-b88e904-1622414498314":"2021-05-30T22:42:36.000Z","1.1.0-canary-4f77dbf-1622439560390":"2021-05-31T05:40:18.339Z","1.1.0-canary-5cb9e47-1622466189602":"2021-05-31T13:03:56.620Z","1.1.0-canary-5cb9e47-1622466189263":"2021-05-31T13:04:02.187Z","1.1.0-canary-df42448-1622466297044":"2021-05-31T13:05:43.038Z","1.1.0-canary-06c0443-1622471289299":"2021-05-31T14:29:04.216Z","1.1.0-canary-e80e333-1622471332788":"2021-05-31T14:29:44.355Z","1.1.1":"2021-05-31T14:33:03.315Z","1.1.1-canary-5dd39c6-1622474067435":"2021-05-31T15:15:08.516Z","1.1.1-canary-5dd39c6-1622474068265":"2021-05-31T15:15:31.533Z","1.1.2":"2021-05-31T15:21:01.010Z","1.1.2-canary-dd97712-1622772308109":"2021-06-04T02:05:58.034Z","1.1.2-canary-dd97712-1622772311621":"2021-06-04T02:06:09.627Z","1.1.2-canary-dd97712-1622772331390":"2021-06-04T02:06:26.704Z","1.1.2-canary-dd97712-1622772335459":"2021-06-04T02:06:32.981Z","1.1.2-canary-fd48f71-1622793441147":"2021-06-04T07:58:14.859Z","1.1.2-canary-fd48f71-1622793482356":"2021-06-04T07:58:48.751Z","1.1.2-canary-be8acdc-1622793795686":"2021-06-04T08:04:02.449Z","1.1.2-canary-be8acdc-1622793794952":"2021-06-04T08:04:14.796Z","1.1.2-canary-1ef0af5-1622793969534":"2021-06-04T08:07:02.146Z","1.1.2-canary-3dde23e-1622794345872":"2021-06-04T08:13:19.137Z","1.1.2-canary-3dde23e-1622794358468":"2021-06-04T08:13:30.566Z","1.1.2-canary-96c3822-1622794580892":"2021-06-04T08:17:05.463Z","1.1.2-canary-14c1474-1623031483764":"2021-06-07T02:05:58.975Z","1.1.2-canary-14c1474-1623031484989":"2021-06-07T02:06:04.812Z","1.1.2-canary-14c1474-1623031516094":"2021-06-07T02:06:16.821Z","1.1.2-canary-14c1474-1623031545642":"2021-06-07T02:06:33.687Z","1.1.2-canary-15a216a-1623055422549":"2021-06-07T08:45:08.010Z","1.1.2-canary-15a216a-1623055539074":"2021-06-07T08:46:27.053Z","1.1.2-canary-15a216a-1623055647477":"2021-06-07T08:48:26.361Z","1.1.2-canary-f70971b-1623055777703":"2021-06-07T08:50:48.088Z","1.1.2-canary-f70971b-1623055782417":"2021-06-07T08:50:56.645Z","1.1.2-canary-f70971b-1623055806010":"2021-06-07T08:51:08.674Z","1.1.2-canary-f06a303-1623056807006":"2021-06-07T09:07:58.744Z","1.1.2-canary-f06a303-1623056806394":"2021-06-07T09:08:18.111Z","1.1.2-canary-f06a303-1623056875157":"2021-06-07T09:08:50.465Z","1.1.2-canary-302413a-1623056975308":"2021-06-07T09:10:26.281Z","1.1.2-canary-cfb3e0c-1623059346588":"2021-06-07T09:49:55.322Z","1.1.2-canary-ed4509f-1623067815285":"2021-06-07T12:11:01.304Z","1.1.2-canary-de34657-1623070089036":"2021-06-07T12:48:55.860Z","1.1.2-canary-40c3ffb-1623070545376":"2021-06-07T12:56:37.558Z","1.1.2-canary-41b11c5-1623204287510":"2021-06-09T02:05:28.986Z","1.1.2-canary-228cee3-1623242778984":"2021-06-09T12:47:06.672Z","1.1.2-canary-a8a8bf6-1623242948231":"2021-06-09T12:49:55.780Z","1.1.2-canary-db0d632-1623636258859":"2021-06-14T02:05:05.383Z","1.1.2-canary-db0d632-1623636258506":"2021-06-14T02:05:13.991Z","1.1.2-canary-db0d632-1623636272475":"2021-06-14T02:05:24.695Z","1.1.2-canary-10353c3-1623661437790":"2021-06-14T09:05:02.800Z","1.1.2-canary-10353c3-1623661453519":"2021-06-14T09:05:12.640Z","1.1.2-canary-3bc6e5c-1623664298667":"2021-06-14T09:52:47.450Z","1.1.2-canary-3bc6e5c-1623664315008":"2021-06-14T09:53:02.018Z","1.1.2-canary-3bc6e5c-1623664317665":"2021-06-14T09:53:09.730Z","1.1.2-canary-3bc6e5c-1623664314695":"2021-06-14T09:53:36.668Z","1.1.2-canary-3631be7-1623668119271":"2021-06-14T10:56:11.655Z","1.1.2-canary-3631be7-1623668139346":"2021-06-14T10:56:29.785Z","1.1.2-canary-5f4ebd3-1623686637631":"2021-06-14T16:04:47.678Z","1.1.2-canary-ef86f58-1623895548882":"2021-06-17T02:06:55.729Z","1.1.2-canary-ef86f58-1623895567690":"2021-06-17T02:07:10.319Z","1.1.2-canary-6ba0e3f-1623917650185":"2021-06-17T08:15:17.486Z","1.1.2-canary-6ba0e3f-1623917715050":"2021-06-17T08:16:16.231Z","1.1.2-canary-6ba0e3f-1623917712623":"2021-06-17T08:16:29.957Z","1.1.2-canary-e7a5de4-1623917827419":"2021-06-17T08:18:15.411Z","1.1.2-canary-e7a5de4-1623917848697":"2021-06-17T08:18:31.318Z","1.1.2-canary-5d3f62d-1623918011345":"2021-06-17T08:21:16.635Z","1.1.2-canary-eb24f2e-1623918055024":"2021-06-17T08:22:15.588Z","1.1.2-canary-eb24f2e-1623918082784":"2021-06-17T08:22:49.702Z","1.1.2-canary-4c08875-1623918543146":"2021-06-17T08:29:58.914Z","1.1.2-canary-4c08875-1623918547462":"2021-06-17T08:30:09.506Z","1.1.2-canary-f1361db-1623919075596":"2021-06-17T08:38:59.444Z","1.1.2-canary-f7ec6d9-1623919713420":"2021-06-17T08:49:35.916Z","1.1.2-canary-3552985-1623920555551":"2021-06-17T09:03:27.749Z","1.1.2-canary-3552985-1623981843013":"2021-06-18T02:04:52.816Z","1.1.2-canary-3552985-1623981844649":"2021-06-18T02:05:01.133Z","1.1.2-canary-9a2b0af-1624002511996":"2021-06-18T07:49:22.020Z","1.1.2-canary-b6b0a89-1624241016655":"2021-06-21T02:04:39.317Z","1.1.2-canary-b6b0a89-1624241033452":"2021-06-21T02:04:48.796Z","1.1.2-canary-5c0017d-1624262569839":"2021-06-21T08:03:51.608Z","1.1.2-canary-6721d52-1624262712833":"2021-06-21T08:06:11.303Z","1.1.2-canary-6721d52-1624262732273":"2021-06-21T08:06:25.271Z","1.1.2-canary-2cb6b9b-1624262813208":"2021-06-21T08:07:43.602Z","1.1.2-canary-2cb6b9b-1624262944085":"2021-06-21T08:10:04.323Z","1.1.2-canary-2cb6b9b-1624262983181":"2021-06-21T08:10:29.085Z","1.1.2-canary-31aa68f-1624263358038":"2021-06-21T08:16:54.246Z","1.1.2-canary-31aa68f-1624263489514":"2021-06-21T08:19:12.590Z","1.1.2-canary-5d80fe7-1624263865742":"2021-06-21T08:25:15.874Z","1.1.2-canary-5d80fe7-1624263868531":"2021-06-21T08:26:06.878Z","1.1.2-canary-5849805-1624264389903":"2021-06-21T08:34:05.764Z","1.1.2-canary-113bfa0-1624327409933":"2021-06-22T02:04:10.780Z","1.1.2-canary-113bfa0-1624327411695":"2021-06-22T02:04:28.058Z","1.1.2-canary-33a4c11-1624358741081":"2021-06-22T10:46:22.441Z","1.1.2-canary-c89244e-1624359362028":"2021-06-22T10:56:52.845Z","1.1.2-canary-c89244e-1624359395530":"2021-06-22T10:57:26.159Z","1.1.2-canary-8f98b03-1624413859096":"2021-06-23T02:05:07.778Z","1.1.2-canary-8f98b03-1624413860431":"2021-06-23T02:05:16.536Z","1.1.2-canary-28f2a43-1624845835544":"2021-06-28T02:04:42.942Z","1.1.2-canary-28f2a43-1624845853531":"2021-06-28T02:05:01.074Z","1.1.2-canary-28f2a43-1624845854960":"2021-06-28T02:05:13.535Z","1.1.2-canary-f0af1ee-1624880383615":"2021-06-28T11:40:35.671Z","1.1.2-canary-4ff2d41-1624880720777":"2021-06-28T11:46:10.731Z","1.1.2-canary-1a55803-1624881711085":"2021-06-28T12:02:43.754Z","1.1.2-canary-c71afe9-1624882059092":"2021-06-28T12:08:38.767Z","1.1.2-canary-23c429c-1624884004462":"2021-06-28T12:40:47.268Z","1.1.2-canary-026e962-1624932198119":"2021-06-29T02:04:06.448Z","1.1.2-canary-8e724df-1624953976756":"2021-06-29T08:08:12.251Z","1.1.2-canary-a0c26e0-1625105111492":"2021-07-01T02:06:08.496Z","1.1.2-canary-a0c26e0-1625105111491":"2021-07-01T02:06:14.432Z","1.1.2-canary-a0c26e0-1625105132836":"2021-07-01T02:06:26.935Z","1.1.2-canary-a0c26e0-1625105138586":"2021-07-01T02:06:33.311Z","1.1.2-canary-a0c26e0-1625105147950":"2021-07-01T02:06:44.472Z","1.1.2-canary-7798cf7-1625130712909":"2021-07-01T09:12:45.210Z","1.1.2-canary-7798cf7-1625130677760":"2021-07-01T09:12:56.633Z","1.1.2-canary-7798cf7-1625130663940":"2021-07-01T09:13:04.752Z","1.1.2-canary-c87127a-1625131302420":"2021-07-01T09:22:34.682Z","1.1.2-canary-deb426b-1625145917074":"2021-07-01T13:26:11.264Z","1.1.2-canary-f609f25-1625153819502":"2021-07-01T15:37:49.371Z","1.1.2-canary-64bebd5-1625154279831":"2021-07-01T15:45:22.097Z","1.1.2-canary-4781e40-1625154639338":"2021-07-01T15:51:27.412Z","1.1.2-canary-1120031-1625450628689":"2021-07-05T02:04:40.883Z","1.1.2-canary-1120031-1625450630307":"2021-07-05T02:04:51.814Z","1.1.2-canary-1120031-1625450646678":"2021-07-05T02:05:00.908Z","1.1.2-canary-714cae9-1625471963924":"2021-07-05T08:00:17.984Z","1.1.2-canary-9baaf07-1625472443909":"2021-07-05T08:08:11.154Z","1.1.2-canary-9baaf07-1625472468852":"2021-07-05T08:08:36.790Z","1.1.2-canary-57dab38-1625472787207":"2021-07-05T08:14:05.605Z","1.1.2-canary-354d723-1625473028819":"2021-07-05T08:18:03.043Z","1.1.2-canary-354d723-1625473060404":"2021-07-05T08:18:35.400Z","1.1.2-canary-e2cc81d-1625473278576":"2021-07-05T08:22:15.020Z","1.1.2-canary-dc8fb96-1625623432508":"2021-07-07T02:04:40.630Z","1.1.2-canary-dc8fb96-1625623432445":"2021-07-07T02:04:49.301Z","1.1.2-canary-647f947-1625642850628":"2021-07-07T07:28:19.490Z","1.1.2-canary-e77fddd-1625709892995":"2021-07-08T02:05:52.851Z","1.1.2-canary-e77fddd-1625709892737":"2021-07-08T02:06:36.062Z","1.1.2-canary-ba8a7bc-1625735918032":"2021-07-08T09:19:35.613Z","1.1.2-canary-fe80256-1625736432477":"2021-07-08T09:28:02.361Z","1.1.2-canary-902548c-1625736694643":"2021-07-08T09:32:20.861Z","1.1.2-canary-c1c3e4a-1626055530212":"2021-07-12T02:06:19.092Z","1.1.2-canary-c1c3e4a-1626055527988":"2021-07-12T02:06:25.166Z","1.1.2-canary-c1c3e4a-1626055543332":"2021-07-12T02:06:44.544Z","1.1.2-canary-81a1526-1626082510856":"2021-07-12T09:36:08.217Z","1.1.2-canary-4bf046d-1626082707337":"2021-07-12T09:39:19.144Z","1.1.2-canary-4bf046d-1626082709031":"2021-07-12T09:39:25.034Z","1.1.2-canary-27ecd91-1626091651551":"2021-07-12T12:08:20.365Z","1.1.2-canary-27ecd91-1626091665955":"2021-07-12T12:08:34.383Z","1.1.2-canary-4c912ac-1626091888801":"2021-07-12T12:12:19.713Z","1.1.2-canary-4c912ac-1626091898757":"2021-07-12T12:12:30.948Z","1.1.2-canary-a130203-1626095470562":"2021-07-12T13:11:59.084Z","1.1.2-canary-a130203-1626095519564":"2021-07-12T13:12:54.674Z","1.1.2-canary-e9c6db7-1626097496816":"2021-07-12T13:45:49.220Z","1.1.2-canary-915464f-1626401109463":"2021-07-16T02:06:08.700Z","1.1.2-canary-915464f-1626401109668":"2021-07-16T02:06:17.005Z","1.1.2-canary-915464f-1626401123773":"2021-07-16T02:06:24.422Z","1.1.2-canary-915464f-1626401135040":"2021-07-16T02:06:33.707Z","1.1.2-canary-cacbfe4-1626424818157":"2021-07-16T08:41:08.406Z","1.1.2-canary-cacbfe4-1626424819036":"2021-07-16T08:41:17.131Z","1.1.2-canary-ab4e76d-1626435190370":"2021-07-16T11:34:01.143Z","1.1.2-canary-ab4e76d-1626435189645":"2021-07-16T11:34:08.743Z","1.1.2-canary-0868351-1626435354401":"2021-07-16T11:36:42.726Z","1.1.2-canary-518a1ec-1626436937408":"2021-07-16T12:03:06.801Z","1.1.2-canary-31a768f-1626437935067":"2021-07-16T12:19:43.083Z","1.1.2-canary-31a768f-1626437973147":"2021-07-16T12:20:18.935Z","1.1.2-canary-e450628-1626439139686":"2021-07-16T12:39:46.286Z","1.1.2-canary-6977596-1626660713690":"2021-07-19T02:12:48.148Z","1.1.2-canary-aef25c5-1626686804588":"2021-07-19T09:27:38.482Z","1.1.2-canary-f798224-1626687403415":"2021-07-19T09:37:41.199Z","1.1.2-canary-70dde0d-1626695472724":"2021-07-19T11:51:57.853Z","1.1.2-canary-8c247e4-1626919444465":"2021-07-22T02:04:51.487Z","1.1.2-canary-8c247e4-1626919458163":"2021-07-22T02:05:04.737Z","1.1.2-canary-8c247e4-1626919455650":"2021-07-22T02:05:14.807Z","1.1.2-canary-f46f94b-1626941026566":"2021-07-22T08:04:41.754Z","1.1.2-canary-f46f94b-1626941045753":"2021-07-22T08:05:14.231Z","1.1.2-canary-9a9224c-1626941912938":"2021-07-22T08:19:15.352Z","1.1.2-canary-7142b3e-1626942125284":"2021-07-22T08:23:01.116Z","1.1.2-canary-298df1f-1626942588853":"2021-07-22T08:30:34.330Z","1.1.2-canary-39a7cc7-1627265038188":"2021-07-26T02:04:51.340Z","1.1.2-canary-39a7cc7-1627265041495":"2021-07-26T02:05:00.064Z","1.1.2-canary-39a7cc7-1627265050993":"2021-07-26T02:05:07.843Z","1.1.2-canary-c54119f-1627287728287":"2021-07-26T08:23:01.928Z","1.1.2-canary-c54119f-1627287732725":"2021-07-26T08:23:09.672Z","1.1.2-canary-c1f0c3c-1627292744352":"2021-07-26T09:47:45.913Z","1.1.2-canary-c1f0c3c-1627292757238":"2021-07-26T09:47:52.018Z","1.1.2-canary-0a67cb5-1627292906558":"2021-07-26T09:51:04.926Z","1.1.2-canary-0a67cb5-1627292933717":"2021-07-26T09:51:18.180Z","1.1.2-canary-f029377-1627293412099":"2021-07-26T09:58:15.530Z","1.1.2-canary-38417c7-1627351472085":"2021-07-27T02:05:23.607Z","1.1.2-canary-38417c7-1627351491643":"2021-07-27T02:05:37.927Z","1.1.2-canary-38417c7-1627351485106":"2021-07-27T02:05:49.010Z","1.1.2-canary-38417c7-1627351481689":"2021-07-27T02:06:01.763Z","1.1.2-canary-479d536-1627371652366":"2021-07-27T07:41:51.665Z","1.1.2-canary-479d536-1627371646727":"2021-07-27T07:42:42.762Z","1.1.2-canary-b91c9b3-1627377025897":"2021-07-27T09:11:24.252Z","1.1.2-canary-0bafb30-1627378561656":"2021-07-27T09:36:48.583Z","1.1.2-canary-8d8264a-1627524265271":"2021-07-29T02:05:14.632Z","1.1.2-canary-8d8264a-1627524280333":"2021-07-29T02:05:22.979Z","1.1.2-canary-8d8264a-1627524281882":"2021-07-29T02:05:35.475Z","1.1.2-canary-afa0236-1627547976932":"2021-07-29T08:40:37.757Z","1.1.2-canary-2f8e72e-1627548238034":"2021-07-29T08:44:45.644Z","1.1.2-canary-2f8e72e-1627548243510":"2021-07-29T08:45:07.491Z","1.1.2-canary-dd08812-1627548509771":"2021-07-29T08:49:37.831Z","1.1.2-canary-dd08812-1627548503043":"2021-07-29T08:50:11.876Z","1.1.2-canary-2f1ca76-1627548752291":"2021-07-29T08:53:17.310Z","1.1.2-canary-4c7308e-1627610647971":"2021-07-30T02:04:56.798Z","1.1.2-canary-98cfb48-1627630504823":"2021-07-30T07:35:50.638Z","1.1.2-canary-a6ae333-1627630765179":"2021-07-30T07:40:15.772Z","1.1.2-canary-7056406-1627631677038":"2021-07-30T07:55:31.319Z","1.1.2-canary-d67a93d-1627869873384":"2021-08-02T02:05:50.815Z","1.1.2-canary-d67a93d-1627869875985":"2021-08-02T02:05:57.514Z","1.1.2-canary-d67a93d-1627869907840":"2021-08-02T02:06:15.249Z","1.1.2-canary-d67a93d-1627869898943":"2021-08-02T02:06:28.675Z","1.1.2-canary-d67a93d-1628218606047":"2021-08-06T02:57:32.657Z","1.1.2-canary-d67a93d-1628474647383":"2021-08-09T02:05:02.836Z","1.1.2-canary-d67a93d-1628647538416":"2021-08-11T02:06:24.428Z","1.1.2-canary-d67a93d-1628647542731":"2021-08-11T02:06:31.631Z","1.1.2-canary-d67a93d-1628733892054":"2021-08-12T02:05:46.189Z","1.1.2-canary-d67a93d-1629425033289":"2021-08-20T02:04:45.281Z","1.1.2-canary-d67a93d-1629425031235":"2021-08-20T02:04:57.844Z","1.1.2-canary-d67a93d-1629770681959":"2021-08-24T02:05:27.425Z","1.1.2-canary-d67a93d-1629770685355":"2021-08-24T02:05:46.770Z","1.1.2-canary-d67a93d-1630289079100":"2021-08-30T02:05:24.881Z","1.1.2-canary-d67a93d-1630289079081":"2021-08-30T02:05:33.934Z","1.1.2-canary-d67a93d-1631498730731":"2021-09-13T02:06:21.822Z","1.1.2-canary-d67a93d-1631498792628":"2021-09-13T02:07:31.087Z","1.1.2-canary-d67a93d-1632103570590":"2021-09-20T02:07:08.752Z","1.1.2-canary-d67a93d-1632103574145":"2021-09-20T02:07:18.234Z","1.1.2-canary-d67a93d-1632362727891":"2021-09-23T02:06:26.492Z","1.1.2-canary-d67a93d-1633313489338":"2021-10-04T02:12:26.464Z","1.1.2-canary-d67a93d-1633313489902":"2021-10-04T02:12:34.576Z","1.1.2-canary-d67a93d-1633313522188":"2021-10-04T02:13:04.158Z","1.1.2-canary-d67a93d-1633313549218":"2021-10-04T02:13:21.736Z","1.1.2-canary-d67a93d-1633313550714":"2021-10-04T02:13:29.450Z","1.1.2-canary-d67a93d-1633918115097":"2021-10-11T02:09:24.753Z","1.1.2-canary-d67a93d-1633918113970":"2021-10-11T02:09:31.286Z","1.1.2-canary-d67a93d-1634266721163":"2021-10-15T02:59:29.882Z","1.1.2-canary-d67a93d-1634522684441":"2021-10-18T02:05:37.421Z","1.1.2-canary-d67a93d-1634522684450":"2021-10-18T02:05:49.534Z","1.1.2-canary-d67a93d-1634695531157":"2021-10-20T02:06:25.766Z","1.1.2-canary-d67a93d-1634695533097":"2021-10-20T02:06:33.410Z","1.1.2-canary-d67a93d-1635127716251":"2021-10-25T02:09:25.622Z","1.1.2-canary-d67a93d-1635127720322":"2021-10-25T02:09:41.862Z","1.1.2-canary-d67a93d-1635127783059":"2021-10-25T02:10:35.410Z","1.1.2-canary-d67a93d-1635127781356":"2021-10-25T02:10:46.867Z","1.1.2-canary-d67a93d-1635213919249":"2021-10-26T02:06:18.011Z","1.1.2-canary-d67a93d-1635818725149":"2021-11-02T02:06:24.668Z","1.1.2-canary-d67a93d-1636337272893":"2021-11-08T02:08:47.256Z","1.1.2-canary-d67a93d-1636337338557":"2021-11-08T02:09:53.772Z","1.1.2-canary-d67a93d-1636941921488":"2021-11-15T02:06:16.639Z","1.1.2-canary-d67a93d-1636941929957":"2021-11-15T02:06:28.959Z","1.1.2-canary-d67a93d-1636941947089":"2021-11-15T02:06:46.944Z","1.1.2-canary-d67a93d-1637546963235":"2021-11-22T02:10:20.690Z","1.1.2-canary-d67a93d-1637633189802":"2021-11-23T02:07:19.001Z","1.1.2-canary-d67a93d-1637633190895":"2021-11-23T02:07:25.144Z","1.1.2-canary-d67a93d-1637805878026":"2021-11-25T02:05:31.755Z","1.1.2-canary-d67a93d-1637805882963":"2021-11-25T02:05:41.402Z","1.1.2-canary-d67a93d-1638324424727":"2021-12-01T02:08:03.498Z","1.1.2-canary-d67a93d-1638756488093":"2021-12-06T02:08:59.360Z","1.1.2-canary-d67a93d-1638842826265":"2021-12-07T02:07:57.924Z","1.1.2-canary-d67a93d-1639102053584":"2021-12-10T02:08:28.270Z","1.1.2-canary-d67a93d-1639361247857":"2021-12-13T02:08:21.052Z","1.1.2-canary-d67a93d-1639966022934":"2021-12-20T02:07:56.591Z","1.1.2-canary-d67a93d-1639966025178":"2021-12-20T02:08:07.080Z","1.1.2-canary-d67a93d-1640570903481":"2021-12-27T02:09:25.434Z","1.1.2-canary-d67a93d-1640571026952":"2021-12-27T02:15:18.414Z","1.1.2-canary-d67a93d-1641175736847":"2022-01-03T02:09:47.991Z","1.1.2-canary-d67a93d-1641175734717":"2022-01-03T02:09:55.429Z","1.1.2-canary-d67a93d-1641348468850":"2022-01-05T02:08:43.299Z","1.1.2-canary-d67a93d-1641348472510":"2022-01-05T02:08:53.852Z","1.1.2-canary-f39ec38-1641482195236":"2022-01-06T15:17:37.787Z","1.1.2-canary-f39ec38-1641482161096":"2022-01-06T15:18:01.336Z","1.1.2-canary-f39ec38-1641482257761":"2022-01-06T15:18:30.049Z","1.1.2-canary-f39ec38-1641482261684":"2022-01-06T15:18:45.454Z","1.1.2-canary-10271fc-1642385231536":"2022-01-17T02:07:54.700Z","1.1.2-canary-10271fc-1642385231908":"2022-01-17T02:08:01.446Z","1.1.2-canary-10271fc-1642558005932":"2022-01-19T02:07:39.018Z","1.1.2-canary-10271fc-1643594830521":"2022-01-31T02:07:59.304Z","1.1.2-canary-10271fc-1643594831788":"2022-01-31T02:08:07.395Z","1.1.2-canary-10271fc-1644804465398":"2022-02-14T02:08:35.964Z","1.1.2-canary-10271fc-1644906796880":"2022-02-15T06:34:09.737Z","1.1.2-canary-76b1459-1644906996028":"2022-02-15T06:40:09.798Z","1.1.2-canary-76b1459-1644907000100":"2022-02-15T06:40:16.443Z","1.1.2-canary-76b1459-1644907065335":"2022-02-15T06:42:19.149Z","1.1.3-canary-0adfe8d-1644907312286":"2022-02-15T06:42:41.377Z","1.1.2-canary-76b1459-1644907127070":"2022-02-15T06:43:07.442Z","1.1.3":"2022-02-15T06:52:57.189Z","1.1.3-canary-0adfe8d-1644908987561":"2022-02-15T07:10:32.218Z","1.1.3-canary-0adfe8d-1644909078651":"2022-02-15T07:12:01.523Z","1.1.3-canary-0c81dee-1644909262507":"2022-02-15T07:17:00.984Z","1.1.3-canary-0c81dee-1644909340242":"2022-02-15T07:18:12.395Z","1.1.3-canary-0c81dee-1644909345004":"2022-02-15T07:19:06.086Z","1.1.4-canary-08d62d2-1644909403598":"2022-02-15T07:19:12.877Z","1.1.4":"2022-02-15T07:19:57.523Z","1.1.4-canary-08d62d2-1644909470221":"2022-02-15T07:20:04.825Z","1.1.4-canary-08d62d2-1645409247285":"2022-02-21T02:08:16.566Z","1.1.4-canary-08d62d2-1645409247495":"2022-02-21T02:08:27.529Z","1.1.4-canary-08d62d2-1645668393598":"2022-02-24T02:07:20.357Z","1.1.4-canary-08d62d2-1645668395191":"2022-02-24T02:07:31.024Z","1.1.4-canary-08d62d2-1646014142775":"2022-02-28T02:10:01.674Z","1.1.4-canary-08d62d2-1646014211312":"2022-02-28T02:20:53.796Z","1.1.4-canary-08d62d2-1646618832524":"2022-03-07T02:08:07.236Z","1.1.4-canary-08d62d2-1647223508925":"2022-03-14T02:06:03.352Z","1.1.4-canary-08d62d2-1647223512417":"2022-03-14T02:06:08.655Z","1.1.4-canary-08d62d2-1648344685351":"2022-03-27T01:32:22.488Z","1.1.4-canary-08d62d2-1648433185968":"2022-03-28T02:07:16.342Z","1.1.4-canary-08d62d2-1648433190444":"2022-03-28T02:07:27.674Z","1.1.4-canary-08d62d2-1648433276168":"2022-03-28T02:08:47.119Z","1.1.4-canary-08d62d2-1648433276189":"2022-03-28T02:08:55.861Z","1.1.4-canary-08d62d2-1649383660066":"2022-04-08T02:08:28.188Z","1.1.4-canary-08d62d2-1649383662491":"2022-04-08T02:08:38.629Z","1.1.4-canary-08d62d2-1649642903670":"2022-04-11T02:09:11.208Z","1.1.4-canary-08d62d2-1649642903148":"2022-04-11T02:09:16.585Z","1.1.4-canary-08d62d2-1649642942947":"2022-04-11T02:09:53.619Z","1.1.4-canary-08d62d2-1649642973154":"2022-04-11T02:10:25.162Z","1.1.4-canary-08d62d2-1649730841781":"2022-04-12T02:34:43.824Z","1.1.4-canary-08d62d2-1649730843309":"2022-04-12T02:34:52.264Z","1.1.4-canary-08d62d2-1650247774607":"2022-04-18T02:10:28.852Z","1.1.4-canary-08d62d2-1650247773693":"2022-04-18T02:10:35.630Z","1.1.4-canary-08d62d2-1650247864348":"2022-04-18T02:11:52.612Z","1.1.4-canary-08d62d2-1650247866656":"2022-04-18T02:12:04.415Z","1.1.4-canary-08d62d2-1650593206215":"2022-04-22T02:07:28.522Z","1.1.4-canary-08d62d2-1650593207287":"2022-04-22T02:07:40.977Z","1.1.4-canary-08d62d2-1650855616454":"2022-04-25T03:01:05.882Z","1.1.4-canary-08d62d2-1651543660362":"2022-05-03T02:08:36.006Z","1.1.4-canary-08d62d2-1652063620713":"2022-05-09T02:34:32.604Z","1.1.4-canary-08d62d2-1652063621200":"2022-05-09T02:34:37.275Z","1.1.4-canary-08d62d2-1653271704210":"2022-05-23T02:09:16.867Z","1.1.4-canary-08d62d2-1653962658823":"2022-05-31T02:05:09.289Z","1.1.4-canary-08d62d2-1653962660149":"2022-05-31T02:05:27.875Z","1.1.4-canary-08d62d2-1654050625671":"2022-06-01T02:31:09.163Z","1.1.4-canary-08d62d2-1654481322283":"2022-06-06T02:09:32.936Z","1.1.4-canary-08d62d2-1654481324805":"2022-06-06T02:09:37.019Z","1.1.4-canary-08d62d2-1655690947509":"2022-06-20T02:09:52.985Z","1.1.4-canary-08d62d2-1655690951107":"2022-06-20T02:10:02.427Z","1.1.4-canary-08d62d2-1656296640966":"2022-06-27T02:24:45.925Z","1.1.4-canary-08d62d2-1656296642960":"2022-06-27T02:24:51.593Z","1.1.4-canary-08d62d2-1656382057237":"2022-06-28T02:08:22.824Z","1.1.4-canary-08d62d2-1656382065611":"2022-06-28T02:08:51.574Z","1.1.4-canary-08d62d2-1656900720335":"2022-07-04T02:12:57.981Z","1.1.4-canary-08d62d2-1656900744901":"2022-07-04T02:13:10.152Z","1.1.4-canary-08d62d2-1657246100114":"2022-07-08T02:09:06.733Z","1.1.4-canary-08d62d2-1657505600413":"2022-07-11T02:14:01.529Z","1.1.4-canary-08d62d2-1658110075597":"2022-07-18T02:08:47.563Z","1.1.4-canary-08d62d2-1658110087974":"2022-07-18T02:08:53.378Z","1.1.4-canary-08d62d2-1658110085524":"2022-07-18T02:09:04.585Z","1.1.4-canary-08d62d2-1658281559708":"2022-07-20T01:46:49.036Z","1.1.4-canary-08d62d2-1658281559283":"2022-07-20T01:47:03.333Z","1.1.4-canary-08d62d2-1658714968108":"2022-07-25T02:10:17.757Z","1.1.4-canary-08d62d2-1658714967414":"2022-07-25T02:10:28.168Z","1.1.4-canary-08d62d2-1659320321168":"2022-08-01T02:19:27.627Z","1.1.4-canary-08d62d2-1659405986943":"2022-08-02T02:07:07.159Z","1.1.4-canary-08d62d2-1659405992433":"2022-08-02T02:07:22.641Z","1.1.4-canary-08d62d2-1660529355964":"2022-08-15T02:10:13.943Z","1.1.4-canary-08d62d2-1660529353179":"2022-08-15T02:10:19.022Z","1.1.4-canary-08d62d2-1661739150498":"2022-08-29T02:13:14.258Z","1.1.4-canary-08d62d2-1661739147810":"2022-08-29T02:13:19.054Z","1.1.4-canary-08d62d2-1661739172277":"2022-08-29T02:13:49.348Z","1.1.4-canary-08d62d2-1661998204629":"2022-09-01T02:10:53.077Z","1.1.4-canary-08d62d2-1661998208581":"2022-09-01T02:11:00.347Z","1.1.4-canary-08d62d2-1662382493297":"2022-09-05T12:55:55.461Z","1.1.4-canary-08d62d2-1662516358428":"2022-09-07T02:06:47.973Z","1.1.4-canary-08d62d2-1662689258630":"2022-09-09T02:08:24.738Z","1.1.4-canary-08d62d2-1663035014603":"2022-09-13T02:11:08.703Z","1.1.4-canary-08d62d2-1663035050167":"2022-09-13T02:11:38.566Z","1.1.4-canary-08d62d2-1663035052283":"2022-09-13T02:11:47.648Z","1.1.4-canary-08d62d2-1663553463055":"2022-09-19T02:12:02.759Z","1.1.4-canary-08d62d2-1664158141235":"2022-09-26T02:09:49.360Z","1.1.4-canary-08d62d2-1664158139643":"2022-09-26T02:09:59.335Z","1.1.4-canary-08d62d2-1665367698571":"2022-10-10T02:09:11.611Z","1.1.4-canary-08d62d2-1665367705610":"2022-10-10T02:09:19.986Z","1.1.4-canary-08d62d2-1665453992328":"2022-10-11T02:07:31.896Z","1.1.4-canary-08d62d2-1665453997031":"2022-10-11T02:07:36.795Z","1.1.4-canary-08d62d2-1665454074674":"2022-10-11T02:08:56.262Z","1.1.4-canary-08d62d2-1665454082314":"2022-10-11T02:09:15.912Z","1.1.4-canary-08d62d2-1666145352392":"2022-10-19T02:09:55.964Z","1.1.4-canary-08d62d2-1666577128276":"2022-10-24T02:06:11.652Z","1.1.4-canary-08d62d2-1666577126807":"2022-10-24T02:06:23.707Z","1.1.4-canary-08d62d2-1666577206572":"2022-10-24T02:07:39.437Z","1.1.4-canary-08d62d2-1666577249838":"2022-10-24T02:08:17.812Z","1.1.4-canary-08d62d2-1666577251684":"2022-10-24T02:08:31.160Z","1.1.4-canary-08d62d2-1667181977006":"2022-10-31T02:06:58.248Z","1.1.4-canary-08d62d2-1667181980182":"2022-10-31T02:07:13.924Z","1.1.4-canary-08d62d2-1667268846841":"2022-11-01T02:14:53.209Z","1.1.4-canary-08d62d2-1667268847866":"2022-11-01T02:15:07.770Z","1.1.4-canary-08d62d2-1667873069077":"2022-11-08T02:05:11.953Z","1.1.4-canary-08d62d2-1667873070683":"2022-11-08T02:05:34.173Z","1.1.4-canary-08d62d2-1667873385041":"2022-11-08T02:10:31.695Z","1.1.4-canary-08d62d2-1668391538952":"2022-11-14T02:06:27.166Z","1.1.4-canary-08d62d2-1668391543348":"2022-11-14T02:06:35.634Z","1.1.4-canary-08d62d2-1668996777654":"2022-11-21T02:13:55.271Z","1.1.4-canary-08d62d2-1670205766330":"2022-12-05T02:03:36.198Z","1.1.4-canary-08d62d2-1670810710873":"2022-12-12T02:05:57.346Z","1.1.4-canary-08d62d2-1670810716185":"2022-12-12T02:06:07.301Z","1.1.4-canary-08d62d2-1671415508831":"2022-12-19T02:06:00.250Z","1.1.4-canary-08d62d2-1671415505895":"2022-12-19T02:06:12.226Z","1.1.4-canary-08d62d2-1671415532548":"2022-12-19T02:06:19.986Z","1.1.4-canary-08d62d2-1672608200112":"2023-01-01T21:24:20.206Z","1.1.4-canary-08d62d2-1672608204519":"2023-01-01T21:25:08.106Z","1.1.4-canary-08d62d2-1672625013680":"2023-01-02T02:04:16.002Z","1.1.4-canary-08d62d2-1673120776179":"2023-01-07T19:47:13.477Z","1.1.4-canary-08d62d2-1673120778147":"2023-01-07T19:48:03.819Z","1.1.4-canary-08d62d2-1673229790610":"2023-01-09T02:04:03.093Z","1.1.4-canary-08d62d2-1673836263018":"2023-01-16T02:31:45.879Z","1.1.4-canary-08d62d2-1674785018712":"2023-01-27T02:04:19.457Z","1.1.4-canary-08d62d2-1674785018983":"2023-01-27T02:04:31.216Z","1.1.4-canary-08d62d2-1675044768134":"2023-01-30T02:13:38.925Z","1.1.4-canary-08d62d2-1676258282852":"2023-02-13T03:18:45.317Z","1.1.4-canary-08d62d2-1676258284097":"2023-02-13T03:18:56.106Z","1.1.4-canary-08d62d2-1676258313114":"2023-02-13T03:19:15.794Z","1.1.4-canary-08d62d2-1677467460741":"2023-02-27T03:11:41.848Z","1.1.4-canary-08d62d2-1677467462786":"2023-02-27T03:11:51.514Z","1.1.4-canary-08d62d2-1677467538586":"2023-02-27T03:13:03.868Z","1.1.4-canary-08d62d2-1677988596546":"2023-03-05T03:57:20.425Z","1.1.4-canary-08d62d2-1677988599455":"2023-03-05T03:57:29.522Z","1.1.4-canary-08d62d2-1678676369290":"2023-03-13T03:00:11.972Z","1.1.4-canary-08d62d2-1679021949372":"2023-03-17T03:00:02.620Z","1.1.4-canary-08d62d2-1679021951344":"2023-03-17T03:00:10.379Z","1.1.4-canary-08d62d2-1679281084597":"2023-03-20T02:58:48.659Z","1.1.4-canary-08d62d2-1680058818827":"2023-03-29T03:01:02.590Z"},"bugs":{"url":"https://github.com/iadvize/store-library/issues"},"author":{"name":"iAdvize developers"},"license":"MIT","homepage":"https://github.com/iadvize/store-library#readme","keywords":["iAdvize"],"repository":{"url":"git+https://github.com/iadvize/store-library.git","type":"git"},"description":"React binding for @iadvize-oss/store","maintainers":[{"email":"david.bonnemaison@iadvize.com","name":"davidiadvize"},{"email":"npm-iadvize-oss@iadvize.com","name":"iadvize-bot"},{"email":"jules.trehorel@iadvize.com","name":"jules.trehorel"},{"email":"simon.liotier@iadvize.com","name":"simon.liotier.iadvize"},{"email":"etienne.rouillard@iadvize.com","name":"etienne.rouillard.iadvize"},{"email":"ludovic.dupont29@gmail.com","name":"korial29"}],"readme":"","readmeFilename":""}